An item-refined event for an issues-source item can carry a comment_url that names no comment, creating a phantom refinement the thrash guard then defends
Id: TD-PPagop-26082819 · Status: resolved · Filed: 2026-08-28 · Resolved: 2026-08-29 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/950
What. refinement_record_fields (lib/refinement.sh) takes
comments_posted[0] from the Refiner’s verdict verbatim as comment_url,
and the corroboration bar at its issues-source call site checks only that the
field is non-empty before logging item-refined. A verdict whose
comments_posted[0] is the bare issue URL — no #issuecomment- anchor, so
it cannot point at a comment — therefore passes the bar and is recorded as a
refinement even when no specification comment was ever posted.
refinement_second_pass_refused (the requirement-36b thrash guard) then
reads only whether refined_before is set, so from that record onward the
pipeline refuses to write the specification the record falsely claims exists,
and the only release is a human closing an escalation about the item.
Why it matters. This happened live: the item-refined event of
2026-08-26T08:45:09Z for agent-ops#818 (cycle
20260826T064910Z-poetic-1-186841, by: refiner) carries
comment_url: https://github.com/Poetic-Poems/agent-ops/issues/818, at a
moment when the issue had zero comments. No specification for #818 was ever
written, the guard barred the pipeline from writing one, and unblocking cost
a full Enabler diagnosis plus an owner round-trip (escalation #847). The
failure is silent until an item stalls: the corroboration bar exists
precisely to catch “nothing was posted for the Co-Ordinator to find”, and
this shape walks through it.
Where. Two seams:
- Recording: the issues-source corroboration check in the Refiner verdict
handling (
lib/refinement.sh, thecomment_url-is-empty test in therefinedcase) andrefinement_record_fieldsitself, which performs no shape check oncomments_posted[0]. - Reading:
refined_beforeis derived inlib/cycle-state.shas the latestitem-refinedevent for the repo+item, with no validation of the recorded fields — so phantom records already in the fleet log (e.g. #818’s) keep their blocking effect even after the recording side is fixed.
Suggested fix. At the recording seam, require an issues-source
comment_url to actually name a comment (an #issuecomment- anchor, or an
API comment URL) before logging item-refined; anything else falls into the
existing refined-uncorroborated warning path, which already returns the
item to the pool. At the reading seam, have the refined_before derivation
ignore an issues-source item-refined whose comment_url lacks a comment
anchor, which self-heals phantom records already in the log without editing
history. A test should pin both: a verdict carrying the bare issue URL is not
recorded as refined, and a logged phantom does not set refined_before.
Noticed while resolving escalation #847 (the #818 phantom refinement); the Enabler’s diagnosis on https://github.com/Poetic-Poems/agent-ops/issues/818#issuecomment-5443854845 requested this record.