Repository navigation
Hold auto-fix when workflow prerequisite evidence is not a failed attempt - #9178
Merged
Merged
Conversation
…d … [ORB-24232] Hold auto-fix when workflow prerequisite evidence is not a failed attempt
…fest checks passed: attempt_id matches, HEAD equals candidate.commit, base is an ancestor of HEAD, and required_validation_commands is present (empty). The production fix routes the CI prerequisite evidence read's WorkflowEvidenceUnavailable error through hold_auto_fix_stop as DeliveryRefusal::CheckEvidenceInconclusive; carry_class keeps the Execution class for that cause, so the hold converts it, and the read happens before any reservation or mutation. The hold covers every WorkflowEvidenceUnavailable reason from that read, not only the running, superseded or non-failed text. This matches the typed contract (the error's reason is diagnostic only and callers branch on the type), so it is not a finding; the failure-rate metric will also stop counting permanent unreadable reasons from the same read, which the owner should know. One finding: the regression test drove only the running and superseded cases that AC1 names, and omitted the not-failed case. I added that case (run conclusion cancelled) to the same test and updated its doc comment; it passes through the same hold. The pre-fix failure is evidenced by the implementer's retained .orbit/tmp/test-before.log, which shows the running case failing with the Execution auto_fix_stopped message; I did not rerun a pre-fix reproduction. Docs checked: the delivery_check_evidence_inconclusive row in CONFIG.md and the stuck-job-runs runbook do not claim this stop fails the run, so no doc change was needed. On the final tree, all required checks passed: make ci-guards, cargo fmt check, rustfmt check on both changed .rs files, the focused regression test, clippy for lib and bins and for all targets, cargo doc, and the pr_landing infrastructure (12) and auto_fix (34) modules. Not run: make ci-lint and make ci-test-affected (baseline, excluded because the workspace guide forbids them as blanket gates); make goldens, screenshots and CodeQL do not apply. [ORB-24232] Findings: F1 Paths: crates/orbit-engine/tests/engine/pr_landing/infrastructure.rs Orbit-Review-Attempt: rvw-96e670e28e76-1 Orbit-Review-Crew: haiku@xhigh
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.
Task
ORB-24232 — Hold auto-fix when workflow prerequisite evidence is not a failed attempt
Description
pr_complete records a designed auto-fix stop as a failed run when workflow prerequisite evidence is not a failed attempt. The pull request stays open and the task stays in review, but the pipeline counts the run as a failure.
Evidence
Excerpt (redacted):
auto_fix_stopped: pull request #8661 cannot be repaired automatically (execution failed: workflow prerequisite evidence is unavailable (running, superseded or non-failed attempt)); no repair agent runs, the pull request stays open and the task stays in reviewMechanism
At HEAD f234743,
evidenceincrates/orbit-engine/src/executor/automation/vcs/operations/prerequisite.rsreturnsunreadable("running, superseded or non-failed attempt").recoverincrates/orbit-engine/src/executor/automation/vcs/pr/infrastructure.rsmaps that read withstopped_by, which wrapsstopped:stoppedbuildsOrbitError::Execution(auto_fix_stopped: ...). The same function already sends deadline and head-changed stops throughhold_auto_fix_stop. This evidence-unavailable path does not.Category
Misclassified hold. The stop is deliberate (no repair agent, PR stays open, task stays in review) and is stored as a run failure.
Change
Route this evidence-unavailable stop through
hold_auto_fix_stopwith a typed delivery refusal, the same way the neighboring stops inrecoverare held.Expected effect
Removes this signature from task_pr_pipeline's folded failure rate. It was 2 of 74 folded failures in the last 7 days (about 0.12 percentage points of that job's 4.6% rate).
Acceptance Criteria
Execution Summary
Click to expand
Base 85b767d, worktree clean at start (no pre-existing edits). Baseline
git status --short: empty.Root cause: in
recover(crates/orbit-engine/src/executor/automation/vcs/pr/infrastructure.rs), theci.prerequisite_evidenceread mapped its error withstopped_by, which builds OrbitError::Execution. Deliberate holds in the same function usehold_auto_fix_stop, so this stop was recorded as a run failure while the PR stayed open and the task stayed in review.Change:
unreadable_prerequisite_evidence_stophelper. AWorkflowEvidenceUnavailableread error is held withDeliveryRefusal::CheckEvidenceInconclusive(existing refusal, documented as "an auto-fix stop whose check evidence could not be read conclusively"); every other read error keeps its previous class viastopped_by. The evidence read call now uses the helper.missing_required_prerequisite_holds_unreadable_evidencedrives pr_complete (auto_fix) through the real provider adapter and fake gh for cases "running" and "superseded". It asserts DeliveryRefused { CheckEvidenceInconclusive }, the auto_fix_stopped message, no merge, task in review, no auto-fix attempt, and no rerun.Acceptance criteria:
execution failed: auto_fix_stopped: pull request #42 cannot be repaired automatically (execution failed: workflow prerequisite evidence is unavailable (running, superseded or non-failed attempt))(log: .orbit/tmp/test-before.log). After the fix it passes and returns DeliveryRefused/CheckEvidenceInconclusive (.orbit/tmp/test-after.log).Validation (run on this host, owner worktree):
scripts/build-budget.py -- cargo test -p orbit-engine --test engine missing_required_prerequisite_holds_unreadable_evidence(fail before, pass after)cargo test -p orbit-engine --test engine -- pr_landing auto_fix handoff_landing(200 passed)cargo test -p orbit-engine(90 lib + 4 + 414 engine, 0 failed, 3 ignored in lib)rustfmt --edition 2024 --checkon both changed .rs files;cargo fmt --all -- --checkscripts/build-budget.py -- cargo clippy -p orbit-engine --lib --bins -- -D warnings -D clippy::disallowed_methodsscripts/build-budget.py -- cargo clippy -p orbit-engine --all-targets -- -D warnings -A clippy::disallowed_methodsRUSTDOCFLAGS="-D warnings" scripts/build-budget.py -- cargo doc --no-deps -p orbit-enginemake ci-guardsgit diff --checkmake goldens(no CLI help, MCP text or golden surface changed), screenshots (no UI change), CodeQL (not security-tagged), task.final_validation_commands (pipeline runs them after commit).Reconciliation:
git status --shortshows exactly two modified files, both deliverable: crates/orbit-engine/src/executor/automation/vcs/pr/infrastructure.rs and crates/orbit-engine/tests/engine/pr_landing/infrastructure.rs. The only new files are logs under .orbit/tmp/ (gitignored, scratch). No context_files widening was needed: both paths are already selectors (symbol recover, and the infrastructure test file).Risks: the broadened hold changes the outcome for other evidence-unavailable reasons from the same read; they now hold for the next pass instead of recording a failed run. Confirm this is the intended class for the pipeline's failure-rate metric.
Validation
Branch Freshness
origin/agent-mainorbit/ORB-24232-5b37b61a