🤖 ci: retry bun teardown crashes and npm registry publication skew - #3856
Merged
Merged
Conversation
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Summary
Fixes the two CI flake classes that dequeued #3854 from the merge queue twice on 2026-08-14 (runs 31829008751 and 31831156227).
Background
Test / Unit, bun 1.3.5 crashed (Illegal instruction, exit 132) at process teardown in an isolatedWorkflowRunner.test.tsrun after every test passed ("0 fail", panic during shutdown). The same signature dequeued another PR on Aug 13.Static Checks(check-bench-agent.sh) andSmoke / Server(npm installof the packed tarball) requested@aws-sdk/credential-provider-ini@^3.973.14seconds before it was visible on the registry (ETARGET/ "No version matching ... (but package exists)").Implementation
pr.yml: isolated unit-test files retry up to 3 times, but only on signal exits (>= 128). Genuine test failures (exit 1) still fail immediately on the first attempt, so no flaky-test masking is possible. The existingscripts/retry.shwas not reused here because it retries every nonzero exit.check-bench-agent.sh,smoke-test.sh,generate-npm-shrinkwrap.sh: the three registry-facing installs (all resolve fresh from npm) are wrapped in the existingscripts/retry.shwith 5 attempts x 60s, enough to ride out a multi-minute publish wave.Considered and rejected: scoping the smoke-test retry to
SKIP_SHRINKWRAP=1only. The observed incident hit the shrinkwrappedSmoke / Serverinstall, so that scoping would leave the observed flake unfixed. Also considered a 3x30 retry budget to matchdist-mac's; kept 5x60 because publish waves span minutes and the extra delay only applies to genuinely broken resolution, which lockfile-based jobs never hit.Validation
bun(crash-then-pass recovers; exit 1 fails immediately with a single invocation; persistent crash exits 132 after 3 attempts; clean pass runs once).make static-check,shellcheckon all three scripts,actionlint,zizmor: all green.check-bench-agent.shandgenerate-npm-shrinkwrap.shrun end-to-end locally through the retry wrapper.Risks
Low. The unit-test retry cannot mask real failures (exit-code gated). The install retries add up to 4 minutes before surfacing a genuine resolution failure in
Static Checks/Smoke/ npm publish; publication skew is far more common than genuine breakage on those lockfile-free paths.Generated with
mux• Model:anthropic:claude-fable-5• Thinking:xhigh