Skip to content

ADR-055: one result per text, and eval rows that name their stack (B-010, B-009, B-005) - #88

Merged
ethanblauw21 merged 9 commits into
masterfrom
feature/adr-055-dedupe-results
Oct 20, 2026
Merged

ethanblauw21 merged 9 commits into
masterfrom
feature/adr-055-dedupe-results

Conversation

@ethanblauw-hub

Copy link
Copy Markdown
Collaborator

Implements ADR-055 (backlog B-010 read-time half, B-009, B-005).

What changes

  • One result per text in a file (B-010). Search keeps one result when a file holds the same text more than once. This happens before the top-k cut, so duplicates no longer take up result slots. The same text in two different files is still returned twice (§2).

  • The iterative retriever uses the same identity (§5, added at @EDB's request). It tracked explored chunks by FQN, which every tier-2/3 slice shares (Full File_part_N). Explored chunks are now keyed on file and text, so a slice is no longer skipped as "already explored" when a different slice was.

  • Eval rows name their stack (B-009). tools/eval_common.stack_provenance() stamps each row with:

    • the model ids;
    • summarization_enabled;
    • fusion_mode and the four fusion weights.

    real_repo_eval records the fusion mode per arm.

  • Two stale pointers fixed (B-005).

Tests

  • Full suite: 720 passed, 1 skipped (Windows, CPU). flake8 clean. Conformance, resolution and L5X teeth baselines all hold.
  • New tests: tests/test_iterative_explored.py (5) and an extended tests/test_eval_common.py, plus the dedupe tests.
  • No MCP tool signature changed.

Still open (left in the ADR)

  • Collapsing identical text across files.

🤖 Generated with Claude Code

claude and others added 9 commits October 20, 2026 20:05
Proposed. Covers B-010 (read-time dedup only), B-009 (eval provenance)
and B-005 (two stale doc pointers).

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-055]
A file smaller than the tier-2 window has identical tier-2 and tier-3
chunks, and both were returned (B-010). The retriever now collapses
hits with the same file and text before each cut in _rerank and
_fuse_summaries. The most specific tier stands, at its group's best
position and score, and the freed slot refills from the next distinct
hit. Copies in other files are kept, since find_similar_code and the
per-file scan tools need them.

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-055 src/hybrid_retriever.py]
append_baseline now writes embedder_model_id, embedder_dim,
reranker_model_id, reranker_enabled and summarizer_model_id into each
row (B-009), read from the same load_indexer_config() the run used. A
field the record already has wins, so the real-repo and CoIR harnesses
record whether the reranker was on for that arm themselves. Existing
benchmarks/ rows are left as they are. CONTRIBUTING 4.2 says so.

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-055]
The study doc's flag asked for a correction that ADR-008 and ADR-017
already carry, and adr-backlog.md named the tier amendment against
ADR-004, which is CI observability; the tier model moved to ADR-017
(B-005).

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-055]
Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-055]
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

[ADR-055]
A tier-2/3 scope is a positional label every file shares, so keying on
scope dropped every other file's whole-file chunks from later rounds and
could end the loop early. Use the (file, text) identity ADR-055 dedups on.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

[ADR-055 src/iterative_retriever.py]
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

[ADR-055]
@ethanblauw21
ethanblauw21 merged commit af5d820 into master Oct 20, 2026
6 checks passed
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.

3 participants