Skip to content

Canary: report the question run's verdict even after a budget failure - #21

Merged
jehrr merged 1 commit into
mainfrom
ci/canary-verdict-after-budget
Oct 21, 2026
Merged

jehrr merged 1 commit into
mainfrom
ci/canary-verdict-after-budget

Conversation

@jehrr

@jehrr jehrr commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Problem

In the canary's question half, "Interpret the exit code" had no if:, so it carried GitHub's implicit success(). When the "Proxy traffic of the question run" step before it failed (the run exceeded its proxy budget), GitHub skipped the interpret step. The log then showed only the budget error and never the run's own verdict (exit 6 partial, 5 content never obtained, and so on). The topic half's verdict steps already run after a failure (!cancelled()).

Change

  • .github/workflows/canary.yml: "Interpret the exit code" now has if: ${{ !cancelled() && steps.run.outcome != 'skipped' }}, the same guard the topic half uses. The job's result is unchanged: a failed proxy-traffic step still fails the job, and the interpret step still exits 1 on any nonzero scraper exit.
  • smoke_test.py: a check that every step judging a run's .outputs.exit_code carries !cancelled() or always() (3 such steps today), and that the question run's interpret step is one of them.
  • CHANGELOG [Unreleased] / Changed (CI only).

Evidence

  • Core-only venv (requirements.txt): python smoke_test.py reports smoke_test: OK (engine-only groups skipped). The workflow parses as YAML, and its triggers are still only schedule and workflow_dispatch.
  • Planted-fault controls, each red on the named check, then OK after restoring:
    1. the new if: removed from "Interpret the exit code": "every exit-code verdict step runs after a failed proxy-traffic step (unguarded ['Interpret the exit code'])" fails, and so does "the question run's 'Interpret the exit code' step is one of them";
    2. !cancelled() removed from "Fail when the topic run did not parse rows": the same check fails, naming that step;
    3. the topic run back to --proxy-budget-mb 10: "every canary scrape passes --proxy-budget-mb 25" fails (the CI: run the canary with a 25 MB proxy budget #20 guard is still live).
  • No canary was dispatched. No paid calls.

Not changed

The budget (25 MB, from #20), the scraper's 10 MB default, "Sanity-check the question run" (it runs only after exit 0, and a run over its budget never exits 0), and the release/version.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CKsd7q25N19WzUZjrAdzx8

The "Interpret the exit code" step had no if:, so when the proxy-traffic
step before it failed (budget exceeded) GitHub skipped it and the run's own
exit-code verdict never appeared. It now runs unless the job was cancelled
or the run step itself was skipped; the job stays red either way. A smoke
check requires every step that judges a run's exit code to carry
!cancelled() or always().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CKsd7q25N19WzUZjrAdzx8
@jehrr
jehrr merged commit 4e10875 into main Oct 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant