Repository navigation
test(cli): authoring-door spawn family — share repeated spawns, declare budgets (#23181 slice 16) - #26493
Merged
Conversation
…slice 16) Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5pUpKjymejZTAe9SWn
…les (#23181 slice 16) Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5pUpKjymejZTAe9SWn
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contributor
Author
席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | Draft, base main, Part of #23181 (slice 16), skip-changeset (test-only, no files[] change). 8 files in packages/cli/test, +77/−38, all inside the claimed family. |
| Fix | 6 of the 8 files spawn only distinct (command, flags, fixture) triples, so each gets the ruled // test-budget: header at line 2 (ruling 6181973363 letter B). In the 2 per-package parity files, triples repeated: lint parity spawned 9 times for 5 triples, validate parity 7 times for 4. Each now runs every triple once in its beforeAll, and each case reads the shared result. |
| Seat check | The sorted expect( lines of both hoisted files are identical to main's, so every assertion keeps its meaning. The beforeAll allowance is the old per-case 180 s times the spawn count, which is not a raise per spawn. The seat recomputed all 8 budgets from the slowest of three scheduled CI readings × 1.25, rounded up to 10 s: 141.61→180, 60.77→80, 57.37→80, 43.77→60, 33.65→50, 32.22→50, 28.80→40, 20.34→30. |
| Evidence | CI on head 35212c7ebf is green: 36 checks succeeded, 16 were expected skips, and none failed or are pending; mergeable clean. Locally the family ran 75 of 75 green on the head. A/B N=3 for the hoisted files: lint parity 30–32 s → 17 s, validate parity 23–26 s → 14 s. Derived gates: 48, of which 47 exit 0 and 1 is NOT MEASURED locally (check:dual-build-cjs-loads, which needs a full build and which CI runs). |
| Carried | The two hoisted files' budgets (60, 40) come from readings taken before the hoist. The next shard-timings refresh re-sizes them; this PR lowers none by hand, as ordered. Slice 17 (the os verify family, claim 6434344323) is live on other files. |
| Landing | 「按照 pm-dispatch 规则复核过的都授权」 (Leehom, 2026-10-25T11:35Z): ready and auto-merge through the relay, once every check on this head is green or an expected skip. |
Generated by Claude Code
Merged
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Leehom · project thread
Part of #23181 (slice 16). The card is a series and stays open.
Clause-②: no
Metadata-protocol: none
Test-only diff:
skip-changeset. Eight files underpackages/cli/test/, which is not in@objectstack/cli'sfiles[](dist,README.md,CHANGELOG.md); nofiles[]changes in any package.维护者速读
os validate/os build/os lint」的作者门测试文件。其中 2 个把重复的同一条 CLI 调用合并成beforeAll里跑一次;8 个都在第 2 行加了// test-budget:声明。packages/cli/test/lint-per-package-authoring-parity.test.ts的beforeAll、packages/cli/test/validate-per-package-authoring-parity.test.ts的beforeAll(唯二有逻辑改动的地方),其余 6 个文件只有第 2 行。cd packages/cli && pnpm exec vitest run --project integration test/lint-per-package-authoring-parity.test.ts test/validate-per-package-authoring-parity.test.ts,预期 2 个文件 9 个用例全绿,单文件约 14–17 s。What changes
Counted from the code (spawns = CLI child processes per file run; triples = distinct command, flags and fixture):
test/stack-conversion-record-door.test.tstest/stack-provenance-door.test.tstest/picklist-reference-doors.test.tstest/lint-per-package-authoring-parity.test.tsbeforeAll(9 → 5 spawns) + headertest/union-fold-command-parity.test.tstest/package-union-readers.test.tstest/validate-per-package-authoring-parity.test.tsbeforeAll(7 → 4 spawns) + headertest/validate-view-container-name.test.tsNo file is under 10 s in any reading, so every file gets a header.
The two hoists. In
lint-per-package-authoring-paritythe cases spawnedos build --jsonon the flip fixture three times andos lint --jsonon it three times. Invalidate-per-package-authoring-paritythe cases spawnedos build --jsonon the multi-package fixture three times andos validate --jsonon it twice. Each file now runs each distinct triple once, in sequence, in its existingbeforeAll, and each case reads the shared run of its triple. Every assertion is unchanged, in the same case, on the output of the same command, flags and fixture. The hook's timeout is the old per-case allowance (180 s) times the spawns it runs, so no per-spawn allowance moved. The spawns stay sequential: no in-file concurrency.The header. One line at line 2 of each file, the ruled grammar
// test-budget: N — spawns the real producer once per single-cause fixture: REASON(ruling record 6181973363, letter B; grammarreadTestBudgetinscripts/measure-test-shard-timings.mjs). N = slowest CI reading x 1.25, rounded up to the next 10 s. After the hoists every remaining spawn in all eight files is a distinct triple, so the spawn count is the floor.Why
The reading. No shard-timings refresh has run on
mainsince the oclif test manifest (PR #26256). The CI numbers are the vitest module lines (they includebeforeAll) of the three scheduled full-batteryci.ymlruns onmainafter it, all with the manifest setup on:69aa630b9f)e843b5b320)26e7c75e9a)stack-conversion-record-doorstack-provenance-doorpicklist-reference-doorslint-per-package-authoring-parityunion-fold-command-paritypackage-union-readersvalidate-per-package-authoring-parityvalidate-view-container-nameThe first two columns are slice 15's readings (report on #23181). The third run is newer, so it was read too (its Test Core shards via
get_job_logs: 510 cli file lines; the run's own failure is inTest UI (1/16), not Test Core).The two hoisted files keep the pre-hoist budget. Their budgets come from CI readings of the 9-spawn and 7-spawn shapes, the only CI readings that exist. Locally the hoist cuts them by about 44%. A shard-timings refresh re-sizes the budget from the new shape; it is not lowered by hand.
Tests
A/B of the two hoisted files (N=3, one lock hold)
The BASE file (
775a0006bd) copied next to the HEAD file astest/zzbase-*.test.ts, all four in one run,cd packages/cli && pnpm exec vitest run --project integration --maxWorkers=1 --reporter=default, three runs in oneos-verify-lockhold on a shared 4-vCPU container, manifest setup on (queue tier). The copies were deleted before the gates ran. Each run:Test Files 4 passed (4),Tests 18 passed (18), exit 0.lint-per-package-authoring-parityvalidate-per-package-authoring-parityThe family on this head
Same command,
--maxWorkers=2, the eight files:Test Files 8 passed (8),Tests 75 passed (75), exit 0, run wall 155.3 s. Per file (s): stack-conversion-record-door 102.2, stack-provenance-door 41.6, picklist-reference-doors 38.5, union-fold-command-parity 23.8, package-union-readers 20.2, lint-per-package-authoring-parity 18.3, validate-view-container-name 14.1, validate-per-package-authoring-parity 13.9.Header parse, before and after
readTestBudgeton each file at BASE775a0006bdreturnsnullfor all eight (a file over 10 s with no declared budget, the offender reading). On this head all eight return classspawns the real producer once per single-cause fixtureat line 2, seconds 180 / 80 / 80 / 60 / 50 / 50 / 40 / 30.Typecheck and lint
pnpm --filter @objectstack/cli typecheck: VERDICT command-exit 0 (check:test-typecheck: OK).pnpm exec eslint --no-inline-configon the eight files: exit 0.Acceptance notes
package-union-readersalready ran its nine distinct spawns in sharedbeforeAllhooks, two at a time; that pre-existing shape is untouched.test/verify-*.test.ts.Verification
Local gates at
35212c7e:node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 48 commands. Each ran with its exit code captured by redirect before any pipe: 47 exit 0.check-plugin-teardown-shape.mjs --self-testfirst exited 3 on the shallow clone and exited 0 aftergit fetch origin 621a487607.pnpm check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: it needs every package'sdist/, and only the cli dependency closure was built); it is NOT MEASURED locally and runs in CI.--ranreconciliation:48 derived famil(ies) accounted for — 47 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3), exit 0.The three artifact-roster families whose roster sits under
packages/were run too:pnpm check:authz-resolver,pnpm check:error-code-casingandpnpm check:filter-alias-parity, each exit 0. The repo-widepnpm lintand thetest:repoproject are left to CI (Lint & Repo Gates, Test Core).Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (eslint on the eight files locally; the repo-wide run is CI's)main, one pull request.skip-changeset)packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5pUpKjymejZTAe9SWn
Generated by Claude Code