Skip to content

ci: hit-reach.trust-settings.pointer.tsx has no reviewed browser cost, so browser_determinism under-shards and times out #4484

Open

Description

@schlessera

Context

browser_determinism repeats every changed browser, layout and story spec five times under CPU load. It splits the work into shards by each project/file pair's reviewed cost (BROWSER_DETERMINISM_PARTITIONS, scripts/proof-shards.ts:68: 300 s capacity per shard, unweightedSeconds: 10). The costs live in scripts/browser-shard-costs.json. The repeat step itself is capped at 20 minutes (.github/workflows/ci.yml:746-750).

packages/ui-react/tests/browser/hit-reach.trust-settings.pointer.tsx (added by 70970e41a, #4425) has no entry in scripts/browser-shard-costs.json for any of its three projects (rail-coarse, rail-fine, rail-mixed). The planner therefore costs each pair at the 10 s default. Under load, one pass of the file takes about 40 s per project (74 tests).

A PR whose diff changes this spec along with a few others gets one shard and times out. Observed on #4482, a sync of main into an integration branch whose diff carries #4425's specs (run 45146578319, job browser_determinism (1)):

  • the planner printed Repeating 5 changed project/file pair(s) 5 time(s) each … 48.9 weighted s per pass, 244.4 s estimated, budget 300 s and listed all three hit-reach.trust-settings.pointer.tsx pairs as no reviewed weight: costed at the 10s default;
  • the step ran 15 file passes, every one green, and was cancelled at its 20-minute limit.

The job fails on a timeout, not a test failure, and the shard count was decided by the missing weight. #4425's own PR passed the job in about eight minutes, with fewer pairs selected.

Scope

  • Add reviewed costs for the three hit-reach.trust-settings.pointer.tsx pairs to scripts/browser-shard-costs.json, measured the way the file's other entries are, with its recorded provenance.
  • Check whether any other browser, layout or story spec on main has no reviewed cost, and add those too.

Out of scope

  • Changing the partitioning algorithm, the 300 s capacity, the 20-minute step limit or the 10 s default.
  • Any test's content.

Acceptance criteria

  • scripts/browser-shard-costs.json has a reviewed cost for every rail-coarse, rail-fine and rail-mixed pair of hit-reach.trust-settings.pointer.tsx.
  • With those costs, the plan for the CONTRACT: chore: merge main into the G1a integration branch (#4201) #4482 selection (the five pairs above) uses more than one shard. A unit test over the planner shows this: with the entries present it plans more than one shard, and with them removed it plans one.
  • Every browser, layout and story spec on main has a reviewed cost, or the PR lists the ones that do not and says why.

Verification

bun run test ./tests/browser-determinism.test.ts, which covers planBrowserPartitions (it already has an unweighted-default case, "a pair without a reviewed weight costs the stated default", to model the new case on), plus bun run test ./tests/browser-shards.test.ts for the cost file, and a draft PR whose browser_determinism plan lists the new weights.

Contract impact

None.

2026-11-23 triage at main a3395c4b2: verified BROWSER_DETERMINISM_PARTITIONS (scripts/proof-shards.ts:68), the 20-minute step limit (.github/workflows/ci.yml:747), and that scripts/browser-shard-costs.json has no trust-settings.pointer entry. Corrected the planner test pointer. Standalone: #2753 assigns shard balancing to the closed #1849, and no open epic owns it.

Activity

  1. added
    area: ciCI workflows, the gates they run, release scripts, packaging.
    type: fixSomething is broken and must behave the way it is documented.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    and removed on Nov 23, 2026
  2. self-assigned this
    on Nov 23, 2026
  3. schlessera commented on Nov 23, 2026

    @schlessera
    OwnerAuthor

    Claimed for implementation. Claim token: claim-6bd67265. Branch: chore/4201-g1a-sync-main.

    Fixed on the G1a integration branch through the sync PR #4482, whose browser_determinism it unblocks; reaches main with the G1a landing. Collisions: none checked beyond #4482.

  4. added this to the 0.46.0 milestone on Nov 23, 2026
  5. added 4 commits that reference this issue on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ciCI workflows, the gates they run, release scripts, packaging.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: fixSomething is broken and must behave the way it is documented.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions