Skip to content

Commit 1eebbc0

Browse files
test(cli): install-local suites run their independent boot chains at once and declare their spawn budgets (#26214)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X96yKfHBKrkwiQFzqVAac71)_ Part of #23181 (slice 10: the `@objectstack/cli` `package-install-local-*` family). The card stays open for later slices. ## Summary The seven `test/package-install-local-*.integration.test.ts` files ran 68 to 275 s each on CI. The order's hypothesis was a per-case boot, but that is not this family's shape. Every file already boots in one `beforeAll`, and the `it`s only read what the phases recorded. The cost is the boots and installs themselves, spawned from the tsx source entry. One `os start` to READY takes about 20 s, and one `os package install` about 15 s. Slice 9's reading on this box: tsx `--version` takes 10.0 to 10.3 s, dist `--version` 2.7 to 3.0 s. The family spawns 23 boots and 26 installs, so no file here can reach the 10 s line on the tsx entry. So this PR gives each file its measured budget. One header line declares the ruled class `spawns the real producer once per single-cause fixture` (ruling record 6181973363, letter B), in the grammar `scripts/measure-test-shard-timings.mjs` reads. `readTestBudget` parses all seven. The diff is those seven lines and nothing else. Every chain stays sequential, as on `main`. No assertion, case, timeout, project or tier changed. **Revised after the seat's review.** The first head also ran chains that share no state side by side: uninstall's orders two at a time, and the `--artifact` CONTROL beside boots 1 and 2. That made each file faster locally, but it is packing on CI's shared box. It also added about 3.3 GB of peak RSS per file (uninstall-cleanups went from 4.2 to 7.6 GB, and four orders at once was memcg-OOM-killed, exit 137). It is taken out. The source-entry oclif manifest (slice 14, a test-only `globalSetup`) is the lever the seat ruled for this cost. Once it lands, the next refresh re-reads these rows and the budgets can tighten. ## The budgets, from CI readings of the sequential shape Each budget is the slowest CI reading of the file as it runs on `main`, x 1.25, rounded up to the next 10 s. Two windows feed the reading. One is the card's table: refresh run `38340176409`, each row the file's slowest run in its window. The other is the hourly full battery run `40290659753` (schedule, 2026-10-26T08:12Z, head `05f7758f05`), read from its Test Core aggregator table and shard job logs. | file | card window (run) | run 40290659753 | budget | |:--|--:|--:|--:| | `uninstall-cleanups` | 275.2 s (38332198724) | 270.1 s | 350 | | `jobs` | 160.9 s (38332198724) | 161.8 s | 210 | | `hooks` | 117.1 s (38332198724) | 114.4 s | 150 | | `jobs-shared-name` | 110.4 s (38332198724) | 107.1 s | 140 | | `jobs-pull` | 107.9 s (38335967790) | no line in the job logs read | 140 | | `handlers` | 99.4 s (38332198724) | 97.8 s | 130 | | `boot-steps` | 94.3 s (38222448090) | 68.2 s | 120 | ## Rows this closes When the next refresh reads each file under its declared budget, these seven #23181 rows close, all `(integration)`: `package-install-local-uninstall-cleanups`, `-jobs`, `-hooks`, `-jobs-shared-name`, `-jobs-pull`, `-handlers`, `-boot-steps`. ## Acceptance notes - Isolation needs no new proof, because the order of execution is `main`'s. For the record, a shuffled run of the family (`--sequence.shuffle --sequence.seed=23181`) on the base files passed 77/77 under the default workers (387.5 s, peak tree RSS 11.2 GB). - Not taken: moving `hooks`' and `jobs-pull`'s boot 2 (the rehydrate of an entry an earlier build wrote) onto its own home. The headers frame it as a restart of the same home. Clause-②: no Metadata-protocol: none `skip-changeset`: the diff is seven comment lines under `packages/cli/test/`. `@objectstack/cli`'s `files` is `dist`, `README.md` and `CHANGELOG.md`, so nothing published moves. ## Local gates (head `ff0ca4cc8`) - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 55 commands on this diff, and each was run with its exit code captured by redirect before any pipe. 54 exited 0. - `check:dual-build-cjs-loads` exited 3 (PREREQUISITE NOT MET: dist of packages outside this diff is not built here). It is NOT MEASURED locally, and CI runs it. - `--ran`: "55 derived, 54 run, 1 NOT-MEASURED, 0 UNRUN", exit 0. - `pnpm --filter @objectstack/cli typecheck`: VERDICT command-exit 0. - `eslint --no-inline-config packages/cli`: exit 0. - No ablation and no test run: the diff is header comments only. The integration tier is declared to CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DcLzU9qErDBr5VydWEmHVM --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 43f1da0 commit 1eebbc0

7 files changed

Lines changed: 7 additions & 0 deletions

‎packages/cli/test/package-install-local-boot-steps.integration.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
// test-budget: 120 — spawns the real producer once per single-cause fixture: three `os start` boots of the tsx source entry in sequence (install, restart on the same home, and the `--artifact` control on its own home) and one `os package install` run; slowest CI reading of this shape 94.3 s (run 38222448090, the card's window; 68.2 s in hourly full battery run 40290659753) x 1.25, rounded up
23

34
/**
45
* #21322 — a hot install (`os package install <artifact>` into a RUNNING

‎packages/cli/test/package-install-local-handlers.integration.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
// test-budget: 130 — spawns the real producer once per single-cause fixture: three `os start` boots of the tsx source entry in sequence (install and reinstall, restart on the same home, and the `--artifact` control on its own home) and two `os package install` runs; slowest CI reading of this shape 99.4 s (run 38332198724, the card's window; 97.8 s in hourly full battery run 40290659753) x 1.25, rounded up
23

34
/**
45
* #21321 — an app installed with `os package install <artifact>` runs its

‎packages/cli/test/package-install-local-hooks.integration.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
// test-budget: 150 — spawns the real producer once per single-cause fixture: two `os start` boots of the tsx source entry on one home (the hot installs, then the rehydrate of an entry an earlier build wrote) and five `os package install` runs, one per package under test; slowest CI reading 117.1 s (run 38332198724, the card's window; 114.4 s in hourly full battery run 40290659753) x 1.25, rounded up
23

34
/**
45
* #21585 — install-local refuses the code it cannot run: a hook with no `body`,

‎packages/cli/test/package-install-local-jobs-pull.integration.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
// test-budget: 140 — spawns the real producer once per single-cause fixture: two `os start` boots of the tsx source entry on one home (the hot installs, then the rehydrate of an entry an earlier build wrote) and four `os package install` runs, one per package under test; slowest CI reading 107.9 s (run 38335967790, the card's window; the job logs of hourly full battery run 40290659753 read here carry no line for this file) x 1.25, rounded up
23

34
/**
45
* install-local refuses an enabled job whose `pull` cannot bind, as it refuses

‎packages/cli/test/package-install-local-jobs-shared-name.integration.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
// test-budget: 140 — spawns the real producer once per single-cause fixture: two `os start` boots of the tsx source entry on one home (the hot installs and an uninstall, then the rehydrate and a second uninstall) and three `os package install` runs, one per package sharing the job name; slowest CI reading 110.4 s (run 38332198724, the card's window; 107.1 s in hourly full battery run 40290659753) x 1.25, rounded up
23

34
/**
45
* #21602 — two install-local packages that declare the SAME job name both keep

‎packages/cli/test/package-install-local-jobs.integration.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
// test-budget: 210 — spawns the real producer once per single-cause fixture: three `os start` boots of the tsx source entry in sequence (install, restart on the same home, and the `--artifact` control on its own home) and six `os package install` runs; slowest CI reading of this shape 161.8 s (hourly full battery run 40290659753; 160.9 s in run 38332198724, the card's window) x 1.25, rounded up
23

34
/**
45
* #21489 — a package's job BODIES run on every door that brings an artifact

‎packages/cli/test/package-install-local-uninstall-cleanups.integration.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
// test-budget: 350 — spawns the real producer once per single-cause fixture: eight `os start` boots of the tsx source entry across four orders of events, run in sequence, each order its own cwd and home, and five `os package install` runs; slowest CI reading of this shape 275.2 s (run 38332198724, the card's window; 270.1 s in hourly full battery run 40290659753) x 1.25, rounded up
23

34
/**
45
* #21490 — an install-local uninstall (`DELETE /api/v1/marketplace/install-local/:id`)

0 commit comments

Comments
 (0)