Skip to content

Test sources are labelled in the answer and rerank prompts - #186

Merged
trick77 merged 2 commits into
masterfrom
feat/test-source-label
Sep 17, 2026
Merged

trick77 merged 2 commits into
masterfrom
feat/test-source-label

Conversation

@trick77

@trick77 trick77 commented Sep 17, 2026

Copy link
Copy Markdown
Owner

A production thread cited registry_test.go for a rejection that sits in registry.go beside it. Fusion demotes test hits and the walk orders them last, but nothing after that says what a source is, so the answer model read the test as the mechanism and the reranker can promote a test whose excerpt describes the code better than the code does.

Both prompt headers now carry (test) on retrieve.IsTestPath, with one rule each: a test shows what the code is expected to do; a claim about the mechanism cites the code, a test beside it at most as a second marker; a claim standing only on a test says so; a question about testing is answered from tests.

Tests stay indexed and citable. Excluding them was considered and rejected: the same thread's third turn asked how profiles are tested, and its answer had no source but the tests.

Flow corpus, TestEvalMeasureAnswers twice per arm against same-day master: rubric 27/30 and 27/30 on master, 28/30 and 28/30 with the label; test citations 5 to 3, the remaining ones named as tests in the sentence. TestFlowGathered 28/30 on both sides. Tables in docs/measurements/2026-09-17-test-label.md.

Fusion demotes a test hit and the walk orders it last, but nothing after
that says what it is: the answer prompt and the reranker header print
repo, path, line and symbol, so the model reads a test fake as the client
and cites the test where the mechanism sits in the file beside it.

Both headers now carry (test) on retrieve.IsTestPath, and each prompt gets
one rule: a test shows what the code is expected to do, a claim about the
mechanism cites the code, a claim standing only on a test says so, and a
question about testing is answered from tests. Tests stay indexed and
citable; the exclusion was considered and rejected on a thread whose
question asked how profiles are tested.
Rubric 27/30 twice on master, 28/30 twice with the label; test citations
5 to 3, the remaining ones named as tests in the sentence. TestFlowGathered
28/30 on both sides. AGENTS.md records that tests are labelled, never
excluded.
@trick77
trick77 merged commit 7f2a492 into master Sep 17, 2026
2 checks passed
@trick77
trick77 deleted the feat/test-source-label branch September 17, 2026 16:55
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