Skip to content

ci(test-core): place slice shards by wall and widen Test Core to twelve shards - #38258

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-36646-queue-shards-ab
Nov 28, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/issue-36646-queue-shards-ab

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Part of #36646
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:合并队列里"核心测试"这一项从十台机器分到十二台,带命令行切片的那几台不再先跑一堆别的包,预计全量构建的这一项提前约三分钟结束。
  • 属于"合并队列速度预算"这张每周自动生成的提速卡(队列中位数 22.9 分钟,预算 22 分钟),本单只做其中两项已裁定的措施。
  • 出错时表现为某台测试机变慢或测试分配报错,不会漏测;只改了流水线配置和分配脚本,整单回退即可撤回。
  • 要你做的:这是受管的流水线文件,需要你审阅并亲手合并。

What changes

Levers A and B of the routing in the release comment on #36646 (7232820216), on one branch; C and E are not taken, D is left.

  • A — wall-aware slice placement (scripts/partition-test-shards.mjs, new placeByWall() / wallOfBin(), called from placeItems()). A split that carries a CLI slice is no longer balanced on bin sums. Slices go first, one per shard, then whole packages land on the slice-free shards while each whole leg stays within WHOLE_LEG_CAP_SECONDS (1868 s) and LOAD_SENSITIVE_APART stays apart; only past that do they spill, least modelled wall first (so onto a non-reader slice shard before the reader slice's, whose declaration closure is 270 s of serial wall). A split with no slice is still the plain LPT split, byte for byte, and the density-cap repair (refineToCap) still runs after either placement.
  • B — Test Core 10 → 12 shards (.github/workflows/ci.yml, the test job and test-gate): the matrix fallback roster, the job name, --shard k/12, the attestation --total 12 / artifact names, the gate's --leg test/12 and planned-roster fallback, and the timing-capture/cache-prune labels. SHARD_COUNT is read from the matrix (scripts/ci-shard-matrix.mjs), so the partitioner, the planner and the timings selector follow without a literal of their own. scripts/pm/landing-k.mjs's self-test pins the shard job's name, so that pin moves to /12.
  • Both have to land together: at ten shards, placing by wall pushes seven whole legs to 1866-1868 s, which is the density PR ci(test-shards): place Test Core bins by predicted wall, and cut the CLI into 4 slices on the refreshed dataset #25968 was reverted at. The new self-test pin refuses any whole leg within 5% of the cap. At twelve, the nine slice-free shards hold every whole package at 1515-1520 s, below the 1696 s they carry at ten today.
  • Comments updated where they state the count (the test job header gains a TWELVE paragraph; plan-test-core-shards.mjs header; the SHARD_COUNT docblock carries the figures).

Tests

Partitioner self-test: new battery and ablations
  • New battery a split that carries a slice is placed by wall (#36646) (8 cases). 3 cases grade the committed dataset as CI splits it: no whole package beside a slice except the reader slice's riders; the non-reader slice shards' heaviest modelled wall falls while the split's heaviest does not rise; no whole leg within 5% of the cap. 5 are fixtures: the spill order, the load-sensitive pair, a package that fits no bin, slice spread, and the no-slice identity. The battery floor goes 18 → 19.
  • Two existing pins re-stated for the new placement. (1) The reader-slice room pin (3e) now asserts the reader shard carries only its riders, not "300 s less than the other slice shards", which read 53 s against 0/0 s once those carry nothing. (2) The closure-allowance refusal fixture now uses a cap under the split's own mean, because the repair starting from the wall placement can descend below "densest − 1 s".
  • node scripts/partition-test-shards.mjs --self-test: self-test OK (82 measured packages -> 84 shard items, 12 shards, max/mean 1.18x <= 1.3x, floor 1314s, bins 1662.99/827.08/827.08/1514.98/1517.07/1517.11/1517.79/1518.22/1517.51/1518.58/1517.13/1519.68s within the 2481.24s density cap, whole legs 53/0/0/1515/1517/1517/1518/1518/1518/1519/1517/1520s within 1868s, file-level slices: @objectstack/cli x3).
  • Ablation 1, through scripts/ablation-replace.mjs: placeItems routed back to partition(). The mutation landed (anchor 1 → 0, blob 18e01104a20d → adfbed35e9c3), the self-test exited 1 on wall placement: the committed dataset at 12 shards puts whole packages beside a slice (@objectstack/service-settings on shard 5, …), and the file was restored to blob 18e01104a20d with an empty git diff HEAD.
  • Ablation 2: the whole-leg cap filter dropped from placeByWall. The mutation landed (blob → e76084fdaefa) and the self-test exited 1 on the spill fixture split as [c 1/2 | c 2/2 | w,x,y,z]. Restored the same way. The committed dataset does not spill at twelve, so only the fixture can catch this one.
  • Other self-tests green on this tree: plan-test-core-shards (23 cases), ci-shard-matrix (27, live: test=12), check-shard-attestation (360), select-shard-timings-run, landing-k (47).

Acceptance notes

  • Affected job, before and after (advisory, per AGENTS.md).
    • Before, measured: queue-duration.mjs --since 7d at 2026-11-28T10:09Z over 1319 all-green SHAs gives p50 22.9 and p90 32.3 min (over both). Its slowest critical-run job is Test Core (3/10) at a 19.6 min median.
    • On the 60 latest green merge_group CI runs (2026-11-28), 42 started Test Core, and their slowest Test Core job reads p50 21.9 min measured.
    • After, modelled, not measured: each run's own package list is replayed through planShards(), before at 10 and after at 12, with a whole-leg fit from those runs' logs (297 legs: -45 + 0.326*sum + 0.351*heaviest, median error 20.6%) and each run's measured slice legs.
    • Result: the slowest Test Core job goes 19.2 → 18.3 min modelled (A+B). B alone is 19.1, and A alone at ten is 19.1, but A alone puts the whole legs at the cap. On the 28 runs that started all ten shards: 22.1 → 19.1 modelled.
    • Applied to those runs' measured job ends, the CI run wall over all 60 goes p50 25.7 → 25.0 and p90 34.1 → 29.1. Projected onto the 7-day reading: queue p50 about 22.2 min, p90 under the 32-min alarm. That is not yet under the 22-min budget.
    • A real post-merge reading is owed: the next weekly queue-duration-budget run, or node --use-env-proxy scripts/ci/queue-duration.mjs --since <merge time> once a few hundred queue SHAs have run at twelve.
  • What still sets the floor.
    • After this change the reader slice's shard (CLI 1/3 plus its 270 s declaration closure) is the heaviest modelled Test Core shard.
    • In the sample, the runtime shard (Test Core (3/10): @objectstack/runtime alone measured 19.5-22 min) was the slowest on 9 of 28 all-ten runs. Neither lever moves a single package's own wall.
    • The Dogfood Regression Gate shards (17 min median) and Test UI also stay where they are.
    • So reaching under 22 needs a separate lever on one of those. That is not this PR, and Part of leaves the card open for the weekly reading.
  • Cost. Two more runners on a full plan, ~+3.6 runner-min at the per-shard overhead the test job header already measures. Shards 11 and 12 start with a cold per-shard Turbo cache key until main's push runs seed them, and every shard's package set moves once, so the first queue runs after merge read slower than steady state.
  • The shard-timings refresh judges each run at its own Test Core (k/N) width, so the ten-wide runs stay readable. Its next refresh needs twelve-wide runs to accumulate.
  • scripts/ci/queue-budget.json is untouched.
  • skip-changeset: the diff ships nothing from any published package (root scripts/ and .github/ only).

Verification

Read first:

  1. scripts/partition-test-shards.mjs, placeByWall() and placeItems(). The risk is the candidate filter: the cap and the apart pair, then the fallbacks.
  2. .github/workflows/ci.yml, the test job's strategy.matrix and test-gate's --leg test/12 and OS_TEST_PLAN. Every /10 literal of the job has to move together.
  3. The new 3f battery in the same script's self-test.

Two-minute check: node scripts/partition-test-shards.mjs --self-test prints 12 shards, and whole legs 53/0/0/1515/…/1520s within 1868s, so the three slice shards carry their slices only.


Generated by Claude Code

…ve shards

A split that carries a CLI slice is now placed by modelled wall: slices
first, then whole packages onto the slice-free shards while they fit
WHOLE_LEG_CAP_SECONDS and keep LOAD_SENSITIVE_APART apart. Twelve shards
give the nine slice-free shards room (whole legs 1515-1520s on the
2026-11-23 dataset), so the slice shards run their slice alone.

Claude-Session: https://claude.ai/code/session_016WV4cxRDKprCtjpEdtiPFW
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · f7e02ac · 2026-11-28T11:00Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f7e02acb1f1b7b83c19a3e05733ee1ae6409ceb3
Security-touching: no — the test and test-gate jobs keep their permissions, secrets, cache-write rules and triggers; only the matrix width, the names derived from it and comments move
Local-runs: none
Scope: .github/workflows/ci.yml + scripts/partition-test-shards.mjs, scripts/ci/plan-test-core-shards.mjs, scripts/pm/landing-k.mjs

PR #38258 (card #36646), net diff of the head against merge base e42520c67bcef027552f8db83655ff9b54d32cef: 4 files, +299 / -50. Read: the card body and all 10 comments (dev reports 7238234724 and 7232799392 in full, the routing release 7232820216, the claim 7237619003), the PR body and file list, the net diff, the head tree of the four files and of every consumer named below, and the check-runs on the head (36 success, 14 skipped, 0 failure; Lint & Repo Gates, Lint · CI, release & engine gates, Lint · scoped · tooling self-tests, Plan Test Core shards, Test Core, Test Core (1/12) to (3/12), Governed Surface Queue Guard all success).

① Derived judgments

  • Matrix width 10 to 12 (ci.yml). Right, and complete. Every spelling of the width inside the test and test-gate jobs moved together: the fallback roster in strategy.matrix.shard, the job name:, --shard k/12, the closure-assert / leftovers / drift / prune labels, report-test-timings --shard, the three artifact names (test-core-run-summary-k-of-12, test-core-timings-k-of-12, shard-attest-test-k-of-12), --total 12, the gate's --leg test/12 and its OS_TEST_PLAN fallback roster. A grep of the head's ci.yml finds no /10 or -of-10 left in either job; the two remaining "ten" figures in tables are dated history. The gate's fallback roster is byte-equal to the matrix's, which check:shard-attestation holds (green on the head).
  • Required context. Unchanged: branch protection reads the bare Test Core (the test-gate job), which the diff does not rename. check-required-contexts.mjs derives the shard name from shardTotal(ci.yml, 'test'), so it follows.
  • Accept-set of the partitioner. placeItems() now routes any split that carries a slice through placeByWall(); a split with no slice is partition() exactly as before (the function returns before any new code). Right for Test Core. One reach the PR body does not name: planRun() is also the nightly tiers' path (test-nightly-tiers.yml, --shard k/4, the CLI cut across the three shared shards), so the nightly's placement goes through placeByWall() too, with LOAD_SENSITIVE_APART and the whole-leg cap now applied there. With one equal slice on every shared shard the wall order equals the whole-sum order, so it is LPT on the whole packages plus the pair rule; coverage and determinism are unchanged, and slices now spread by construction instead of by the weights. Judged right; recorded as N3.
  • Consumers of the width outside the diff (read, not reviewed):
    • scripts/ci-shard-matrix.mjs liveShardTotal('test') counts the fallback roster in the matrix expression, so SHARD_COUNT is 12 in partition-test-shards.mjs, plan-test-core-shards.mjs and select-shard-timings-run.mjs with no literal of their own.
    • select-shard-timings-run.mjs: runIsEligible() reads each run at its own width (runShardWidth(), the M of that run's Test Core (N/M) names) and matches job and artifact names at that width; SHARD_COUNT is only the matchers' default. Ten-wide scheduled runs inside retention stay eligible and twelve-wide ones are eligible from the first; there is no window with no eligible run. A run whose jobs disagree on M is refused by name, which no single run can produce here because one run reads one ci.yml.
    • check-shard-attestation.mjs: verify-time counts come from --leg test/12 and --planned, the static half from shardTotal(); attestations are same-run artifacts with one-day retention, so nothing reads across the width change.
    • Drift check (--check-drift): per-package measured against predicted over the intersection; no shard count enters it, and the label is text only.
    • landing-k.mjs reader: TEST_CORE_SHARD is /^Test Core \(\d+\/\d+\)$/, width-agnostic; only its self-test pin of the ci.yml job name carried the literal, and the diff moves it.
    • measure-test-shard-timings.mjs, shard-timings-refresh.yml, report-test-timings.mjs --merge and the gate's test-core-timings-* download all match N-of-M or a prefix. queue-duration.mjs keys job medians by full job name, so for one window the weekly card lists (k/10) and (k/12) rows side by side with smaller samples each: cosmetic.
    • Per-shard Turbo cache keys carry the shard index, not the width: indices 11 and 12 start cold and every index's package set moves once. A cost, stated in the PR body, not a correctness matter.

② Semver level

Clause-②: no — agreed. The diff touches .github/workflows/ci.yml and root scripts/ only; no published package, no spec, no changeset owed. The skip-changeset label is on the PR and Check Changeset is green on the head.

③ Boundary flags

  • Dev report 7238234724 carries open_questions: []. Nothing to answer.
  • Its one deviation, that the PR run's affected set carried no CLI slice so placeByWall() has not run on a real CI run, is answered in ④ (accepted, with the reading that is owed).
  • Its two out-of-scope notes (the runtime shard as the next floor; the reader slice's shard as the heaviest modelled shard after this change) are consistent with the code and are the seat's to carry on the card; Part of #36646 leaves it open.
  • File surface: claim 7237619003 names scripts/partition-test-shards.mjs and the matrix width in ci.yml. The diff also touches scripts/ci/plan-test-core-shards.mjs (header comment only) and scripts/pm/landing-k.mjs (one self-test literal). Both are mechanical consequences of the width, and the landing-k pin would red without it; no claim amendment is on the card. For the seat to note, not a finding on the tree.
  • Governed path: ci.yml is Tier H; the PR body asks for the maintainer's own merge. scripts/ci/queue-budget.json is untouched, as the card requires.
  • SQL push-down: not applicable, no data-access code in the diff.

④ Design judgment

No must-fix, no should-fix.

ci.yml against the ruling it implements (release 7232820216: levers A and B together, C and E not taken, D left). Holds. The TWELVE paragraph cites report 7232799392's figures as that report states them (whole leg p50 287 s, slice leg p50 887 s, 12 sampled runs). Its arithmetic checks against the committed dataset: 13711 s of whole packages over the nine slice-free shards is about 1518 s each, under the 1868 s cap and under the 1696 s carried at ten; at ten, seven slice-free shards hold at most 13076 s, so the rest spills and the seven sit at the cap, which is the density the ruling refuses for A alone. The fallback sentence ("falls back to all twelve shards") is true of the expression beside it.

placeByWall() against its stated invariants.

  • Every item on exactly one shard. riders, slices and wholes partition items by two predicates (rides, then slice). Every slice and every whole is put exactly once by its loop. A rider is one only when its rideWith name is present, that name is a non-rider (only non-slice items get rideWith, and the anchor is a slice), so it is placed exactly once, by placeWithRiders at its anchor. least() returns -1 only on an empty candidate list, and the last fallback in both loops is all, non-empty for any shard count of at least 1. A package that fits no bin still lands (third fallback); the over-cap fixture pins the name set.
  • Slices spread. Explicit (!bins[i].pkgs.has(it.pkg)), no longer a property of the weights; assertSlicesSpread() still runs in planShards() and planRun().
  • Cap and pair. fits is the pair-safe bins whose whole leg stays at or under legCap; riders are counted in bin.whole. Past the cap the order is pair-safe least wall, then least of all, as the comment says. wholeLegProblems() (pin 3d) still grades the committed split.
  • Determinism, and agreement of --shard k/12 with the planner. Sorts tie-break by name, least() by lowest index, and wall is recomputed from the bin's own names on each put, so the result is a pure function of the item list. main() and plan-test-core-shards.mjs both call planRun(), one at the argv count and one at SHARD_COUNT, from the same checkout; the shard step's --verify --digest reds a disagreement at run time. Slices always land on shards 1 to 3 (reader slice first by packed weight), so the declaration-building shard is stable.
  • Fallback to all twelve. A dead plan job leaves the matrix on 1 to 12; each shard computes its own bin at k/12, the bins are a partition of the items, so the twelve cover everything, and the gate then counts 1 to 12. A slice-only shard is handled by the test step ([ -n "$FILTERS" ] || continue on the whole leg) and an empty one by the existing exits.
  • Cap repair after the wall placement. refineToCap() runs on packed totals as before. On today's dataset the cap at twelve is the CLI's own whole bin (2481.24 s) plus a 71 s allowance, and no wall-placed bin can pass about 1663 s (reader slice, charge and rider) or 1868 s (a whole leg), so the repair is a no-op and the CLI cannot flip back to whole on any subset of the list.

Tried to break it.

  • A sliced PR subset with few whole packages: slices on 1 to 3, each whole package on its own empty shard, as sum-LPT did at ten; at most two more runners.
  • A future refresh in which the CLI falls under a bin's mean: the cap becomes the mean, the wall placement overshoots it, and the repair moves whole packages back beside the slices. The split stays complete; the new strays pin then reds the refresh PR's self-test and names the cause. The same goes for whole-package growth of about 17 percent, where the 95-percent-of-cap pin reds. Both are tripwires at refresh time, not silent.
  • Zeroing the closure charge: the spill fixture ties and the reader shard takes the spill, so the fixture reds; the old literal-room pin's purpose survives its restatement.
  • The restated closure-allowance fixture and the re-stated 3e pin grade the same properties under the new placement; neither loosens what the cap or the charge refuses.

No real CI run has exercised placeByWall(). Accepted on this head. The function is pure, and the self-test (run green by the lint workflow on this head) drives planShards() on the committed full list at twelve, which is the path a full-plan run takes; the per-shard digest check covers planner agreement at run time. What no pre-merge check can show is the measured wall and red rate of the new co-location. The density moves the safe way (whole legs 1515 to 1520 s against 1696 s today, the pair kept apart, slices alone on their runners), and the change is one revert. The post-merge reading the PR body owes (the first full-plan queue or scheduled runs at twelve: slice-shard tests step, red rate, drift verdicts) should be posted on the card before the next lever is built on these numbers.

Nits, none affecting correctness or the contract; all sit in comments on non-prose faces, so they are left as accepted deviations or a follow-up, not fixed on this head:

  • N1 (nit) — ci.yml, test job header: "splits the package list into ten deterministic bins balanced on MEASURED per-package test duration" was left as is; the count is twelve, and a split that carries a slice is no longer balanced on sums. The EIGHT paragraph's "each slice placed at its PLAIN weight so every bin keeps the whole-package split's density" is likewise superseded by the TWELVE paragraph above it.
  • N2 (nit) — partition-test-shards.mjs: the DECLARATION_READER_SLICES docblock still says the charge makes the reader shard and the other slice shards "come out equal in the wall model"; under placeByWall() the reader shard is the heaviest modelled shard by its 270 s closure. The closureAllowance() docblock lists the allowance at 8 and 10 shards and not at 12 (71.18 s).
  • N3 (nit) — the nightly tiers lane reaches placeByWall() through planRun(); neither the PR body nor the new comment says so. Behaviour there is LPT on whole packages plus the pair rule; a line in the placeByWall() comment or on the card would save the next reader the derivation.
  • N4 (nit) — the ci.yml TWELVE paragraph and the PR body say seven whole legs sit at the cap at ten; report 7232799392 and release 7232820216 say five. The arithmetic supports seven; the card's figure is the stale one.

Implemented-by: claude/issue-36646-queue-shards-ab
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): ACCEPT at head f7e02acb1f1b7b83c19a3e05733ee1ae6409ceb3 (Part of #36646, levers A and B).

Review summary

  • Lever B, 10 to 12. Every Test Core literal in ci.yml moves together: the job name, the matrix fallback roster, the gate's OS_TEST_PLAN fallback, --leg test/12, --total 12, the artifact names and the report labels. I grepped the head tree for a stale /10, -of-10 or --total 10 that refers to Test Core and found none. Consumers outside the diff follow without a literal:
    • SHARD_COUNT is read from the matrix roster.
    • select-shard-timings-run.mjs judges each run at its own width, so ten-wide runs stay eligible.
    • landing-k.mjs's reader regex is width-agnostic; only its self-test literal moved.
  • Lever A, placeByWall. The contract record finds that every item lands on exactly one shard. The planner and --shard k/12 share planRun(), and the shard step's --verify --digest reds a disagreement. The all-twelve fallback covers everything.
  • My local runs at this head, all exit 0:
    • partition-test-shards.mjs --self-test: 12 shards; whole legs at 1520 s at most, against the 1868 s cap; density cap 2481 s.
    • plan-test-core-shards.mjs --self-test: 23 cases.
    • landing-k.mjs --self-test: 47 cases.
    • select-shard-timings-run.mjs --self-test.
  • Contract record. 7238340742 is PASS at this head with its tier verified, Security-touching: no, and nothing graded open.
    • Nits left as accepted deviations or a follow-up: N1, the ci.yml header still says "ten deterministic bins". N2, two stale docblock statements. N3, the nightly-tiers lane also goes through placeByWall(), which is not named in the body. N4, seven against five whole legs at the cap.
    • Under ③, the claim's file surface does not name plan-test-core-shards.mjs or landing-k.mjs. Both edits are mechanical consequences of the width.
  • Gates. At this head the check-runs read 36 success, 14 skipped, 0 failed and 0 pending, and the PR is mergeable clean.

Owed after merge: placeByWall has not yet placed a CLI slice on a real CI run. The post-merge wall and red-rate reading goes on #36646 before the next lever is built.

Next: Tier H (.github/workflows/**). It goes to seat 1 for the human merge or an authorized approval, and then the landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Seat record · 2026-11-28T11:09Z · PR #38258 (Part of #36646) · head f7e02acb1f1b7b83c19a3e05733ee1ae6409ceb3 · governed .github/workflows/ci.yml, scripts/pm/** — Tier H

维护者速读

  • 做什么:合并队列里"核心测试"这一项从 10 台机器分到 12 台,带命令行切片的那几台不再先跑一堆别的包。按模型估算,最慢那台从 19.2 分钟降到 18.3 分钟,队列中位数约 22.2 分钟(预算 22 分钟)。这是"合并队列超出速度预算"那张卡(merge queue over its speed budget #36646)里已裁定的措施 A 和 B。
  • 风险:4 个文件 +299/−50,只动流水线配置和测试分配脚本,不碰产品代码,用户无感。出错时表现为某台测试机变慢或分配报错,不会漏测;整单回退即可撤回。
  • 要你做什么:审批人批准即可。契约审核 PASS 7238340742,Head-sha f7e02acb1f1b7b83c19a3e05733ee1ae6409ceb3;批准后座位自主落地。
  • 不批会怎样:队列继续超预算,每张 PR 进队列多等约一分钟以上。

Seat opinion: land.

席位核对 — ACCEPT · repo:objectstack#1 · head f7e02acb1f

  1. Shape. Draft, base main, 4 files (+299/−50): .github/workflows/ci.yml (+38/−24), scripts/ci/plan-test-core-shards.mjs (+5/−5), scripts/partition-test-shards.mjs (+255/−20), scripts/pm/landing-k.mjs (+1/−1). Body: Part of #36646 (levers A and B of release comment 7232820216), Clause-②: no, Metadata-protocol: none; no .claude/** path, so no Rule-change line is owed. check-governed-merges reads GOVERNED ⇒ Tier H.
  2. Premise measured. A split that carries a CLI slice is placed by modelled wall (placeByWall() / wallOfBin()); a split with none is partition() as before. The matrix, job names, --shard k/12, attestation --total 12 and the gate's --leg test/12 move together, which the contract record reads as one change: at ten shards wall placement alone would push seven legs to the density ci(test-shards): place Test Core bins by predicted wall, and cut the CLI into 4 slices on the refreshed dataset #25968 was reverted at. scripts/ci/queue-budget.json is untouched. The contract record reads Security-touching: no (permissions, secrets, cache-write rules and triggers unchanged).
  3. Gates (check-runs at this head). 36 success, 14 skipped, 0 failed. mergeable clean. landing-k K = 7.
  4. Accepted deviations. L1 nits N1 to N4 (the ci.yml header's "ten deterministic bins", two stale docblock lines, the nightly-tiers lane also reaching placeByWall(), and the claim's file surface not naming plan-test-core-shards.mjs / landing-k.mjs) go onto merge queue over its speed budget #36646 as follow-ups. No real CI run has exercised placeByWall() yet; accepted on the pure function plus its self-test battery.
  5. Out of scope → where it went. Levers C and E are not taken and D is left on merge queue over its speed budget #36646, which keeps pm:dispatched. Owed after merge: o1-F posts a real-run wall and red-rate reading on merge queue over its speed budget #36646 after the first queue runs that place a CLI slice, before the next lever. The card is p2; the maintainer's 2026-11-28 fleet line 「CI 和合并队列 可以派」 lifts the fleet p1-only line for it.
  6. Landing terms. L1-a ACCEPT 7238348047 + contract review PASS 7238340742 (CONTRACT_REVIEW_TIER, same head) ⇒ ②③ in one --handoff stroke. After an authorised APPROVED, seat 1 lands it (maintainer's seat-thread line 2026-11-26T13:33Z 「审批人批准后的 Tier H PR 你可以自主落地」). A head move other than a clean main merge withdraws the hand-off.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Approval request · governed .github/workflows/ci.yml + scripts/pm/** (Tier H) · PR #38258 (Part of #36646) · head f7e02acb1f1b7b83c19a3e05733ee1ae6409ceb3

@os-zhuang: levers A and B of #36646. Test Core widens from 10 to 12 shards, and a split that carries a CLI slice is placed by modelled wall instead of bin sums. The modelled slowest shard falls from 19.2 to 18.3 min. Permissions, secrets, cache rules and triggers are unchanged, and queue-budget.json is untouched. Records on this head:

  • L1-a ACCEPT 7238348047
  • contract review PASS 7238340742 (CONTRACT_REVIEW_TIER)
  • seat record ACCEPT above

Every check is green or expected-skip. An APPROVED review on this head lets seat repo:objectstack#1 ready and land it; nothing else is asked.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 28, 2026 11:12
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 46138794448 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (3/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/expression-conformance.test.ts > ADR-0058 D7 — expression surface conformance ledger > is a sound conformance ledger + ratchet (ADR-0060 checkLedger)
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: UNCLASSIFIED surface — add a ledger row (ADR-0060): data/object.zod.ts:ObjectSchemaBase.uiReadonlyWhen: expected [ Array(1) ] to deeply equal []
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 21 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Queue ejection diagnosis · 2026-11-28T11:41Z · PR #38258 · head f7e02acb1f · not this PR's

Queue build 46138794448 failed one assertion: test/expression-conformance.test.ts, the ledger reports an UNCLASSIFIED surface, data/object.zod.ts:ObjectSchemaBase.uiReadonlyWhen. That key is not on main. #38169 adds it ("object-level uiReadonlyWhen"), and it sat ahead of this PR in the same speculative stack. The merge-queue triage counts #38169, #38258 and #38262 as one hit (anchor #38294). #38169's landing seat dequeued it at 11:34Z. This PR's diff is CI planning and partition scripts only, and it touches no schema or ledger.

@os-zhuang: there is no APPROVED review on this head; the merge was enqueued by hand. So the seat cannot re-arm it, and it waits for your re-enqueue, or for an APPROVED that lets seat 1 land it. Nothing on the PR needs to change.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Correction · 2026-11-28T11:43Z · to my diagnosis 7238720218 on PR #38258

The cause stands: #38169's uiReadonlyWhen, not this PR. The second paragraph was wrong. This PR was never removed from the queue. The timeline shows added_to_merge_queue at 11:12Z with no removal, and a queue ref gh-readonly-queue/main/pr-38258-6537b686cf is live, rebuilt without #38169. No re-enqueue is needed; @os-zhuang, please disregard that ask.

@os-zhuang
os-zhuang deleted the claude/issue-36646-queue-shards-ab branch November 28, 2026 12:14
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants