Skip to content

ci: classify Bun epoll faults as runtime crashes - #1475

Merged
Wibias merged 1 commit into
devfrom
fix/ci-bun-epoll-runtime-detection
Aug 11, 2026
Merged

Wibias merged 1 commit into
devfrom
fix/ci-bun-epoll-runtime-detection

Conversation

@Wibias

@Wibias Wibias commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Classify Bun 1.3.14's Linux EEXIST: file already exists, epoll_ctl failure from internal WriteStream setup as a Bun runtime crash even when Bun exits with status 1.
  • Route that narrow signature through the singleton recovery path added in ci: isolate Bun test shards into fresh-process batches #1469 instead of treating it as an assertion/test failure and aborting the shard.
  • Keep ordinary exit-1 assertion failures fail-fast. The new detector requires the Bun "Unhandled error between tests" marker, the exact epoll_ctl error, and an internal:fs/streams WriteStream frame.

This addresses the runtime failure seen in the Linux test shard for #1457, where the existing #1469 fallback was skipped because the Bun runtime fault exited with status 1.

Verification

  • bash -n scripts/ci/run-bun-test-batches.sh — pass.
  • Replayed the exact captured failure log against the classifier: current dev detector does not classify the exit-1 epoll_ctl fault as runtime; patched detector does.
  • End-to-end fake-Bun probe against the full batch helper:
    • exact internal epoll_ctl runtime signature on a two-file batch -> classified as runtime, singleton recovery runs, both singleton processes pass, helper exits 0;
    • ordinary assertion failure with exit 1 -> no singleton retry, helper exits 1;
    • EEXIST ... epoll_ctl without Bun's internal WriteStream frame -> no singleton retry, helper exits 1.
  • Reconstructed the pre-change script byte-for-byte and verified its Git blob SHA matched dev (6031deb91f78ca7d93f087719c5c460ec9f9ee95) before applying the 10-line patch.
  • Full bun run typecheck / bun run test were not executable in the current tool environment because it does not have a Bun binary. Repository CI should provide the Bun-native validation.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. No user-facing behavior changed, so no docs update is needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. This changes only failure classification in the bounded CI test helper; it does not change credentials, permissions, workflows, or external inputs.

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection of Bun runtime crashes by requiring specific crash indicators in test logs.
    • Reduced the risk of incorrectly classifying unrelated status-1 test failures as runtime crashes.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Aug 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f31e20ac-5638-4227-ac54-148b4301c034

📥 Commits

Reviewing files that changed from the base of the PR and between 9ef7df8 and 33e2c24.

📒 Files selected for processing (1)
  • scripts/ci/run-bun-test-batches.sh

📝 Walkthrough

Walkthrough

The CI helper now classifies a status-1 Bun failure as a runtime crash only when the log contains the required epoll EEXIST, unhandled-error, and internal WriteStream signatures.

Changes

Bun crash detection

Layer / File(s) Summary
Match Bun epoll crash signature
scripts/ci/run-bun-test-batches.sh:70-79
is_bun_runtime_crash now requires exit status 1 and matching epoll EEXIST, unhandled-error, and internal WriteStream log signatures before returning a runtime-crash classification.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: ingwannu, lidge-jun

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main CI change: classifying Bun epoll faults as runtime crashes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-bun-epoll-runtime-detection

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Wibias
Wibias merged commit 9ec2e2d into dev Aug 11, 2026
23 of 24 checks passed
@Wibias
Wibias deleted the fix/ci-bun-epoll-runtime-detection branch August 11, 2026 10:42
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant