Local Scout: hold a duplicate of an unread safety report, not only a reject
Back to our planProblem
A police report whose page was not read can still be dropped without anyone seeing it. It happens when the curate step answers duplicate instead of reject. The gate (intelligence/runner/lib/gate.mjs) holds only reject for an item from an always-held source without the page text, and the pipeline sends duplicate to none. The model picks the decision, so a mistake or an instruction planted in the report text can trigger it.
Found by the post-merge review of #1481 (review 6071472006). Guard rail 8: a breach found after merge is fixed first, in its own PR.
Failing inputs
- Gate:
item({ candidate: { sourceId: 'madison-police-incident-reports' }, curation: curation({ decision: 'duplicate', safety: true, targetCollection: 'posts', targetId: 1 }) }), with noknownand noreportPage.gateItemreturns routenone. - Whole run: feed item
UPDATE: Burglary/UPDATE: Officers have made an arrest., the report page answering 404,cms.knownnull, and curate answeringduplicatewithtargetCollection: 'events', targetId: 1. NoreportItemis sent.
Proposed fix
Hold duplicate as well as reject when the item comes from an always-held source and verify was not given the report page. Update the gate's reason text, flip the policeGate expectation that pins "not held for any other decision", and add the whole-run test above.
Existing work compared
Extends the gate rule added in #1481; no other open issue covers it.
Acceptance criteria
- Not done: Both failing inputs above end as
needs-reviewand reach the editor's review queue. - Not done: A
duplicatestands when the page text reached verify. - Not done: Tests pin both cases. Mechanical mutants of the changed lines are killed or shown equivalent with a tried input.
- Not done: The README, the gate comment and
coverage.mdrule 6 say that a report whose page was not read can only end in review, whatever curate decides.
Files likely touched
intelligence/runner/lib/gate.mjsand its tests (policeGate.test.mjs,policeRun.test.mjs)intelligence/runner/README.md,intelligence/coverage.md
Must not touch
- The site (
src/), and the decided routing ofrejectandduplicatefor items whose page text reached verify.
Generated by Claude Code, opens in a new tab