Gather scripts interpolate branch prefixes into jq programs as raw strings, so a prefix containing a double quote silently degrades the source to []
Id: TD-PPagop-26082709 · Status: resolved · Filed: 2026-08-27 · Resolved: 2026-09-24 · Ref: https://github.com/Pullwright/agent-ops/pull/1838
All four gather scripts build their candidate filter by splicing shell variables straight into the jq program text — e.g. td_clause=" or (.headRefName | startswith(\"$tech_debt_branch_prefix\"))" and the equivalent inline startswith(\"$branch_prefix\") (scripts/gather-review-feedback.sh, gather-merge-conflicts.sh, gather-dequeued.sh, gather-abandoned-drafts.sh; the pattern predates PR #835, which doubled the number of interpolated prefixes by adding the td_clause form). Neither branch_prefix nor tech_debt_branch_prefix carries a schema pattern or a doctor.sh check, so a value containing a double quote or backslash produces an invalid jq program; the scripts’ fail-safe || true/|| echo '[]' guards then turn that into an empty candidate list — the source silently never fires, exactly the []-on-error trap the scripts’ own comments warn about. Not exploitable (config is operator-authored) and no behaviour change at any sane prefix, but the failure mode is invisible. Suggested fix: pass the prefixes into jq with --arg and use startswith($p) (dropping the clause only when the shell variable is empty, as now), or add a schema pattern restricting both keys to jq-safe characters — either closes the silent-[] path.
Noticed while the Approver was judging https://github.com/Poetic-Poems/agent-ops/pull/835.
Migrated to https://github.com/Poetic-Poems/agent-ops/issues/1007.