Repository navigation
ci: keep the Bun crash loop inside its budget and default to the focused file - #312
Merged
Merged
Conversation
…sed file The HACK-1211 experiment produced two iterations per Bun version: one focused pass and one full `bun test` that started on a 600 s estimate and overran the 30-minute budget, because the full suite takes 30-35 minutes on hosted macOS. - Never start an iteration whose estimate exceeds the remaining budget. The estimate is a conservative prior (focused 120 s, full 2400 s) until a run completes, then the longest completed run times 1.2. A command that does not fit is recorded once in summary.json `skippedForBudget` and leaves the rotation. Deadline stops remain a safety net (`overrun`). - Add `--mode=focused|full|alternate` (default focused: only tests/native-https-owner.test.ts) and `--role=baseline|candidate`. - The workflow gains a validated `mode` dispatch input; the label-triggered matched pair uses focused with baseline/candidate roles. Full mode needs a budget of at least 40 minutes. The job timeout stays budget + 15. - summary.json gains per-command counts (iterations, passes, crashes, other failures, overruns, skipped-for-budget) and a one-line verdict such as "baseline 0/97 focused crashes". - The shared classifier also treats exit 134 (SIGABRT) and 138 (SIGBUS) as crash exits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
The HACK-1211 hosted experiment (PR #297) ran on Bun 1.3.9 and 1.4.2 with a 30-minute budget. Each run produced only 2 iterations: one focused pass (~16.5 s) and one full
bun testthat ran into the deadline (overrun, ~1783 s). The full suite was started on a 600 s estimate, but it takes about 30-35 minutes on hosted macOS.What changes
Budget (
scripts/bun-crash-loop.ts)summary.json→skippedForBudget(with the estimate and the remaining time), and it leaves the rotation. Without a run its estimate cannot change, and the remaining budget only shrinks, so it could never fit again.overrunand never counts as a crash unless the crash banner is in the log.Modes
--mode=focused|full|alternate, defaultfocused. Focused mode runs onlytests/native-https-owner.test.ts, the file where both original segfaults happened.--role=baseline|candidate(optional). It is used only in the verdict.Workflow (
.github/workflows/bun-crash-experiment.yml)modechoice input for dispatch. The plan job validates it and rejectsfullwith abudget_minutesunder 40, because no run could start.focused, with roles baseline (1.3.9) and candidate (1.4.2). The matrix is nowincludeentries of{bun_version, role}.Summary
summary.jsongainsverdict,mode,role,countsper command (iterations,passes,crashes,failures(other failures),overruns,skippedForBudget) andskippedForBudgetrecords. The step summary shows the same counts and the verdict.baseline 0/97 focused crashes,Bun 1.4.2 0/40 focused crashes, 0/1 full crashes,candidate 0/0 full crashes; no iteration fit the budget.Classifier (
scripts/lib/bun-crash-classify.ts)Test semantics, assertions and socket behavior of the tested suite are unchanged. The harness still runs plain
bun test/bun test <file>.Validation
bun test tests/bun-crash-loop.test.ts tests/ci-bun-crash-census.test.ts tests/agent-instruction-source.test.ts: 52 pass. New tests use an injected clock and an injected executor. The executor stops at the deadline, so starting a run that cannot fit would show up as an overrun. The tests cover:executeWithLogtest still checks that nobun*.ipsreport appears.actionlint@1.7.12on the CI workflow set: clean.--roleis passed only when a role is set.bun run --cwd packages/cli typecheck,bun run --cwd packages/cli check, Biome on the changed files andbun run privacy:check: all pass.Not done / gates
DEFAULT_FULL_ESTIMATE_SECONDS. If one changes, the other must change too (both places have a comment saying so).🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.