Skip to content

A work order's own Refinement: URL is model-written prose no gate checks, so it can cite a comment on an entirely different issue

Id: TD-PPagop-26082902 · Status: resolved · Filed: 2026-08-29 · Resolved: 2026-09-28 · Ref: #1905

What. The Refinement: line the Co-Ordinator writes into an issues-source work order’s context is free prose. Requirement 17f’s traceability gate (refinement_traceability_fault, lib/candidate-select.sh) validates the recorded refinement — the comment_url field of the refinements map, where it already rejects a cross-item URL (names issue #%s, not #%s) and a comment body that is not present verbatim in context/acceptance. It never reads the URL the model typed into the context prose, so nothing compares that URL to the item the work order is about.

Why it matters. It happened on this cycle. The work order for agent-ops#876 (cycle 20260828T125100Z-ockham-container-2486) carried:

**Refinement:** https://github.com/Poetic-Poems/agent-ops/issues/876#issuecomment-5452331924

Comment 5452331924 is real, but it belongs to agent-ops#911 — a decision about lib/standdown.sh’s disk-space gate — and issue #876 had no comments at all when the work order was assembled. Both stages read it: the Implementer followed the link, found unrelated content, and proceeded on the issue body alone (noting it in its own summary, PR #919); the Reviewer spent a second round trip confirming the same thing. Every stage that trusts the link instead pays for a wrong specification, and the failure is silent — the URL’s shape is valid, its target exists, and only fetching it against the item reveals the mismatch.

Where. Two seams, neither currently covered:

  • Emission: the Co-Ordinator composes the Refinement: line (prompts/coordinator.md) with no constraint tying its URL to the item it is writing the work order for.
  • Checking: refinement_traceability_fault (lib/candidate-select.sh) applies its cross-item test to .comment_url from the refinements map only. A work order whose map entry is absent, or whose map entry is correct while the prose URL is not, passes the gate untouched.

Distinct from TD-PPagop-26082819, which is about a recorded comment_url that names no comment (a bare issue URL): the shape here has a well-formed #issuecomment- anchor and a live comment behind it, so that item’s suggested anchor check would not catch it. Also distinct from TD-PPagop-26082603, which is about the recorded comment_url not being in the HTML permalink form at all.

Suggested fix. Extend the requirement-17f gate to the prose it hands the Implementer: scan a candidate’s context/acceptance for issues/<n>#issuecomment-<id> URLs and fault the candidate where <n> is not the item, reusing the message and the retry-next-cycle behaviour the recorded comment_url mismatch already has. That is a purely textual check needing no extra gh call, and it fails in the safe direction: a work order citing another issue’s refinement is exactly the cross-item swap the gate exists to catch. A test should pin it in both directions — a context citing the item’s own comment passes, one citing another issue’s comment faults.

Noticed while reviewing PR #919 (issue #876), whose work order carried the mislinked URL described above.

Migrated to https://github.com/Poetic-Poems/agent-ops/issues/1027.