Repository navigation
test(cli): json-stdout-purity drives os plugin install and os plugin trust list (nightly red) - #27621
Conversation
…in trust list` The nightly-only family pin went red on both #27123 commands. `plugin trust list` calls `bootSchemaStack(` itself; `plugin install` boots only through `utils/plugin-trust-read.ts`, so the discovery now follows src/utils modules that boot the stack (to a fixed point) instead of dropping a member that still boots. Install is driven with an artifact built, signed and trusted the way #27335's tests do, under an OS_HOME of its own; trust list in its bare read-only form. Claude-Session: https://claude.ai/code/session_01QSeKYoZarrfSp6eFqVaxPo Co-authored-by: Claude <noreply@anthropic.com>
…on-purity-plugin-family
📓 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): |
|
domain:devx#2 · os-justin · session_01QSeKYmTYfaPbLQD4BJfomW 席位核对 — ACCEPT · domain:devx#2 · head
|
domain:devx#2 · os-justin · session_01QSeKYoZarrfSp6eFqVaxPo
Part of #27114 (the card stays open until a scheduled
Nightly tiersrun is green)Clause-②: no
Metadata-protocol: none
维护者速读
json-stdout-purity现在实际驱动os plugin install --json与os plugin trust list --json两条新命令,并且命令发现会顺着src/utils里替命令启动内核的工具模块找成员。main的夜间检查因此一直是红的。packages/cli/test/json-stdout-purity.e2e.test.ts里的bootingUtils()与discoverFamily(),其次是PREPARE['plugin install']。OS_TEST_TIERS=nightly pnpm --filter @objectstack/cli exec vitest run --maxWorkers=2 test/json-stdout-purity.e2e.test.ts,应看到Tests 77 passed (77)。What changes
packages/cli/test/json-stdout-purity.e2e.test.tsonly. It is a nightly-tier file, so no pull request or queue run executes it.bootingUtils()collects thesrc/utilsmodules that callbootSchemaStack(, plus the modules that import one of them, until nothing new joins. The function's own definition inschema-migrate.tsdoes not count. A command joins the family if it boots directly or imports one of those modules, and it declares--json. Before this change, the discovery was a probe of the command's own text. Since feat(cli, runtime, core):os serveloads the pluginsos plugin installinstalled, re-verified and dispatched byruntimetier;os plugin disable | enable | uninstall(#27123, slice 2 of 3) #27374,os plugin installboots only throughutils/plugin-trust-read.ts, so that probe had dropped it from the family while it still boots and still has a--jsonface. Today the closure isplugin-trust-readandinstalled-plugins-boot. The only commands that import them areplugin installandserve, andservehas no--json. The discovered set is 25.plugin installis driven to its full install. A newPREPAREmap holds per-member setup. For this member it builds the artifact and signature the way the command's own integration tests do (createTarGz+computeIntegrity,generateEd25519KeyPair+signPayload). It then trusts the key in this member's database withos plugin trust add, and throws if that exits non-zero. The member runs under anOS_HOMEinside the fixture directory. The face driven is theinstalleddocument, emitted after the read-only trusted-key boot has shut down.plugin trust listis driven bare. It boots read-only against a database file that does not exist yet, so the face driven is its empty listing.config-miss-stdout-purity.e2e.test.tsis unchanged. Neither member importsutils/config.js, neither refuses before boot, and that file stays green (below).Tests
Reproduction on origin/main ad3a640: red, 1 failed / 70 passed
OS_TEST_TIERS=nightly pnpm --filter @objectstack/cli exec vitest run --maxWorkers=2 test/json-stdout-purity.e2e.test.tsThe 2026-10-29 scheduled run showed
…(24)vs…(22)withplugin installtoo. #27374 landed afterwards, which is whyplugin installis absent here: its boot moved into the util.After, at merged head b743a63: both files green
The count goes from 71 to 77: two members, three cases each.
Hand probe: install reaches its success face, not a refusal
I ran the same fixture by hand through
bin/run-dev.js:plugin trust addexits 0.plugin install --json purity.ospluginexits 0. stdout parses as one document with keysinstalled, replaced, integrity, boot,installed.signature.keyId = purity-2026andboot.loads = true. stderr carries the boot diagnostics.plugin trust list --jsonexits 0 with one{"keys":[…]}document.Teeth: one member removed from FAMILY goes red, then restored
node scripts/ablation-replace.mjs --file packages/cli/test/json-stdout-purity.e2e.test.ts --anchor "'plugin trust list': []," --delete -- …(the same nightly invocation):The discovery half has its own control: the reproduction on main is that same discovery without the util hop, and it does not find
plugin install.Acceptance notes
skip-changeset: tests only. No published file changes.plugin install: teach the discovery the util, rather than listing the command by hand, which note 6490929251 offered as the other route. A hand-listed member would break the file's owndiscovered == FAMILYequality. It would also leave the next command that boots through a util silently outside the pin.session_01QSeKYmTYfaPbLQD4BJfomW) on the maintainer's authorisation 「授权本席位打开这个草稿 PR」, from the dev's prepared title, body and labels, because the dev session's classifier refused its ownpr_create(card note 6499909922).Verification
Derived gates (
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack) were run locally at b743a63. The readings are in the dev report on #27114. CI runs the required set on this PR.Generated by Claude Code