requirement 17f's traceability verdict is unobservable in both directions — a false fault silently starves an item, and a permanently degraded gh read silently disarms the check
Id: TD-PPagop-26082307 · Status: resolved · Filed: 2026-08-23 · Resolved: 2026-08-26 · Ref: #814
Requirement 17f (refinement_traceability_fault, agent-cycle.sh,
agent-ops#626, PR #702) decides whether a model-composed candidate’s
context/acceptance really carries that item’s own recorded refinement, by
testing for the refinement text verbatim (jq contains) — a spec
straight out of refinements, or the live-fetched body of the comment its
comment_url names. Both of its outcomes are effectively invisible:
- A false fault costs the item its turn, quietly. The text being matched
against is a model’s paste of a multi-kilobyte spec or issue thread.
Ordinary paste drift — a reflowed line, a normalised list marker, a trimmed
trailing space, a thread long enough that the model elides part of it — is
enough to defeat
containson a work order that is otherwise perfectly correct and names the right item. So is a refinement comment edited between the cycle’s owngather-issues.shread (what the Co-Ordinator was handed and pasted) and the claim-timegh apire-read (what the check compares against). The candidate is then skipped with aclaim-skipped/cause: "untraceable"event and nothing else — nowarning, no counter, no dashboard tile. A candidate that drifts the same way every cycle starves indefinitely, and the log line reads identically to the genuine cross-item swap the requirement exists to catch. - A degraded
ghread disarms the check, also quietly. The comment fetch isgh api … 2>/dev/null || true, and an empty body returns “no fault” (deliberately: it fails open, the direction every other degradedghread in this pipeline takes). But nothing is logged when it happens, so an expired token, a scope change or a sustained rate limit turns requirement 17f into a permanent no-op that still reads as a passing check. Acomment_urlthe check cannot parse disarms it the same way and more quietly still: both the free structural test and the fetch key offsedpatterns that expect the HTML permalink form…/issues/<n>#issuecomment-<id>, so acomment_urlin any other shape — theapi.github.com/…/issues/comments/<id>form, say — yields neither an issue number nor a comment id, and the function returns “no fault” having tested nothing at all. Requirement 17f records the fail-open on a failed read, but not this one. Contrastagent-cycle.sh’s owndefault_branch/commit_tsreads, which capture stderr and route it throughguard_warnprecisely so a degraded read is visible.
Why it matters
Section titled “Why it matters”The requirement’s whole value is that it fires rarely and means something when it does. Neither outcome can currently be distinguished from the healthy case without reading raw cycle logs by hand, which is exactly the position agent-ops#626 was in before it was diagnosed — a stalled item whose cause was invisible until a human went looking.
agent-cycle.sh—refinement_traceability_fault(thecontainstests and thegh apifetch), and its call site in the claim loop (theclaim-skipped/untraceableevent).docs/IMPLEMENTATION-PIPELINE-SPEC.md— requirement 17f, acceptance check 7g.
Suggested fix
Section titled “Suggested fix”Two independent pieces, either useful alone:
- Make the comparison tolerant of the drift that is not a swap — compare with runs of whitespace collapsed, or require a distinctive contiguous slice of the refinement rather than the whole of it. A cross-item swap (the #571/#529 shape) shares no such slice, so detection power is essentially unchanged while ordinary paste drift stops faulting.
- Make both outcomes observable — log a
warningwhen the comment fetch degrades, and surface theuntraceableskip count whereclaim-skippedand the race-loss counters already surface (scripts/publish-dashboard.sh), so a rising rate is visible without grepping cycle logs.
Noticed by the Reviewer stage while reviewing PR #702 (https://github.com/Poetic-Poems/agent-ops/pull/702), which introduces requirement 17f; out of scope for that pull request, whose own remit is the cross-item join fault itself.