Skip to content

build_waste_report silently returns all-zeros on un-tokenized sessions #12

Description

@royalpinto007

Problem

A programmatically built session with all tokens=0 yields zero waste and ratio 0.0 with no warning, since profiling is a separate manual step direct callers can forget (engine.py always pairs them).

Where

src/ctxlens/analysis/waste.py + duplication.py (no un-tokenized guard).

Acceptance

Add a failing test first calling build_waste_report on an un-tokenized session with large repeated bodies, expecting a raise or auto-count instead of silent zeros. Then fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions