---ci---
phase: 5
milestone: v0.2
status: execute
persona: backend-engineer
task: review-P0s
requirements:
covered: [REQ-20, REQ-23, REQ-32]
---/ci---
Final review found the milestone's two flagship trust
guarantees unenforced - both now attack-proven:
A1 (P0): quote anchoring was tautological end-to-end - the
report's [p-N] markers returned the STORED passage's own quote to
the anchorer (always ratio 1.0). extract_report_claims now takes
the WRITER's text adjacent to each marker (header-stripped
fragment) and anchors THAT against the cited passage; fabricated
quotes riding real passage IDs now flag unanchored and FAIL the
export gate (attack test added; verbatim-quote anchor test added).
C2 (P0): the REQ-23 gate had the wrong denominator - liveness
probed cited URLs but the ledger counted ALL visited pages,
defaulting unprobed to dead (deep-report runs failed their own
gate). Ledger entries now cover cited URLs only; ratio and
citations_checked are cited-page-scoped.
C1 (P0): zombie runs - planner JSON of the wrong shape, searching-
step network errors, and EngineError escaped without FAILED
persist or run_error. Plan parsing validates shape (dict of
lists of str); run() has a catch-all -> FAILED + run_error.
S1 (P0): fetch adapters followed redirects with no re-guarding -
a search result 302ing to 169.254.169.254 became evidence. Both
adapters now hop manually with per-hop url_allowed + a 5-hop cap
(attack test added).
P1s: approve-with-plan over HTTP (422 on bad plan, REQ-14's
'edited' half); FAILED distinct from cancelled; question/context
length caps; probe wired into create_run for probe-capable
adapters + surfaced in /api/config (M6); README live-mode env
var corrected to NEXT_PUBLIC_ (M3) + honest fake-adapter note
(M5). 129 backend (14 adversarial) + 97 frontend green.