Example 07-context-budget declares its own failure mode in example.mjs:
Two individually useful snippets can duplicate each other. This small example scores novelty against alreadyKnown, not pairwise redundancy.
No case currently shows that failure. Add one. Give the state two non-mandatory snippets that both add the same new fact (say, the same deploy freeze date, worded differently), neither of which is in alreadyKnown, with a budget that fits both. The novelty scores will both be high, and the greedy packer at example.mjs#L24-L25 will select both.
Set expected and expectedDetails.selected to what the policy actually does today, and use the note to say plainly that this is the documented limitation, not the ideal answer. The CONTRIBUTING guide asks every example for "an ambiguous or failure case", and this is the natural one for 07.
If you want to go further, propose in the PR how a second pass could de-duplicate selected snippets pairwise without adding a dependent question to the same request. That part is optional.
Done when
- New case in
cases.mjs with authored Score fixtures (a probabilities array per rubric level, mean consistent with the distribution, as the existing cases do).
npm run check passes and the regenerated example README lists the new case.
How to work on this
- Fork, then
git clone and run npm run check (Node 20.17+, no install step, no API key needed).
- Make the change, run
npm run check and npm run docs (CI fails if a generated example README is stale).
- Open one focused PR. Say what you verified, and mention any substantial AI assistance (see CONTRIBUTING.md).
Comment here if you want to take it, and ask anything that is unclear.
Example 07-context-budget declares its own failure mode in
example.mjs:No case currently shows that failure. Add one. Give the state two non-mandatory snippets that both add the same new fact (say, the same deploy freeze date, worded differently), neither of which is in
alreadyKnown, with a budget that fits both. The novelty scores will both be high, and the greedy packer atexample.mjs#L24-L25will select both.Set
expectedandexpectedDetails.selectedto what the policy actually does today, and use thenoteto say plainly that this is the documented limitation, not the ideal answer. The CONTRIBUTING guide asks every example for "an ambiguous or failure case", and this is the natural one for 07.If you want to go further, propose in the PR how a second pass could de-duplicate selected snippets pairwise without adding a dependent question to the same request. That part is optional.
Done when
cases.mjswith authored Score fixtures (aprobabilitiesarray per rubric level, mean consistent with the distribution, as the existing cases do).npm run checkpasses and the regenerated example README lists the new case.How to work on this
git cloneand runnpm run check(Node 20.17+, no install step, no API key needed).npm run checkandnpm run docs(CI fails if a generated example README is stale).Comment here if you want to take it, and ask anything that is unclear.