Context
Two engine e2e shards hit the five-minute step ceiling today on pull requests whose tests all passed:
- neo
#21239 @ 098b335ee4, e2e-engine (13/14): "75 passed (5.1m)", then "The action 'Run e2e (engine tier)' has timed out after 5 minutes" (run 44040385390, defect note 73f2ec59).
- outside PR
#21240 @ 280f5f6, e2e-engine (4/14): "63 passed (5.0m)", then the same timeout (run 44082682665). None of that PR's specs run in that shard. The contributor cannot re-run jobs and had to ask on the PR (https://github.com/neomjs/neo/pull/21240#issuecomment-6948763797).
Each occurrence costs a maintainer re-run. An outside contributor who cannot re-run waits on a red check their change did not cause.
The Problem
balancedShard() splits the tier by measured seconds per spec file. The table it reads has fallen behind the tier:
buildScripts/util/e2eEngineDurations.json lists 194 files. The tier (enginePaths()) has 223. The 29 missing files are mostly specs added since the last full rebuild (board, gantt, timeline, core/ContentSecurityPolicy, grid/CountriesExample, …), and each counts as the table's median.
- On dev's latest full run (44081473449 @
d49f1dd494, all green), the 14 shards' test steps took 195–236 s. Re-measured with that run's per-file times, the current split spreads from 189 to 230 s, while the table predicts at most 216 s.
- Over the last 45 completed pull-request runs (379 shard steps): p50 216 s, p90 256 s, p99 293 s, max 301 s. 19 steps took 270 s or more. The tail sits on top of the imbalance, so the heaviest shard is the one that times out.
The Architectural Reality
.github/workflows/test-e2e.yml header: "the ceiling is five minutes of test time per shard … A shard nearing it gets a sibling, never a higher ceiling". The step's timeout-minutes is 5 on pull_request and push.
buildScripts/util/e2eCiSelection.mjs: FULL_SHARDS = {engine: 14}, and ENGINE_DURATIONS is read from e2eEngineDurations.json. balancedShard({paths, shard, durations}) assigns files by those seconds, and --engine-durations rebuilds the table from a full dev run's log (gh run view <id> --log).
- #20521 replaced count-based splitting with this table. Its Avoided Traps rule out "another shard" as a fix for an unbalanced split.
The Fix
Regenerate e2eEngineDurations.json with the existing CLI from dev's latest full run: gh run view 44081473449 --log | node buildScripts/util/e2eCiSelection.mjs --engine-durations. A full, green dev run is the only valid input. Measured before filing, with that run's log: the rebuilt table covers all 223 files, and the 14 shards predict 209–210 s each, against 189–230 s for the current split. The heaviest shard drops by about 20 s, roughly what a fifteenth shard would buy, without the extra runner. FULL_SHARDS and the ceiling stay.
Decision Record impact: none.
Acceptance Criteria
Out of Scope
- Refreshing the table automatically in CI, as in #20521. 29 files went missing in about 8 days, so this ticket's post-merge AC measures whether a manual refresh is enough.
- The ceiling and
FULL_SHARDS.engine.
- The
e2e-brain tier's table.
Avoided Traps
- A fifteenth shard first. It buys the same 20 s for one more runner on every pull request, and the split stays as unbalanced as the table is stale (#20521).
- Raising the ceiling. The header rules it out: the ceiling is the wait every pull request pays.
- Re-running as the fix. It makes the contributor wait on a maintainer, every time.
Related
#20521 (time-balanced split), #19843, #19078, #18895 (earlier shard additions); #21239, #21240 (today's specimens).
Live latest-open + closed sweep: latest 20 open plus open and closed searches ("e2e shard ceiling timeout", "e2e engine shards five-minute ceiling", "e2e duration table stale shards") at 2026-11-17T13:10Z. The Out of Scope and Avoided Traps of #20521 and #19843 were read; no open equivalent. A2A in-flight sweep: no lane claim on the e2e tier in the last 30 messages. Memory Core: prior shard additions (09-21, 10-17, 11-07), no table refresh in flight. Own open assignments: none on this surface. Backlog: 82 open (red). No owning ticket or epic exists, so this files one.
Origin Session ID: d084cffc-f47b-49ae-946a-07326b960da9
Retrieval Hint: "engine e2e shard five-minute ceiling stale duration table balancedShard"
Context
Two engine e2e shards hit the five-minute step ceiling today on pull requests whose tests all passed:
#21239@098b335ee4,e2e-engine (13/14): "75 passed (5.1m)", then "The action 'Run e2e (engine tier)' has timed out after 5 minutes" (run 44040385390, defect note73f2ec59).#21240@280f5f6,e2e-engine (4/14): "63 passed (5.0m)", then the same timeout (run 44082682665). None of that PR's specs run in that shard. The contributor cannot re-run jobs and had to ask on the PR (https://github.com/neomjs/neo/pull/21240#issuecomment-6948763797).Each occurrence costs a maintainer re-run. An outside contributor who cannot re-run waits on a red check their change did not cause.
The Problem
balancedShard()splits the tier by measured seconds per spec file. The table it reads has fallen behind the tier:buildScripts/util/e2eEngineDurations.jsonlists 194 files. The tier (enginePaths()) has 223. The 29 missing files are mostly specs added since the last full rebuild (board, gantt, timeline,core/ContentSecurityPolicy,grid/CountriesExample, …), and each counts as the table's median.d49f1dd494, all green), the 14 shards' test steps took 195–236 s. Re-measured with that run's per-file times, the current split spreads from 189 to 230 s, while the table predicts at most 216 s.The Architectural Reality
.github/workflows/test-e2e.ymlheader: "the ceiling is five minutes of test time per shard … A shard nearing it gets a sibling, never a higher ceiling". The step'stimeout-minutesis 5 onpull_requestandpush.buildScripts/util/e2eCiSelection.mjs:FULL_SHARDS = {engine: 14}, andENGINE_DURATIONSis read frome2eEngineDurations.json.balancedShard({paths, shard, durations})assigns files by those seconds, and--engine-durationsrebuilds the table from a full dev run's log (gh run view <id> --log).The Fix
Regenerate
e2eEngineDurations.jsonwith the existing CLI from dev's latest full run:gh run view 44081473449 --log | node buildScripts/util/e2eCiSelection.mjs --engine-durations. A full, green dev run is the only valid input. Measured before filing, with that run's log: the rebuilt table covers all 223 files, and the 14 shards predict 209–210 s each, against 189–230 s for the current split. The heaviest shard drops by about 20 s, roughly what a fifteenth shard would buy, without the extra runner.FULL_SHARDSand the ceiling stay.Decision Record impact: none.
Acceptance Criteria
e2eEngineDurations.jsonholds a time for everyenginePaths()file, rebuilt from a named full green dev run.test/playwright/unit/buildScripts/util/E2eCiSelection.spec.mjspasses.Out of Scope
FULL_SHARDS.engine.e2e-braintier's table.Avoided Traps
Related
#20521 (time-balanced split), #19843, #19078, #18895 (earlier shard additions);
#21239,#21240(today's specimens).Live latest-open + closed sweep: latest 20 open plus open and closed searches ("e2e shard ceiling timeout", "e2e engine shards five-minute ceiling", "e2e duration table stale shards") at 2026-11-17T13:10Z. The Out of Scope and Avoided Traps of #20521 and #19843 were read; no open equivalent. A2A in-flight sweep: no lane claim on the e2e tier in the last 30 messages. Memory Core: prior shard additions (09-21, 10-17, 11-07), no table refresh in flight. Own open assignments: none on this surface. Backlog: 82 open (red). No owning ticket or epic exists, so this files one.
Origin Session ID: d084cffc-f47b-49ae-946a-07326b960da9 Retrieval Hint: "engine e2e shard five-minute ceiling stale duration table balancedShard"