fix(ooda): dedup no-progress breaker issue filing via GitHub-durable goal-key backstop (#16) - #4971
Open
rysweet wants to merge 1 commit into
Open
Conversation
…h a GitHub-durable goal-key backstop The board-local `WipRef` suppression marker stops the UNCLEAR-CRITERIA duplicate-issue storm only while the goal id is stable and the goal board survives — two conditions that fail under goal-id churn (a fresh id each cycle has no marker) and a goal-board reset (the marker is erased), letting the breaker re-file identical `ooda-stuck` issues. Add an additive, non-breaking second suppression guard: - `fold_goal_identity` (goal_curation::no_progress_breaker): pure, total, injection-safe folding of a churny `ActiveGoal.id` to `sha256[..8]` = 16 lowercase hex, mirroring `stewardship::failure_signature`. Safe to embed and to interpolate into a `gh --search` argument (SR1). - `NoProgressIssueFiler::issue_open_with_marker` trait method, default `false` so every existing impl/fake is unchanged. `GhIssueFiler` implements it as a direct argv-only `gh issue list --state open --label ooda-stuck --search '<marker> in:body' --json number,body` query, confirming the match against the strongly-consistent JSON `body` (`body_contains_marker`); fails OPEN on any error (SR2/SR4/SR5). - Two-guard filing gate in `escalate_with_tracking_issue`: board-local `WipRef` fast path first (zero steady-state API calls, SR7), backstop only on a miss; a backstop hit re-seeds the `WipRef` and suppresses re-filing. The filed body embeds a trailing `ooda-goal-key: <folded_id>` line so a later churned/reset cycle recognises the breaker's own open issue. - Promote `redact_token` / `redact_uuids` to `pub(crate)` (stewardship::dedup) so goal_curation can reuse them for body redaction (SR3/SR6) — non-breaking visibility widening. Tests cover first-filing, duplicate suppression across id churn / board reset, the zero-API fast path, fail-open, and the pure fold contract (charset/determinism/no-leak). Docs added for the concept, how-to, and API reference, wired into mkdocs nav. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📊 Coverage Summary
Coverage data from CI run. Test files matching |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the no-progress-breaker / stewardship issue filer re-filing identical GitHub issues every OODA cycle (issue spam), e.g. repeated
OODA no-progress breaker UNCLEAR-CRITERIAissues for one goal and repeated[stewardship] recurring_goal_reblockissues sharing one stewardship-signature.Adds an additive, non-breaking second suppression guard so the breaker deduplicates by identity key before filing:
fold_goal_identity(goal_curation::no_progress_breaker): pure, total, injection-safe fold of a churnyActiveGoal.id→sha256[..8](16 lowercase hex), safe to interpolate into agh --searchargument.NoProgressIssueFiler::issue_open_with_markertrait method, defaultfalseso every existing impl/fake is unchanged.GhIssueFilerimplements a direct argv-onlygh issue list --state open --label ooda-stuck --search '<marker> in:body'query, confirming the match against the strongly-consistent JSONbody; fails OPEN on any error.escalate_with_tracking_issue: board-localWipReffast path first (zero steady-state API calls), GitHub-durable backstop only on a miss. Survives goal-id churn and goal-board reset.stewardship::dedupredaction (redact_token/redact_uuidswidened topub(crate)) forrecurring_goal_reblockstewardship-signature dedup.Behavior
Tests
tests_no_progress_breaker.rsandooda_loop/no_progress.rscover: first-filing, duplicate suppression across id churn / board reset, the zero-API fast path, fail-open, and the pure fold contract (charset/determinism/no-leak).Constraints honored
print!/println!(structured tracing + OpenTelemetry only).Refs #16
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com