Repository navigation
test(cli): declare measured budgets on ten os-serve-path boot files (#23181 slice 15) - #26440
Merged
Merged
Conversation
Each of these files spends its wall on real `os serve` / `os dev` / `os start` boots (and the `os build` / `os validate` spawns beside them), one per distinct fixture or flag, already sequential; no boot is shared or repeated. They take the ruled header `// test-budget: N — spawns the real producer once per single-cause fixture: REASON` at line 2, N = slowest CI reading of the two scheduled runs after the oclif test manifest x 1.25, rounded up to 10 s. Comment-only; no assertion, timeout or tier changes. Claude-Session: https://claude.ai/code/session_01FEkQ5nzM2GqFAcHGd5cWx4 Co-authored-by: Claude <noreply@anthropic.com>
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 15), skip-changeset (test-only, no files[] change). Not governed (0 of 10 paths), 10 changed lines. |
| Fix | Measure first, as ordered. No shard-timings refresh exists after #26256, so the offender table comes from the two scheduled CI runs after it (40392443783, 40424746941); the evidence copy is at pm-orders/server/evidence/23181-s15/offenders-after-26256.md. The largest remaining family is 10 packages/cli files whose wall is real os serve / dev / start boots (with their build / validate spawns), one per distinct fixture, with nothing shareable. Each gets the ruled // test-budget: header at line 2 (ruling 6181973363 letter B). |
| Seat check | All 10 headers sit at line 2, and each N is its slowest CI reading × 1.25 rounded up to 10 s. The seat recomputed all ten: 206.80→260, 191.07→240, 68.81→90, 47.95→60, 36.70→50, 34.85→50, 31.59→40, 30.02→40, 24.16→40, 16.35→30. No assertion, timeout or project placement changes. |
| Evidence | 36 check runs succeeded and 16 were expected skips on this head, 0 failed; mergeable clean. Locally N=3: 10 of 10 files and 71 of 71 tests on each run. Derived gates: 54 of 54 exit 0, with 0 NOT-MEASURED. |
| Carried | The report names the slice-11 header files that are now under 10 s after #26256. The next shard-timings refresh can drop their headers; this PR lowers none, as ordered. |
| 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
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 15). The card is a series and stays open.
Clause-②: no
Metadata-protocol: none
Test-only, comment-only diff:
skip-changeset. Ten lines underpackages/cli/test/, which is not in@objectstack/cli'sfiles[](dist,README.md,CHANGELOG.md); nofiles[]changes in any package.维护者速读
os serve/os dev/os start」的测试文件各加一行第 2 行的// test-budget:声明,只是注释。packages/cli/test/serve-config-boot-residual.integration.test.ts、packages/cli/test/artifact-flag-precedence.integration.test.ts第 2 行(预算最大的两行)。node -e用scripts/measure-test-shard-timings.mjs的readTestBudget解析这 10 个文件,预期 10 行都返回spawns the real producer once per single-cause fixture、行号 2。What changes
One header line at line 2 of each file below, 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. Nothing else changes: no assertion, no timeout, no tier, no helper.test/artifact-flag-precedence.integration.test.tsos dev, 7os start(each a supervisor plus itsservechild)test/serve-config-boot-residual.integration.test.tsos serveboots, 2 refused boots, 5os build, 2os validatetest/serve-package-declared-capabilities.test.tsos serveboots, one per case and fixturetest/serve-config-boot-flat-docs.integration.test.tsos serve --devboots, one per fixturetest/serve-view-container-read.integration.test.tsos build, artifact boottest/serve-host-config-metadata-door.integration.test.tsos serveboots of one host config (source, compiled twin)test/serve-no-auth-secret-refusal.integration.test.tsos serveboots, one per case (5 refused before the kernel, 5 reach ready)test/serve-migrate-exit-schema-parity.integration.test.ts--no-server)test/dev-no-watch.pin.test.tsos devspawns, each a distinct argv and directorytest/dev-connector-env-parity.integration.test.tsWhy
The reading. No shard-timings refresh has run on
mainsince slice 14 (PR #26256,9c922b55c1); the newest refresh is run 40275747937, which is older. So the CI numbers above are the vitest module lines (they includebeforeAll) of the only two scheduled full-batteryci.ymlruns onmainafter it: 40392443783 (head69aa630b9f) and 40424746941 (heade843b5b320). Both trees carrypackages/cli/test/helpers/oclif-manifest.global-setup.ts, so every spawn there already has the manifest's 2 s floor. The full re-measured offender table (cli from both runs, plus a local run of the other 64domain:serverpackages) is in the slice report on #23181.Why these ten are one family. Each file's wall is real served boots of the CLI, one per distinct fixture or flag, already sequential in
beforeAllhooks or one per case. Read per file: no boot is repeated on the same fixture and flag, and no two cases could read one boot. So the two recipes that cut time do not apply. Hoisting boots into a sharedbeforeAllgains nothing because the cases are distinct fixtures. Sharing a fixture would merge distinct fixtures. What is left is the spawn floor. The local per-case lines show it: inserve-package-declared-capabilitieseach case is one boot of 7.3 to 12.4 s, and inserve-no-auth-secret-refusaleach case is one boot of 1.6 to 3.6 s.Why not the other boot files.
dev-boot-output-order.integration.test.tsboots one fixture several times on purpose (one order "on every boot").package-restart-acceptance.integration.test.tsanddev-standalone-self-heal.integration.test.tsboot one database twice because the restart is what they test. The class text "once per single-cause fixture" would be false for those three, so they are left for their own reading.serve-runtime-state-project-key.test.tsspawns a writer child, not the CLI.Tests
Comment-only diff, so behaviour and wall are the tree's. A/B of a comment line measures nothing, so the after reading is the same three runs on this head's tree.
Local runs of the family (N=3, one lock hold)
cd packages/cli && pnpm exec vitest run --project integration --maxWorkers=2 --reporter=defaultplus the ten files, three times in oneos-verify-lockhold, on a shared 4-vCPU container, manifest setup on (queue tier). Each run:Test Files 10 passed (10),Tests 71 passed (71), exit 0. Run walls 297.2 / 285.2 / 270.8 s. Sum of file lines 526.4 / 512.8 / 484.7 s.Header parse
All ten lines parse through
readTestBudget(exit 0): each returns classspawns the real producer once per single-cause fixtureat line 2, seconds 260 / 240 / 90 / 60 / 50 / 50 / 40 / 40 / 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 ten files: exit 0.node scripts/check-nul-bytes.mjs: exit 0.Acceptance notes
test/generate-refuses-retired-generator.test.ts(9.95 / 9.67 s) andtest/generate-refuses-name-outside-charset.test.ts(8.77 / 6.49 s). Under 10 s in one run only:-namespace-prefix(13.11 / 8.61) and-unparseable-name(12.37 / 7.82). Still over in both:-unimportable-aliasand the fivebuild-*files. Other slices' headers under 10 s in both runs:serve-plugin-auth-load-failure-refusal(9.86 / 7.15) andserve-datasource-mapping-before-sync(7.64 / 5.08). ⛔ Not lowered by hand, per the order: a refresh re-sizes them.Verification
Local gates at
0863e1aa3:node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 54 commands. Each one ran with its exit code captured before any pipe, and all 54 exit 0. One of them,check-plugin-teardown-shape.mjs --self-test, first exited 3 on the shallow clone; it exited 0 aftergit fetch origin 621a487607.--ranreconciliation:54 derived famil(ies) accounted for — 54 run, 0 NOT-MEASURED, exit 0. The repo-widepnpm lintis left to CI.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (eslint on the touched files: exit 0)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_01FEkQ5nzM2GqFAcHGd5cWx4
Generated by Claude Code