fix(ooda): ensure ooda-stuck label before filing tracking issues (#4472) - #4478
fix(ooda): ensure ooda-stuck label before filing tracking issues (#4472)#4478rysweet wants to merge 3 commits into
Conversation
Automatic checkpoint to preserve work in progress. Tests and implementation saved before refactoring phase.
Consolidate the duplicated labeled/unlabeled gh-args decision (previously copy-pasted verbatim at all three tracking-issue filing sites) into a single LabelEnsure::issue_create_args helper. This is the exact multi-site drift pattern that caused issue #4472, so a single source of truth removes the recurrence risk. Each site keeps its own tracing target and result-handling style. Adds focused unit tests for the labeled and degraded (unlabeled but still-filed) argv. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The #4472 reference doc described the enum as `AlreadyPresent` with a struct variant `Unavailable { reason }`, a `Clone, PartialEq, Eq` derive, and `ensure_gh_label(label: &str)`. The implemented API in src/ooda_actions/gh_label.rs uses `AlreadyExists`, tuple variant `Unavailable(String)`, `#[derive(Debug)]` only, and `label: &'static str`. Correct the reference doc and docs/index.md summary so grepping for the variant/signature matches the code. Docs-only; no code or behavior change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📊 Coverage Summary
Coverage data from CI run. Test files matching |
🔎 Comprehensive Code Review (Step 17b)Verdict: ✅ Merge-ready. Reviewed all 6 changed files; built and re-verified locally on What was reviewedFix for #4472 — the three Local verification
Checklist
Security
Non-blocking observations (no change required)
Docs
No blocking issues found. Approve for merge. |
🔐 Security Review (Step 17c) — ✅ PASS, no blocking findingsReviewed the full change set ( Checklist
Findings
VerdictSecurity-approved for merge. The PR removes a real operational-security weakness (silent broken escalation that hid stuck goals from operators) and introduces no injection, auth, or data-exposure regressions. |
🧭 Philosophy Guardian Review (Step 17d)Verdict: ✅ PASS — merge-ready. The change embodies ruthless simplicity and the bricks & studs pattern with zero over-engineering. Compliance checklist
Non-blocking observationEach of the three sites repeats the Philosophy compliance confirmed. No changes required. |
Summary
Concise workflow-generated PR for documentation.
Issue
Closes #4472
Changed files
Diff stat
Behavior
Implemented behavior through these branch commits:
eb55d0c docs(ooda): align tracking-issue label doc with actual LabelEnsure API
94d71a2 refactor(ooda): centralize gh issue-create arg building in LabelEnsure
fa4eb37 wip: checkpoint after implementation (steps 7-8)
Validation
ℹ NODE_OPTIONS=--max-old-space-size=32768 (saved preference). To change: /home/azureuser/.amplihack/config
I'll start by checking the branch and the changes that need testing.
● Get branch name and git status (shell)
│ cd /home/azureuser/src/Simard-deploy-4049/worktrees/feat/issue-4472-ooda-no-progress-breaker-can
│ not-file-its-operator && git branch --show-current && echo "---STATUS---" && git --no-pager
│ status && echo "---DIFF STAT---" && git --no-pager diff --stat HEAD
└ 9 lines…
● Show recent commits and diff stat vs main (shell)
│ cd /home/azureuser/src/Simard-deploy-4049/worktrees/feat/issue-4472-ooda-no-progress-breaker-can
│ not-file-its-operator && git --no-pager log --oneline -5 && echo "---DIFF vs origin/main---" &&
Risk
No high-risk subsystem pattern detected from changed paths.
Checklist
This PR was created as a draft for review before merging.
Step 16b: Outside-In Testing Results
Detected toolchain: Rust CLI (
Cargo.toml/Cargo.lockat root,cargo 1.95.0,rustc 1.95.0). Per the qa-team skill's repo-type detection, native Rust tests (cargo test) are used — the gadugi-agentic-test framework is not required.Chosen strategy: Exercise the changed tracking-issue escalation path from the outside-in consumer boundary via the crate's native test suite, then run the exact CI gates (
cargo fmt --check,cargo clippy -D warnings) that guard merge. The threegh issue createsites (deterministic safeguard,EngineerLifecycleDecision::OpenTrackingIssue, and the no-progressGhIssueFiler) all now route through the sharedLabelEnsure::issue_create_argsdecision, so validating that decision + its classification covers the user-observable behavior (issue filed with label when present, still filed unlabeled when the label can't be ensured — never silently dropped).already exists→AlreadyExists (idempotent, case-insensitive), genuine failure→Unavailable with preserved non-empty cause; labeled vs degraded-unlabeled argv buildingcargo test --lib gh_label --lockedtest result: ok. 8 passed; 0 failedcargo test --lib no_progress --lockedtest result: ok. 112 passed; 0 failedcargo fmt --all -- --checkcargo clippy --all-targets --all-features --locked -- -D warningsFinished— exit 0, zero warningsNon-breaking / safety checks: New code emits structured
tracing::info!/tracing::warn!(targetssimard::ooda_brain,simard::ooda) only — no newprint!/println!/eprintln!and no new panics (the pre-existing successeprintln!in the deterministic safeguard is unchanged). The degraded path files the issue without--labelrather than silently dropping it, and theUnavailablecause is always non-empty so failures stay operator-visible.Fix count: 0 — all scenarios and CI gates passed on the first run; no code changes were required during outside-in testing.