Skip to content
SprecherEast
Issue 1491

Local Scout: hold a duplicate of an unread safety report, not only a reject

Back to our plan
Done
bugtoolingpriority: high

Problem

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 no known and no reportPage. gateItem returns route none.
  • Whole run: feed item UPDATE: Burglary / UPDATE: Officers have made an arrest., the report page answering 404, cms.known null, and curate answering duplicate with targetCollection: 'events', targetId: 1. No reportItem is 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-review and reach the editor's review queue.
  • Not done: A duplicate stands 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.md rule 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.mjs and 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 of reject and duplicate for items whose page text reached verify.

Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab