Repository navigation
Description
Context
#4109 added the determinism job, which reruns a PR's changed Bun test files under CPU load at every pull-request cadence, including ready confirmation. #4108 cut ready confirmation's unit jobs to shorten the merge lease.
In the first confirmation that ran both (run 44017250694, PR #4134), determinism was the longest job:
| Job | Duration |
|---|---|
determinism |
1,236 s |
slowest unit partition (of eight) |
979 s |
other unit partitions |
608–821 s |
The lease for that confirmation was held from 04:25:44 to 04:50:40 UTC, about 25 minutes, the same as before #4108. That PR changed many test files, so it is close to a worst case; a PR that changes one or two test files spends far less. But the job's budget (600 weighted seconds, observed at about 3.2 times that in wall time under load, #4117) allows it to exceed the slowest unit partition on any PR that changes enough tests.
The same files were already repeated on the PR's draft head: determinism runs at draft cadence too. Ready confirmation repeats them again while the lease is held.
Scope
Decided (maintainer, 2026-11-17): fewer repetitions at ready confirmation.
- Ready confirmation runs the floor of two repetitions. Drafts, ready feedback and draft heavy feedback keep five.
- One owner in
scripts/test-determinism.tsdecides the count per cadence; the hosteddeterminismcommand reads it. - Record the ruling in
docs/decisions/ci-utility.mdunder "Changed tests repeat under load", and correctdocs/process/testing.mdanddocs/process/test-authoring.md.
Out of scope
- Splitting the selection across runners, and reusing a draft run's result: both declined in the ruling.
- The step-limit timeout on very large selections (ci: a determinism selection too heavy for two repetitions can exceed the job's step limit #4117).
- Vitest browser, layout and story specs (ci: repeat a PR's changed Vitest browser, layout and story specs in the pinned container #4116).
Acceptance criteria
- The hosted
determinismcommand for aconfirmationplan asks for two repetitions, and fordraft,feedbackandfeedback-heavyplans keeps the default. A test shown failing first. - A mutation that keeps the default at confirmation fails that test.
- The PR's own ready confirmation shows the job running two repetitions, with its duration recorded beside the 1,236 s above.
Verification
bun run check:pr --base origin/main.- The PR's ready confirmation.
Contract impact
None. CI tooling only.
2026-11-17: the options section was replaced by the maintainer's ruling; the comment below records it and the estimates behind it.
Activity
schlessera commentedon Nov 17, 2026
Decision (maintainer, 2026-11-17): fewer repetitions at ready confirmation. Drafts, ready feedback and draft heavy feedback keep five repetitions; ready confirmation runs the floor of two.
What it implies:
determinismcommand for a confirmation passes it.Basis for the choice, estimated over the 150 most recent merges with the reviewed weights and the one observed load ratio (about 3.2): 39 changed no Bun test file; for the rest the job's median was about 5.5 minutes; about 17 would have run longer than the slowest unit partition at five repetitions. These are estimates, not measurements.
schlessera commentedon Nov 17, 2026
Claimed for implementation. Claim token:
claim-a00a478a. Branch:chore/4137-determinism-confirmation-reps.none
chore(ci): run two repetitions of changed tests at ready confirmation (…
schlessera commentedon Nov 17, 2026
Delivered by #4143 (squash
eb9191c4b). The PR's own ready confirmation, run 44036241499, ran the job at the floor:determinism: 193 s whole job; "Repeating 1 changed Bun test file(s) 2 time(s) each under 4 CPU burner(s)", 20.8 s of repetition under load. The rest of the job is checkout, runtime setup and the build.unit: 660–891 s across eight partitions.This is not a like-for-like comparison with the 1,236 s in run 44017250694: that PR changed many test files and this one changed one. It shows the count is applied at confirmation and what the job's fixed cost is (about 170 s). The effect on a test-heavy PR is still an estimate until one confirms.