Skip to content

kona-client: fail Cannon runs when the client exits non-zero - #23772

Merged
teddyknox merged 3 commits into
developfrom
claude/kona-cannon-offline-exit-check
Nov 10, 2026
Merged

teddyknox merged 3 commits into
developfrom
claude/kona-cannon-offline-exit-check

Conversation

@teddyknox

@teddyknox teddyknox commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

kona-host-client-offline-cannon, a job that required-rust-ci depends on, passes today even when kona-client fails inside Cannon. This PR makes it fail in that case.

The problem. cannon run exits 0 whatever the guest's exit code is (cannon/cmd/run.go logs Execution stopped exited=… code=… and returns nil). kona-client rejects an invalid claim by exiting non-zero. So the job cannot catch the regression it exists to catch.

What changes.

  • Both Cannon recipes (run-client-cannon and run-client-cannon-offline) now fail unless cannon witness reports that the client exited with code 0.
  • The offline recipe gets set -o errexit -o nounset -o pipefail, like the other recipes in the file. A failed cannon run now stops the recipe, so the new check cannot read a stale final state.
  • The witness download retries transient failures five times with curl's exponential backoff (1, 2, 4, 8 and 16 s). Unlike the example in docs/ai/docker.md, it leaves out --retry-delay, which would replace the backoff with a fixed wait. It also drops an etag that has no tar beside it; that etag otherwise gets a bodyless 304 and leaves nothing to extract.
  • Git ignores out.bin.gz. cannon run already wrote this final state into rust/kona by default; the recipes now pass --output only to fix the path that the check reads.

Effect. Only these two recipes change, in CI and in local runs. Nothing turns red today: the latest merge-queue run of the job logs exited=true code=0.

Testing. CI runs kona-host-client-offline-cannon with the new check. CI covers only the success path; no CI job makes the client exit non-zero.

Context. This is one of four small PRs that change code CircleCI runs, found while reviewing the RWX pilot (#23151): #23772, #23775, #23776 and #23780. Each stands alone. The additive RWX shadow is #23783, which checks the exit code in its own wrapper; this PR fixes it where both local runs and CI use it. No repo review agent's trigger matches this diff (shell and justfile only).

Tracked in #24044.

🤖 Generated with Claude Code

`cannon run` exits 0 whatever the program's exit code is, and the client
rejects an invalid claim by exiting non-zero. So kona-host-client-offline,
a required-rust-ci job, passed even when the client failed inside Cannon.
Both Cannon recipes now write the final state explicitly and fail unless
`cannon witness` reports that the client exited with code 0. The offline
recipe also stops at the first failing command, like the other recipes,
so a failed run cannot be checked against a stale final state.

The witness download now retries transient failures, as other CI fetches
do, and drops an etag that has no tar beside it, which would otherwise
produce a 304 with nothing to extract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teddyknox
teddyknox marked this pull request as ready for review October 29, 2026 16:26
@teddyknox
teddyknox requested a review from a team as a code owner October 29, 2026 16:26
teddyknox added a commit that referenced this pull request Nov 9, 2026
A hosted RWX run of pr-gates.yml at 1b4923d failed in three tasks.

- cannon-offline: Cannon writes rust/kona/out.bin.gz, and git does not
  ignore that file (#23772 adds the ignore line). The Rust target cache
  commit saw it as a source change. The wrapper now moves the final
  state into its report, and the cache error names the changed files.
- contracts-gate-receipt: the five heavy-fuzz-modified verdicts were
  skipped because the commit changes no contract test files, and the
  receipt counts a skip as a failure. Circle's job halts with success on
  an empty test list. The verdicts now always run, and restore accepts
  an empty preparation after it proves that the selection is still
  empty. The unused eligible value is removed.
- main-helper-tests: the l2-chains-sync live fixture wrote a forge
  version file by hand, but the check now runs go test (#23643). The
  fixture installs the forge package like the other main-check fixtures.

The contract verdict's test-results path also matches the per-EVM-pass
JUnit reports again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@einar-oplabs einar-oplabs self-assigned this Nov 10, 2026
einar-oplabs
einar-oplabs previously approved these changes Nov 10, 2026
Comment thread rust/kona/.gitignore Resolved
--retry-delay 2 replaced curl's exponential backoff with a fixed 2 s wait,
so the five retries gave up after about 10 s. Without it curl waits 1, 2,
4, 8 and 16 s, which outlasts longer release-CDN and redirect failures. A
missing asset now fails after about 31 s instead of 10 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teddyknox
teddyknox added this pull request to the merge queue Nov 10, 2026
Merged via the queue into develop with commit 05289d1 Nov 10, 2026
123 checks passed
@teddyknox
teddyknox deleted the claude/kona-cannon-offline-exit-check branch November 10, 2026 16:30
@teddyknox teddyknox self-assigned this Nov 10, 2026
@teddyknox teddyknox mentioned this pull request Nov 10, 2026
3 of 5 tasks
@github-actions

Copy link
Copy Markdown
Contributor

Agent approval check

Head branch claude/kona-cannon-offline-exit-check matches agent prefix claude/

Current head: 3c9ccaa772931548d731396e1dae56a0741736c6
Human approvals: 1/2
Approvers: @einar-oplabs

A write-capable human can approve by submitting a native review or by commenting:

/approve 3c9ccaa772931548d731396e1dae56a0741736c6

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.

2 participants