Skip to content

Commit 807ec4f

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-38132-ui-test-inputs
2 parents 1f21b20 + 3ad3b41 commit 807ec4f

4 files changed

Lines changed: 299 additions & 50 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ jobs:
934934

935935
# Its own self-test, where it runs (check:self-test-wired). Milliseconds.
936936
# A red here fails this job before it publishes a plan, so the matrix
937-
# falls back to all ten shards: a broken planner costs runners, never
937+
# falls back to all twelve shards: a broken planner costs runners, never
938938
# coverage.
939939
- name: Test Core shard planner self-test
940940
run: node scripts/ci/plan-test-core-shards.mjs --self-test
@@ -955,7 +955,8 @@ jobs:
955955
--exclude @objectstack/dogfood --github-output "$GITHUB_OUTPUT"
956956
957957
test:
958-
# Sharded 10-way BY PACKAGE (8-way until #34710, 6-way until #25376): a
958+
# Sharded 12-way BY PACKAGE (10-way until #36646, 8-way until #34710, 6-way
959+
# until #25376): a
959960
# core-touching PR ran the affected suite ~11½ min on one 4-vCPU runner —
960961
# the longest pole in the whole workflow — and at 2 shards the slower shard
961962
# still ran ~10 min, keeping merge-queue builds at ~11 min end-to-end
@@ -998,6 +999,19 @@ jobs:
998999
# packages, at nine six carried ~1954s, at ten the heaviest carries 1769s
9991000
# (spec, alone). The partitioner's SHARD_COUNT header carries the figures.
10001001
#
1002+
# TWELVE since #36646, for the wall, not the cap: a slice shard runs its
1003+
# whole packages first and its CLI slice after them, so on a full plan the
1004+
# slice shards were the slowest Test Core jobs (whole leg p50 287s, slice
1005+
# leg p50 887s, 12 sampled merge_group runs, report 7232799392). The
1006+
# partitioner now places a split that carries a slice by modelled wall
1007+
# (placeByWall()): slices first, then whole packages onto the slice-free
1008+
# shards while they fit WHOLE_LEG_CAP_SECONDS. At ten that puts seven whole
1009+
# legs at 1866-1868s, the density #25968 went red at; at twelve the nine
1010+
# slice-free shards hold every whole package at <=1520s on the 2026-11-23
1011+
# dataset, below the 1696s each carried at ten, and the slice shards carry
1012+
# their slices and the reader slice's rider only. Two more runners per full
1013+
# plan, ~+3.6 runner-min at the per-shard overhead measured below.
1014+
#
10011015
# EIGHT before that (#25376; six from #22075 until then): sharding is BY
10021016
# PACKAGE, so no shard can finish faster than the heaviest serial task it
10031017
# carries. `@objectstack/cli` (2899.02s on the 2026-10-23 dataset) runs as 3
@@ -1068,7 +1082,7 @@ jobs:
10681082
# Branch protection requires the bare "Test Core" context, which a matrix
10691083
# can never publish again — the test-gate job below carries that name
10701084
# (the #3622 lesson; see dogfood-gate).
1071-
name: Test Core (${{ matrix.shard }}/10)
1085+
name: Test Core (${{ matrix.shard }}/12)
10721086
needs: [filter, test-plan, queue-verdict]
10731087
# "Skip only when the filter EXPLICITLY said no core paths changed" — see
10741088
# THE FILTER CONTRACT on the filter job's outputs (#4928). `scripts` is ORed
@@ -1079,7 +1093,7 @@ jobs:
10791093
# The third clause is the plan's (#26084): `[]` is the test-plan job's
10801094
# positive statement that the package set is empty, and only that literal
10811095
# skips. A plan job that died publishes nothing, `'' != '[]'` holds, and the
1082-
# matrix below falls back to all ten shards: half 1 of the contract again.
1096+
# matrix below falls back to all twelve shards: half 1 of the contract again.
10831097
if: ${{ !cancelled() && (needs.filter.outputs.core != 'false' || needs.filter.outputs.crosspkg != 'false') && needs.test-plan.outputs.shards != '[]' }}
10841098
runs-on: ubuntu-latest
10851099
# Backstop only — the stall guard on the test steps is the primary
@@ -1144,7 +1158,7 @@ jobs:
11441158
# payloads of every completed pull_request, merge_group, push and
11451159
# schedule run in it), BOTH guard verdicts -- the window path
11461160
# (p + s + 10m) and the cap-deferred path (p + s + 20m) -- land before the
1147-
# new value on every observation, AND the slowest `Test Core (N/10)` job
1161+
# new value on every observation, AND the slowest `Test Core (N/12)` job
11481162
# wall is at or under 80% of it. Read the pull_request and merge_group
11491163
# runs, not the 4-hourly schedule alone: scheduled runs mostly replay the
11501164
# cache their commit's push run saved. It carries no other expiry — a
@@ -1155,8 +1169,8 @@ jobs:
11551169
contents: read
11561170
# ⭐ ONLY THE SHARDS WITH WORK START (#26084). The list is the test-plan
11571171
# job's: the indices of the bins `partition-test-shards.mjs` fills at
1158-
# SHARD_COUNT (10) for this run's package set. The count stays 10, so a
1159-
# started shard runs exactly the `--shard k/10` slice it ran before, under
1172+
# SHARD_COUNT (12) for this run's package set. The count stays 12, so a
1173+
# started shard runs exactly the `--shard k/12` slice it ran before, under
11601174
# the same name, cache key and attestation; a shard whose bin is empty is
11611175
# simply never created. The literal after `||` is the full roster, read
11621176
# when the plan job published nothing (it died or timed out), and the gate
@@ -1180,7 +1194,7 @@ jobs:
11801194
strategy:
11811195
fail-fast: ${{ github.event_name == 'merge_group' }}
11821196
matrix:
1183-
shard: ${{ fromJSON(needs.test-plan.outputs.shards || '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]') }}
1197+
shard: ${{ fromJSON(needs.test-plan.outputs.shards || '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]') }}
11841198

11851199
steps:
11861200
# Depth 1 (the default), then the step below fetches the history this job
@@ -1249,7 +1263,7 @@ jobs:
12491263
# the tail's low end (1063 s), not its top. In `test-ui` neither end
12501264
# fits beside the body inside the 30-minute wall, so its budget only
12511265
# ends the red sooner and names the step. A red `test-plan` falls
1252-
# back to all ten shards, and each fetches for itself.
1266+
# back to all twelve shards, and each fetches for itself.
12531267
# A fetch that stalls is retried after 60 s of silence; one that keeps
12541268
# stalling ends red here, named, instead of eating the wall.
12551269
- name: Fetch this commit's history and the base branch
@@ -1379,7 +1393,7 @@ jobs:
13791393
run: |
13801394
bash scripts/ci/select-shard-packages.sh
13811395
node scripts/partition-test-shards.mjs "$RUNNER_TEMP/turbo-ls.json" \
1382-
--shard ${{ matrix.shard }}/10 --exclude @objectstack/dogfood \
1396+
--shard ${{ matrix.shard }}/12 --exclude @objectstack/dogfood \
13831397
> "$RUNNER_TEMP/shard-packages.txt"
13841398
echo 'Items on this shard (a package name, or a package plus a k/n file-level slice):'
13851399
cat "$RUNNER_TEMP/shard-packages.txt"
@@ -1504,7 +1518,7 @@ jobs:
15041518
# `--if-ran`: an empty shard exits the step above before turbo runs.
15051519
- name: The Turbo remote cache was on for this shard's closure build
15061520
run: |
1507-
node scripts/ci/assert-turbo-remote-cache.mjs --site 'Test Core (${{ matrix.shard }}/10) closure' \
1521+
node scripts/ci/assert-turbo-remote-cache.mjs --site 'Test Core (${{ matrix.shard }}/12) closure' \
15081522
--log .turbo/remote-cache/test-core-closure.json --if-ran \
15091523
--move-summary-to "$RUNNER_TEMP/turbo-remote-cache"
15101524
@@ -1873,7 +1887,7 @@ jobs:
18731887
run: |
18741888
node scripts/ci/report-test-leftovers.mjs report \
18751889
--before "$RUNNER_TEMP/test-leftovers/before.json" \
1876-
--label "Test Core (${{ matrix.shard }}/10)"
1890+
--label "Test Core (${{ matrix.shard }}/12)"
18771891
18781892
# --summarize above costs nothing at runtime and writes
18791893
# `.turbo/runs/<id>.json`: one per-task record with the execution window
@@ -1917,7 +1931,7 @@ jobs:
19171931
continue-on-error: true
19181932
uses: actions/upload-artifact@v7
19191933
with:
1920-
name: test-core-run-summary-${{ matrix.shard }}-of-10
1934+
name: test-core-run-summary-${{ matrix.shard }}-of-12
19211935
path: .turbo/runs/
19221936
if-no-files-found: ignore
19231937
retention-days: ${{ github.event_name == 'schedule' && 4 || 1 }}
@@ -1999,11 +2013,11 @@ jobs:
19992013
shopt -s nullglob
20002014
SUMMARIES=(.turbo/runs/*.json)
20012015
if [ "${#SUMMARIES[@]}" -eq 0 ]; then
2002-
echo "shard-timing-drift: NOT MEASURED -- Test Core (${{ matrix.shard }}/10) wrote no turbo run summary (no packages on this shard)."
2016+
echo "shard-timing-drift: NOT MEASURED -- Test Core (${{ matrix.shard }}/12) wrote no turbo run summary (no packages on this shard)."
20032017
exit 0
20042018
fi
20052019
node scripts/partition-test-shards.mjs --check-drift "${SUMMARIES[@]}" \
2006-
--label "Test Core (${{ matrix.shard }}/10)" --event "$GITHUB_EVENT_NAME"
2020+
--label "Test Core (${{ matrix.shard }}/12)" --event "$GITHUB_EVENT_NAME"
20072021
20082022
# Runs even when the suite failed — that is when it earns its keep. It
20092023
# answers TWO questions about a red suite, and needs both to be able to
@@ -2133,7 +2147,7 @@ jobs:
21332147
node scripts/report-test-timings.mjs --capture \
21342148
--log "$RUNNER_TEMP/test-core.log" \
21352149
--summaries .turbo/runs \
2136-
--shard "${{ matrix.shard }}/10" \
2150+
--shard "${{ matrix.shard }}/12" \
21372151
--out "$RUNNER_TEMP/test-timings/shard-${{ matrix.shard }}.json"
21382152
21392153
# Retention matches the run-summary upload above (4 days on `schedule`,
@@ -2146,7 +2160,7 @@ jobs:
21462160
continue-on-error: true
21472161
uses: actions/upload-artifact@v7
21482162
with:
2149-
name: test-core-timings-${{ matrix.shard }}-of-10
2163+
name: test-core-timings-${{ matrix.shard }}-of-12
21502164
path: ${{ runner.temp }}/test-timings/
21512165
if-no-files-found: ignore
21522166
retention-days: ${{ github.event_name == 'schedule' && 4 || 1 }}
@@ -2189,10 +2203,10 @@ jobs:
21892203
OS_SEED_ONLY: ${{ needs.queue-verdict.outputs.covered == 'true' }}
21902204
run: |
21912205
if [ "$OS_SEED_ONLY" = 'true' ]; then
2192-
node scripts/ci/prune-turbo-cache.mjs --site 'Test Core (${{ matrix.shard }}/10) seed-only' \
2206+
node scripts/ci/prune-turbo-cache.mjs --site 'Test Core (${{ matrix.shard }}/12) seed-only' \
21932207
--cache .turbo/cache --run-summaries "$RUNNER_TEMP/turbo-remote-cache"
21942208
else
2195-
node scripts/ci/prune-turbo-cache.mjs --site 'Test Core (${{ matrix.shard }}/10)' \
2209+
node scripts/ci/prune-turbo-cache.mjs --site 'Test Core (${{ matrix.shard }}/12)' \
21962210
--cache .turbo/cache --run-summaries .turbo/runs \
21972211
--extra-summaries "$RUNNER_TEMP/turbo-remote-cache"
21982212
fi
@@ -2225,14 +2239,14 @@ jobs:
22252239
if: needs.queue-verdict.outputs.covered != 'true'
22262240
run: |
22272241
node scripts/check-shard-attestation.mjs --emit \
2228-
--job test --shard ${{ matrix.shard }} --total 10 \
2242+
--job test --shard ${{ matrix.shard }} --total 12 \
22292243
--out "$RUNNER_TEMP/shard-attestation"
22302244
22312245
- name: Publish this shard's attestation
22322246
if: needs.queue-verdict.outputs.covered != 'true'
22332247
uses: actions/upload-artifact@v7
22342248
with:
2235-
name: shard-attest-test-${{ matrix.shard }}-of-10
2249+
name: shard-attest-test-${{ matrix.shard }}-of-12
22362250
path: ${{ runner.temp }}/shard-attestation/
22372251
if-no-files-found: error
22382252
retention-days: 1
@@ -2348,8 +2362,8 @@ jobs:
23482362
OS_DOWNLOAD_OUTCOME: ${{ steps.attestations.outcome }}
23492363
# The planned roster, spelled exactly as the `test` job's matrix
23502364
# spells it, fallback included: a plan job that died leaves the
2351-
# matrix on 1..10, and the gate then counts 1..10 too (#26084).
2352-
OS_TEST_PLAN: ${{ needs.test-plan.outputs.shards || '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]' }}
2365+
# matrix on 1..12, and the gate then counts 1..12 too (#26084).
2366+
OS_TEST_PLAN: ${{ needs.test-plan.outputs.shards || '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]' }}
23532367
OS_TEST_PLAN_RESULT: ${{ needs.test-plan.result }}
23542368
# Read ONLY on the partially-attested-cancelled path above, never
23552369
# otherwise; without it that path fails closed (red, naming the
@@ -2361,7 +2375,7 @@ jobs:
23612375
--dir "$OS_ATTEST_DIR" \
23622376
--filter-result "$OS_FILTER_RESULT" \
23632377
--download-outcome "$OS_DOWNLOAD_OUTCOME" \
2364-
--leg "test/10:$OS_TEST_RESULT" \
2378+
--leg "test/12:$OS_TEST_RESULT" \
23652379
--planned "test=$OS_TEST_PLAN" \
23662380
--plan-result "$OS_TEST_PLAN_RESULT"
23672381

‎scripts/ci/plan-test-core-shards.mjs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
33
//
4-
// plan-test-core-shards -- which `Test Core (N/10)` shards this run starts,
4+
// plan-test-core-shards -- which `Test Core (N/12)` shards this run starts,
55
// decided ONCE, before any shard runner exists (#26084).
66
//
77
// node scripts/ci/plan-test-core-shards.mjs <turbo-ls.json> --exclude <pkg>... --github-output <file>
@@ -33,10 +33,10 @@
3333
// `fromJSON`. `[]` means nothing to test: the job's `if:` skips it.
3434
// digest a sha256 of the whole plan (every bin's items, in order).
3535
//
36-
// The shard count stays SHARD_COUNT (10 since #34710, read from ci.yml): a
37-
// planned shard runs `--shard k/10` exactly as an unplanned run would, keeps
38-
// its name `Test Core (k/10)`, its cache key and its attestation
39-
// `test-k-of-10`. Only the shards whose bin is empty are not
36+
// The shard count stays SHARD_COUNT (12 since #36646, read from ci.yml): a
37+
// planned shard runs `--shard k/12` exactly as an unplanned run would, keeps
38+
// its name `Test Core (k/12)`, its cache key and its attestation
39+
// `test-k-of-12`. Only the shards whose bin is empty are not
4040
// started, so no package moves to another shard and no shard carries more
4141
// than it did. This is deliberately NOT a re-sizing to fewer, fuller bins:
4242
// every package diff on main reaches @objectstack/cli, spec, core, objectql

0 commit comments

Comments
 (0)