Skip to content

Expand filter_quality.rs to cover more tools #209

Description

@Koukyosyumei

Expand tests/filter_quality.rs coverage

tests/filter_quality.rs asserts the two properties that matter for the token-reduction feature: (1) the summary is a large fraction smaller than the raw (measured with the real tiktoken tokenizer), and (2) the signal an agent needs survives. Today it only covers 3 tools: cargo, gcc, pytest.

We have 74 filters. This good-first-issue adds the same kind of quality assertions for more high-traffic tools.

What to do

Add tests (following the existing assert_token_cut / keeps / drops helpers) for a handful more tools, e.g. npm, jest, eslint, go, gradle, ruff, mypy, tsc. For each:

  • Build a realistic, sizeable raw fixture (e.g. 100–300 noise lines around a real failure).
  • keeps(...) the failing names / error messages / final counts.
  • drops(...) a sample of the bulk noise.
  • assert_token_cut(&res, min_raw, max_ratio).

Verify

cargo test --test filter_quality

Acceptance criteria

  • At least 4 new tools covered with token-cut + signal-preservation assertions
  • Fixtures are realistic and large enough to be meaningful (min_raw respected)
  • All tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions