refinement_traceability_fault silently tests nothing when comment_url is not in the HTML permalink form
Id: TD-PPagop-26082603 · Status: resolved · Filed: 2026-08-26 · Resolved: 2026-08-29 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/950
refinement_traceability_fault (lib/candidate-select.sh, requirement 17f)
extracts the issue number and comment id it needs out of a comment_url
entry with two sed patterns that only recognise the HTML permalink shape,
…/issues/<n>#issuecomment-<id>:
url_issue="$(printf '%s' "$comment_url" \ | sed -n 's|.*/issues/\([0-9][0-9]*\)#issuecomment-.*|\1|p')"...comment_id="$(printf '%s' "$comment_url" \ | sed -n 's|.*#issuecomment-\([0-9][0-9]*\)$|\1|p')"[[ -n "$comment_id" ]] || return 0A comment_url recorded in any other valid shape — the REST form
https://api.github.com/repos/<owner>/<repo>/issues/comments/<id>, say —
yields neither an issue number nor a comment id from either pattern. The
function does not fault or warn on this: comment_id is simply empty, so
[[ -n "$comment_id" ]] || return 0 returns “no fault” having tested
nothing at all. A refinement recorded this way is therefore never actually
checked for traceability — the same “requirement 17f silently disarmed” gap
TD-PPagop-26082307 fixed for a failed gh read, but reachable here by a
refinements entry shaped this way rather than by a network fault, and
untouched by that fix.
lib/candidate-select.sh—refinement_traceability_fault’s twosedextractions and the[[ -n "$comment_id" ]] || return 0short-circuit.
Suggested fix
Section titled “Suggested fix”Recognise the REST comment-id shape (or any other shape refinements
entries can actually carry — check how comment_url is populated wherever
refinements is written) alongside the HTML permalink form, so a
recognised-but-differently-shaped URL is still checked rather than silently
waved through. A comment_url that matches neither known shape should be
treated the same way TD-PPagop-26082307 now treats a failed gh read: a
fault (untraceable), reported via guard_warn, not an assumed pass.
Noticed while resolving TD-PPagop-26082307 (PR raised alongside this record): that item’s own on-disk body already named this same shape gap under its second bullet, but the work order refining it into a scoped fix covered only the drift-tolerance and failed-read halves, not this one. Filed separately rather than folded in, to keep that PR’s diff to what its acceptance criteria actually asked for.