Skip to content

test(spec): split build-schemas-check-mode.test.ts into six files so the repo project runs them in parallel - #25428

Merged
os-zhuang merged 5 commits into
mainfrom
claude/project-thread-2vwjru
Oct 23, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/project-thread-2vwjru

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Fixes #25372

Clause-②: no
Metadata-protocol: none

The card's re-scope (option A, triage comment 6358468116): split packages/spec/scripts/build-schemas-check-mode.test.ts into several files so the repo vitest project runs them in parallel. Test-only; no turbo.json, partition, ci.yml or shard-count change.

What changes

Verification (head 78a4221bd)

  • No case lost. vitest list --project repo on the old file and on the six new files, file prefix stripped, sorted: 92 and 92 names, diff empty. vitest list --project local matches none of the files.
  • Timing, before and after (local, same 4-core box, same lock, labelled local): the original file alone took 839.06 s (92/92 passed). The six split files run together as the repo project: 370.44 s wall, 92/92 passed, slowest file git-topology 205.4 s. The before figure from CI is on the card: 841.97 s for the file, spec two-task total 1212.41 s (PR run 39893808670) and 1494.69 s in merge-group run 39894014103. The after figure from CI is this PR's own Test Core timing table, read by the seat at review.
  • pnpm --filter @objectstack/spec build, typecheck (includes check:scripts-typecheck): exit 0. pnpm --filter @objectstack/spec test: 711/711 files, 21634 passed, 1 todo.
  • node scripts/pm/dispatch-gates.mjs --commands derived 66 families on the final head 78a4221bd; all 66 ran and exit 0. --ran reconciliation: 66 run, 0 NOT-MEASURED, 0 UNRUN. On the first sweep (head 9f2ed009f, 63 families) check:cross-package-test-inputs answered 1 (fixed above), check-plugin-teardown-shape --self-test answered 3 (its pinned control commit was missing from the shallow clone; fetched), and check:dual-build-cjs-loads / check:lean-entry-closure answered 3 (no built dist); all exit 0 on the final sweep.

Acceptance notes

  • The card's done-when number ("spec's two-task total in a merge-group Test Core timing table drops") can only be read after this lands in a merge group; the before figure above is the one to compare against.
  • scripts/git-env.d.mts:9 (repo root, outside this card's file surface) still names the old file in prose, and scripts/report-test-timings.mjs:935/943 uses the old name as a fixture log line (correct as data). Noted, not changed.
  • The cross-package scan does not follow a test file's imports into same-package helper modules. Here each file now names its input itself; other tests whose out-of-package reads live only in an imported helper would be unseen by the same scan. Noted, not filed.

CI after-numbers (run 39963105499, head dce4c6406, pull_request, Test Core aggregate job 120460015448)

  • Slowest file in spec: 841.97 s before (the one file, PR run 39893808670). After, the six files read 457.69 s (git-topology), 420.84 s (deleted-baseline), 386.75 s (deletion-proofs), 147.50 s (retired-keys), 140.73 s (manifest) and 104.13 s (anchor). The slowest is now 457.69 s.
  • Spec's two-task total (the card's done-when quantity): 1113.11 s in this PR run, against 1212.41 s in PR run 39893808670 and 1494.69 s in merge-group run 39894014103. The merge-group comparison can be read only after this lands.
  • Load cost: on a shared runner, the files run side by side and each takes longer than its serial share. The six together are 1657.6 s of file time, against 842 s for the one file. The wall drops because they overlap.
  • Shard tests steps in this run: 10.6 to 20.4 min (slowest shard 4/6). That is a reading of this run, not a comparison of like with like.
  • Budget lines were re-set from this reading in ab63b4e7e: each is the CI reading × 1.25, rounded up (580, 530, 490, 190, 180 and 140 s). They replace the first apportioned estimates (190 to 240 s), which assumed each file keeps its serial share and came in under the three heaviest readings.

🤖 Generated with Claude Code

https://claude.ai/code/session_01P8iUGfP2wffkVBD5uSfDgq

…the repo project runs them in parallel

The one 5135-line file was the slowest file of the Test Core run (841.97 s,
92 tests) and vitest runs a file's tests serially, so spec's test:repo floor
was this file alone. The shared sandbox, git discipline, run() spawner and
cross-file constants move to build-schemas-check-mode.fixture.ts (not a test
file); each split file registers its own shared sandbox via
useSharedSandbox(). The 15 describe blocks move verbatim, grouped by subject
and balanced on a measured local run; vitest.repo-tests.json lists the six
files, and each carries its own test-budget line.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P8iUGfP2wffkVBD5uSfDgq
check:cross-package-test-inputs reads a test file's own source, not the
fixture module it imports, so five of the six split files stopped showing the
out-of-package input they run against. Each file now names the repo-root
scripts/ directory and hands it to useSharedSandbox(), which is what the
fixture symlinks into every sandbox.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P8iUGfP2wffkVBD5uSfDgq
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 23, 2026
@github-actions github-actions Bot added size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 1 changed file(s) yielded no anchor (packages/spec/vitest.repo-tests.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/spec/vitest.repo-tests.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 144 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json b9c7a8f541a0af1ec82cabad8c9aaab65de895c1 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

CI · Type Check · source gates failed before any check ran · domain:spec seat 1 · 2026-10-23T13:21Z

The job (run 39959968741, job 120435206191, head 78a4221bd) died in checkout: three RPC failed; HTTP 408 / expected 'packfile' fetch errors, then git exit 128. No type check or gate body executed, so this is a runner/network failure, not this PR's. The seat re-runs the failed jobs once when the run completes (scripts/pm/rerun-failed.mjs); a second failure is treated as real.


Generated by Claude Code

…irst CI reading

The apportioned figures (190-240 s) assumed each file keeps its serial share
of the pre-split wall. CI run 39963105499 read the files at 104-458 s: running
side by side on a shared runner, the three heaviest each take longer than
their serial share. Each budget is now that reading x 1.25, rounded up.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P8iUGfP2wffkVBD5uSfDgq
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

维护者速读

  • 改了什么: spec 包里最慢的那个测试文件 build-schemas-check-mode.test.ts(5135 行、92 个用例)拆成 6 个测试文件,再加一个不算测试的共享夹具文件。用例本身一字未改,拆分前后 92 个用例名逐个比对一致。
  • 为什么改: 这一个文件串行跑 842 秒,是 spec 测试的硬底线(ci(test-shards): split spec's build-schemas-check-mode.test.ts (842 s, 92 tests, one file) into several files, so spec's test:repo floor stops setting the slowest Test Core shard — re-scoped from file-sharding spec's test task #25372)。拆开后 CI 的多个 worker 能并行跑。这个 PR 自己的 CI 读数:spec 两项测试总耗时 1212 s → 1113 s,最慢的单个文件 842 s → 458 s。
  • 风险与代价(含回滚): 只动测试和测试清单,不碰任何发布的代码,不需要 changeset。行数大(+5542 / −5150)是因为整块代码搬家。并行后每个文件在共享 runner 上比单跑慢,所以 6 个测试预算行按这次 CI 读数 ×1.25 重设。回滚就是 revert 这一个提交。
  • 席位意见: 建议合并。CI 全绿(49 项,38 成功 + 11 跳过),用例一个没少,范围符合分诊席的改写意见 A(不改 turbo / ci.yml / 分片数)。
  • 你要做的: 行数超过 3000 行人工合并线,请 os-zhuang 或 hotlong 中一位在 PR 上点 Approve,之后席位自动入队合并。

席位核对 · ACCEPT(待人批) · domain:spec seat 1 (seat post #6017) · os-tesla · session session_013odhA26dvzy7pQmevdTTvy · 2026-10-23T14:58Z

Head ab63b4e7e8 · card #25372 · claim 6364060214 · re-scope 6358468116 (option A).

  • Shape: draft, base main, body line Fixes #25372, skip-changeset (scripts/ ship in no package's files[]). 18 files, +5542 / −5150. check-governed-merges: no governed path, but 10692 lines > 3000 ⇒ human merge or an authorized approval from GOVERNED_APPROVERS.
  • Premise measured: 92 → 92 cases (the seat's own count over the six files; the dev's vitest list diff is empty). vitest.repo-tests.json lists all six; the old name is gone from it.
  • Gates pinned to the head: 49 check-runs on ab63b4e7e8, 38 success + 11 skipped, 0 red. The earlier Type Check · source gates red on 78a4221bd was a checkout failure (comment 6365877899), cleared by a real merge of main (dce4c6406).
  • Accepted deviations: each split file names ../../../scripts itself (check:cross-package-test-inputs does not follow imports); budget lines re-set from the CI reading × 1.25 in ab63b4e7e.
  • Out of scope: the cross-package scan not following same-package helper imports is noted in the PR body, not filed.
  • Landing: stays draft, needs-user-decision on the PR, review requested from os-zhuang and hotlong. On an authorized APPROVED the seat runs pr_ready + automerge_enable.

Generated by Claude Code

@os-zhuang
os-zhuang marked this pull request as ready for review October 23, 2026 17:48
@os-zhuang
os-zhuang enabled auto-merge October 23, 2026 17:48
@os-zhuang
os-zhuang added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 87af852 Oct 23, 2026
55 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-2vwjru branch October 23, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-user-decision Blocked on a maintainer decision — do not dispatch; decision cards only, never on a PR size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants