Skip to content

ci: a single test file heavier than one determinism partition may not finish two repetitions inside the step limit #4156

Closed

Description

@schlessera

Context

#4117 shards an oversized determinism selection by reviewed weight: one job holds 300 weighted seconds at the selection's repetition count, and the step limit is 40 minutes (DETERMINISM_PARTITIONS, scripts/proof-shards.ts:52). A file cannot be split, so a file whose two repetitions alone exceed the capacity runs in a partition by itself (planPartitions, scripts/determinism-plan.ts:83-105, the single-file case on line 99).

Four real-browser or long-running files were that heavy when filed. The #4155 reviewed-weight refresh leaves two above the capacity on current main; measure all four originally identified files:

File Reviewed weight (s) At two repetitions (s)
packages/ui-react/tests/connection-continuity-runtime.test.ts 145.433 290.866
packages/ui-react/tests/parallel-sessions-runtime.test.ts 437.345 874.690
packages/ui-react/tests/association-signout-runtime.test.ts 194.306 388.612
packages/ui-server/tests/hygiene-review.test.ts 138.140 276.280

The original tooling/backend calibration (elapsed-to-weighted ratios 3.59 to 6.84) did not establish whether these single files fit the 40-minute step. Hosted run 44161515414, attempt 1 now measures all four with two repetitions each under four CPU burners on four CPUs, using #4191's existing factor-of-eight watchdog scaling. All four passed: parallel-sessions 1,429.3 seconds, association-signout 722.4, connection-continuity 511.7 and hygiene-review 473.0. The longest complete proof step was 1,433 seconds, leaving 967 seconds inside the existing limit. The decision record retains the 40-minute limit, capacity, maximum and floor unchanged.

Over the 150 merges before the gate, 8 selections contained one of these files. A pull request that modifies one of them can therefore still fail the gate by timeout, with no partitioning able to help.

Scope

  • Measure elapsed seconds under load for two repetitions of each of the four files in a hosted determinism job, and record the runs in the decision record.
  • If one cannot finish inside the step limit, choose and record the remedy: a step limit derived from the heaviest single file, splitting the test file, or another ruling. Any choice that changes the floor of two or skips a file needs a maintainer ruling first.
  • Make a single file that exceeds the capacity visible in the job summary, so a timeout is read as this known case.

Out of scope

Acceptance criteria

  • The decision record names a hosted run for each of the four files, with estimated and elapsed seconds.
  • Every file in scripts/test-shard-costs.json whose two repetitions exceed the capacity either has a recorded hosted run that finished inside the step limit, or is covered by a recorded remedy. A test names the files and fails when a new one appears without either.
  • If a remedy changes the step limit or the planner, bun run lint and the planner tests cover it, with a failing-first receipt.

Verification

  • bun run check:pr --base origin/main.
  • The hosted determinism runs named in the decision record.

Contract impact

None. CI tooling only.

Updated 2026-11-17: verified citations against origin/main 0aeb62a and accounted for #4191 watchdog scaling and the #4155 weight refresh (two files currently exceed capacity; all four still require measurement). Maintainer requested immediate implementation for 0.45.0.

Updated 2026-11-17: all four hosted measurements passed (run 44161515414, attempt 1); the measurement-only PR #4232 is closed without merging and its branch deleted. The implementation adds a pre-launch summary warning and a mutation-proven coverage guard; no step-limit change or test-file split is needed.

Implementation merged: PR #4237, squash cd896ac, milestone 0.45.0. Final preflight passed on head 325df4b against base 51d0f6d; hosted draft run 44188769570 passed all 43 cases five times under load. Squash parent/tree match the inspected candidate. Automatic main proof passed all 17 executed jobs on the actual squash SHA: https://github.com/schlessera/brain-kit/actions/runs/44190582369 (attempt 1). The pre-existing runtime_host category passed too. The ready-event run was superseded by fast-lane landing and failed stale-candidate validation after merge; no receipt treats it as green and it was not rerun. Issue and PR milestone 0.45.0 were read back after closure.

Activity

  1. added
    type: chore
    area: ci
    priority: p2
    agent-ready
    on Nov 17, 2026
  2. self-assigned this
    on Nov 17, 2026
  3. schlessera commented on Nov 17, 2026

    @schlessera
    OwnerAuthor

    Claimed for implementation. Claim token: claim-59a7f767. Branch: fix/4156-oversized-determinism.

    Maintainer-requested immediate implementation. Readiness verified on origin/main 0aeb62a; account for #4191 deadline scaling. Path collision with #4179 in docs/decisions/ci-utility.md; other open PRs share proof closure.

  4. added this to the 0.45.0 milestone on Nov 17, 2026
  5. schlessera commented on Nov 17, 2026

    @schlessera
    OwnerAuthor

    Delivered by PR #4237, squash cd896ac, in milestone 0.45.0.

    Hosted measurement run 44161515414 (attempt 1) passed two repetitions of all four originally identified heavy files under four CPU burners, with #4191's deadline factor 8. The heaviest report took 1429.3 seconds; its full step took 1433 seconds, so the 40-minute limit stays. The decision record contains estimates, elapsed times, job links and actual checkout provenance. The job now writes an oversized-file warning before starting tests, and a mutation-proven coverage test rejects a newly oversized file without recorded evidence.

    Focused preflight and the exact-head hosted repetition job passed; the PR body carries the receipts. Automatic squash main run https://github.com/schlessera/brain-kit/actions/runs/44190582369 is green, and actual checkout/parent/tree verification agrees with the inspected candidate. Issue and PR milestone 0.45.0 were read back after closure. Measurement PR #4232 is closed without merge and its local/remote branch is deleted.

    Main proof receipt: automatic push run 44190582369, attempt 1, all 17 executed jobs passed and every actual checkout log names the squash SHA. determinism and browser_determinism intentionally do not repeat on main. The pre-existing runtime_host incident category passed in this run.

    The ready-event run 44190576184 failed stale-candidate validation after the PR had already been squashed through the permitted fast lane. It was superseded by that merge, is not claimed as green, and was not rerun. Pre-merge qualification is draft run 44188769570 and the final check:pr receipt; full post-merge qualification is the squash main run above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: cipriority: p2type: chore

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions