fix(stewardship): dedup search must use a bare signature, not a qualifier (#4962) - #4980
Conversation
…fier (#4962) The stewardship issue-dedup search built its `gh issue list --search` term as `stewardship-signature:<sig> in:body`. GitHub issue search parses a leading `<word>:` token as a search *qualifier*, so `stewardship-signature:<sig>` was treated as an unknown qualifier and matched NOTHING. The fast signature search therefore always returned empty, and with 654 open issues the strongly-consistent RecentOpen(100) fallback could not see the older tracking issue either — so every Overseer re-observation of the same re-blocked goal re-filed a fresh `[stewardship] recurring_goal_reblock in simard::overseer` issue (the observed churn storm: #4962/#4956/#4951/#4945/#4942 and #4957). Use the bare 16-hex signature as a full-text term (`<sig> in:body`), matching the already-correct query in supply_chain_steward::gh. A 64-bit hex signature is specific enough to match only the intended tracking issue. Additive / non-breaking: query semantics only; issue-body marker format and the RecentOpen fallback are unchanged. Adds a regression test pinning that the search term never re-introduces the `stewardship-signature:` qualifier. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Step 17b — Comprehensive Code Review: APPROVE (posted as comment; author cannot self-approve) ✅Reviewed the full diff of Root-cause & fix — correct
Logic correctness — verifiedThe bare full-text search is safely backstopped: Review checklist
CIAll 18 required checks green; No blocking issues. LGTM — recommend merge. The regression test locks in the contract so this specific bug cannot silently return. |
Step 17c — Security Review: PASS ✅ (no vulnerabilities)Security-focused review of PR #4980 ( Checklist
VerdictNo new vulnerabilities. No injection, no secret exposure, no auth changes. The broadened search is safely backstopped by the exact-marker dedup gate. Approved from a security standpoint. |
Step 17d — Philosophy Guardian Review: PASS ✅Evaluated the sole changed file Compliance Checklist
Notes
Verdict: APPROVE — fully philosophy-compliant. No simplification or de-risking required. |
…ithout marker (#4962) The dedup search was broadened to a bare 16-hex full-text term, so GitHub may surface issues that merely mention the hex without the durable `stewardship-signature: <sig>` marker. That makes find_existing the sole guard against a false-positive dedup match, which would silently suppress filing a real tracking issue. Pin the exact-marker rejection contract. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📊 Coverage Summary
Coverage data from CI run. Test files matching |
Problem (Observed Problem #2 — stewardship issue-churn)
The Overseer re-filed identical
[stewardship] recurring_goal_reblock in simard::overseerissues every tick — a churn storm of 30+ open duplicates (#4962, #4956, #4951, #4945, #4942, plus[stewardship] workstream_gap:issue#4957), all sharing the samestewardship-signature: cfa5358a3b59894c. So the dedup key was stable; the existence check was broken.Root cause (confirmed live)
src/stewardship/gh_client.rs::issue_list_argsbuilt the dedup search as:GitHub issue search parses a leading
<word>:token as a search qualifier, sostewardship-signature:<sig>is treated as an unknown qualifier and matches nothing. Verified against the live repo:--search "stewardship-signature:cfa5358a3b59894c in:body"→[]--search "cfa5358a3b59894c in:body"→ 30+ existing duplicatesWith 654 open issues, the strongly-consistent
RecentOpen(100)fallback also can't see the older tracking issue, so every tick re-files.Fix
Search for the bare 16-hex signature as a full-text term (
"<sig> in:body") — the form already used correctly insupply_chain_steward::gh. A 64-bit hex signature is specific enough to match only the intended tracking issue.Additive / non-breaking: query semantics only. Issue-body marker format and the
RecentOpenfallback are unchanged.Tests
issue_list_args_uses_search_for_signature_queryto the corrected argv.signature_search_is_bare_fulltext_not_a_qualifierpinning that the search term never re-introduces thestewardship-signature:qualifier.cargo test --lib stewardship::gh_client→ 22 passed.cargo fmt+clippy -D warningsclean (pre-commit).The pre-existing duplicate issues are being closed/deduped as cleanup.
Refs #4962 #4956 #4951 #4945 #4942 #4957
Step 16b: Outside-In Testing Results
Detected toolchain: Rust (
Cargo.toml/Cargo.lockat root, packagesimard, edition 2024, cargo 1.95.0). Changed file:src/stewardship/gh_client.rs. Per the qa-team skill, Rust CLI repos usecargo testas the outside-in boundary.Chosen strategy: Exercise the module tests (
cargo test) for the fast/regression boundary, plus a real end-to-endghCLI comparison againstrysweet/Simardto prove the search-term change behaves correctly at the true consumer boundary a user/Overseer hits.cargo test --lib stewardship::gh_client22 passed; 0 failed— includes newsignature_search_is_bare_fulltext_not_a_qualifiercargo test --lib stewardship::169 passed; 0 failedgh issue list -R rysweet/Simard --state open --search "stewardship-signature:cfa5358a3b59894c in:body"vs.... --search "cfa5358a3b59894c in:body"#4581, the original tracking issue). Confirms dedup now resolves the prior issue instead of re-filing.Fix count: 0 — all scenarios passed on the first run; no code changes were required during outside-in testing.
CI: 18/18 required checks passing;
mergeable = MERGEABLE.