You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the flakiness (41.2% failure rate, 102sβ180s duration spread) of canary-rollout-tests.yml by making the single non-hermetic test in tests/canary_rollout.bats stop hitting the real GitHub API.
Root Cause
Diagnosed by running the full suite under a PATH trap that records any gh/git/sleep invocation not covered by a test's own stub. Exactly one of the 250+ tests leaks real calls:
orchestrator: evaluate warning for a fail-closed frontier does NOT claim PRE_EXISTING
It overrides _frontier_state but then calls the full cmd_evaluate ci-failure-analyst with no gh/git stub in PATH. Before reaching the overridden _frontier_state, cmd_evaluate resolves the candidate/channel tags (_resolved_channel) and the cut date (candidate_cut_date) via gh api on the agent's cross-repo host petry-projects/.github-private. On CI those become real network round-trips (11 gh api calls per run) whose auth/rate-limit/latency variance is nondeterministic β the source of both the failure rate and the duration spread. Every other test in the suite stubs gh/git; this one is the sole exception, contradicting the suite's own contract ("stubs gh/git via PATH β¦ without any real API access").
Implementation Checklist
Add a hermetic gh + git PATH stub to the leaking test (mirroring the established stub pattern in this file) so cmd_evaluate's channel/cut-date resolution stays local. The branch under test remains driven by the existing _frontier_state override; assertions are unchanged.
Tests to Write / Verify
Red: trap harness records 1 leaking test / 11 real gh calls before the fix.
Green: trap harness records 0 real gh/git calls after the fix.
Full bats tests/canary_rollout.bats suite stays green.
Assertions of the fixed test (BLOCKED, not PRE_EXISTING, cut date) still hold.
Note: this is a test-hermeticity fix β the shipped scripts (scripts/canary-rollout.sh, scripts/lib/canary-rollout.sh) are unchanged (behavior-preserving; Phase 2 exception noted).
Root cause: a single non-hermetic test. Of the 252 tests in tests/canary_rollout.bats, exactly one β orchestrator: evaluate warning for a fail-closed frontier does NOT claim PRE_EXISTING β invoked the full cmd_evaluate ci-failure-analystwithout a gh/git PATH stub. Because ci-failure-analyst is cross-repo hosted (petry-projects/.github-private), cmd_evaluate resolves the candidate/channel tags (_resolved_channel) and cut date (candidate_cut_date) via gh apibefore reaching the test's overridden _frontier_state. That produced 11 real network round-trips per run, whose auth/rate-limit/latency variance drove both the ~41% failure rate and the 102sβ180s duration spread. This was the only test violating the suite's documented hermeticity contract ("stubs gh/git via PATH; a dummy token satisfies the token precondition without any real API access").
Fix (behavior-preserving test hermeticity β Phase 2 exception). Added a benign gh+git PATH stub to that one test so candidate/channel/cut-date resolution stays local. The BLOCKED / "cut date" / not-PRE_EXISTING assertions are driven entirely by the existing _frontier_state override (triage="-" β indeterminate branch), so the stub changes nothing observable. Assertions unchanged. No shipped script touched (scripts/canary-rollout.sh and scripts/lib/canary-rollout.sh are byte-for-byte identical).
Verification
Check
Result
Network-leak trap (whole suite, trap gh/git on PATH)
Dev-Lead: cannot implement issue #945 β needs human attention
A stage timed out (exit 124) while implementing this issue. A timeout is treated as a first-class, non-retryable condition β retrying with the same budget would just time out again β so this escalates for human review on the first occurrence instead of wasting a same-budget retry.
This hit the max action budget. Split this issue into smaller, independently-implementable pieces, or raise vars.ACTION_TIMEOUT_SEC, then re-apply the dev-lead label.
Note: the engine had produced changes before the timeout. They were on branch dev-lead/issue-945-20260807-0756 on the runner and were not pushed, so they are not recoverable from this run (the runner is ephemeral). The redacted session snippet below shows what it attempted β treat it as context, not restorable output. Re-apply dev-lead after splitting the issue or raising the budget to regenerate the work.
β Auto-resolved by Fleet Monitor. This workflow's failure rate has been below the 10% threshold (or the workflow was removed) since 2026-08-08 (3 days) β the monitor stopped flagging it. Closing. It will reopen automatically if the workflow crosses the threshold again.
Activity
don-petry commentedon Aug 7, 2026
Dev-Lead Implementation Plan
Issue: #945 β [Fleet Monitor] petry-projects/.github β .github/workflows/canary-rollout-tests.yml
Scope
Fix the flakiness (41.2% failure rate, 102sβ180s duration spread) of
canary-rollout-tests.ymlby making the single non-hermetic test intests/canary_rollout.batsstop hitting the real GitHub API.Root Cause
Diagnosed by running the full suite under a PATH trap that records any
gh/git/sleepinvocation not covered by a test's own stub. Exactly one of the 250+ tests leaks real calls:It overrides
_frontier_statebut then calls the fullcmd_evaluate ci-failure-analystwith nogh/gitstub in PATH. Before reaching the overridden_frontier_state,cmd_evaluateresolves the candidate/channel tags (_resolved_channel) and the cut date (candidate_cut_date) viagh apion the agent's cross-repo hostpetry-projects/.github-private. On CI those become real network round-trips (11gh apicalls per run) whose auth/rate-limit/latency variance is nondeterministic β the source of both the failure rate and the duration spread. Every other test in the suite stubsgh/git; this one is the sole exception, contradicting the suite's own contract ("stubs gh/git via PATH β¦ without any real API access").Implementation Checklist
gh+gitPATH stub to the leaking test (mirroring the established stub pattern in this file) socmd_evaluate's channel/cut-date resolution stays local. The branch under test remains driven by the existing_frontier_stateoverride; assertions are unchanged.Tests to Write / Verify
ghcalls before the fix.gh/gitcalls after the fix.bats tests/canary_rollout.batssuite stays green.BLOCKED, notPRE_EXISTING,cut date) still hold.Note: this is a test-hermeticity fix β the shipped scripts (
scripts/canary-rollout.sh,scripts/lib/canary-rollout.sh) are unchanged (behavior-preserving; Phase 2 exception noted).Test Command
GH_TOKEN=dummy-token-for-stubbed-tests bats --print-output-on-failure tests/canary_rollout.batsdon-petry commentedon Aug 7, 2026
β Completion report β #945 (canary-rollout-tests.yml DEGRADED, 41.2% failure rate)
Root cause: a single non-hermetic test. Of the 252 tests in
tests/canary_rollout.bats, exactly one βorchestrator: evaluate warning for a fail-closed frontier does NOT claim PRE_EXISTINGβ invoked the fullcmd_evaluate ci-failure-analystwithout agh/gitPATH stub. Becauseci-failure-analystis cross-repo hosted (petry-projects/.github-private),cmd_evaluateresolves the candidate/channel tags (_resolved_channel) and cut date (candidate_cut_date) viagh apibefore reaching the test's overridden_frontier_state. That produced 11 real network round-trips per run, whose auth/rate-limit/latency variance drove both the ~41% failure rate and the 102sβ180s duration spread. This was the only test violating the suite's documented hermeticity contract ("stubs gh/git via PATH; a dummy token satisfies the token precondition without any real API access").Fix (behavior-preserving test hermeticity β Phase 2 exception). Added a benign
gh+gitPATH stub to that one test so candidate/channel/cut-date resolution stays local. The BLOCKED / "cut date" / not-PRE_EXISTINGassertions are driven entirely by the existing_frontier_stateoverride (triage="-"β indeterminate branch), so the stub changes nothing observable. Assertions unchanged. No shipped script touched (scripts/canary-rollout.shandscripts/lib/canary-rollout.share byte-for-byte identical).Verification
gh/giton PATH).dev-lead/scripts/dev-lead-lint.shshellcheck --severity=warning -x scripts/canary-rollout.sh scripts/lib/canary-rollout.shDiff:
tests/canary_rollout.bats, +22 lines (one test). No commit/push performed β the CI workflow handles git operations.don-petry commentedon Aug 7, 2026
Dev-Lead: cannot implement issue #945 β needs human attention
A stage timed out (exit 124) while implementing this issue. A timeout is treated as a first-class, non-retryable condition β retrying with the same budget would just time out again β so this escalates for human review on the first occurrence instead of wasting a same-budget retry.
timeoutThis hit the max action budget. Split this issue into smaller, independently-implementable pieces, or raise
vars.ACTION_TIMEOUT_SEC, then re-apply thedev-leadlabel.don-petry commentedon Aug 11, 2026
β Auto-resolved by Fleet Monitor. This workflow's failure rate has been below the 10% threshold (or the workflow was removed) since 2026-08-08 (3 days) β the monitor stopped flagging it. Closing. It will reopen automatically if the workflow crosses the threshold again.