Skip to content

feat(compress): C0 — every file map measured + c3 map-eval harness (2.120.0) - #160

Merged
drknowhow merged 4 commits into
mainfrom
feat/compress-c0
Sep 6, 2026
Merged

drknowhow merged 4 commits into
mainfrom
feat/compress-c0

Conversation

@drknowhow

Copy link
Copy Markdown
Owner

Phase C0 of the c3_compress remediation (campaign c3-compress-remediation, plan reviewed with Cod).

Measured on this repository's telemetry: c3_compress was 132 of 3,932 tool calls, 130 of them mode=map, and no row said which backend built the map, which parser extracted the symbols, whether the record was fresh, or whether the map led to a targeted read. This PR adds the instrument before the renderer changes in 2.121.0.

  • file_memory records carry parser (tree_sitter | regex | generic); pre-2.120.0 records re-extract on next update.
  • c3_compress / c3_read rows carry a flat detail (requested mode, backend, parser, cache_hit, sections, symbols, fallback reason, ranges/lines served).
  • aggregate_tool_telemetry gains map_by_backend and map_read_chain (maps followed by a read of the same file within 5 calls; reads preceded by a map).
  • c3 map-eval: hand-annotated gold harness for the file map (16 fixtures across 12 languages plus malformed, minified and 250 KB generated files), scoring tokens, symbol recall/precision, signature completeness, range accuracy and determinism. Baseline committed against the current renderer: signature completeness 0.20, recall 0.72, 10 cases xfail C1, 1 xfail C4.

Tests: 3747 passed locally (tests/test_map_telemetry_c0.py, tests/test_map_eval.py new). ruff clean.

https://claude.ai/code/session_01VPxmnq6oZegRJLcYMqTaFw

…ap (C0)

Sixteen fixtures under tests/map_eval/fixtures (Python incl. malformed,
TS, JS, Go, Rust, Markdown, YAML, JSON, CSS, HTML, R regex path, Java
generic path) plus two seeded generators (20 KB single-line bundle,
250 KB / 400-function module), each annotated by hand in
fixture_suite.jsonl with kind, qualified name, params, ret and cat -n
verified ranges. services/bench/map_eval.py renders each through the
callable the MCP tool uses (FileMemoryStore.get_or_build_map today,
services.file_map.render_map when C1 ships it), parses both the
canonical and the legacy grammar, and grades recall, precision,
signature completeness, range accuracy, determinism, tokens, chrome
share. Gates must_pass / xfail(phase) / info with floors, ceilings and
the campaign's per-case token gate; `c3 map-eval` wired beside
shell-eval; tests/test_map_eval.py is the CI gate; docs/map-eval.md.

Baseline against the legacy renderer: 4 must_pass, 10 xfail(C1),
1 xfail(C4), 1 info; recall mean 0.72, signature completeness 0.20,
chrome share 0.14. Findings for C1 and C4 are listed in the doc.
@drknowhow
drknowhow merged commit c08335c into main Sep 6, 2026
12 checks passed
@drknowhow
drknowhow deleted the feat/compress-c0 branch September 6, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant