Repository navigation
fix(cli): os serve names an unloaded devPlugins entry by the list it was written in - #31356
Conversation
…was written in When os serve --dev refuses to boot because an entry that may provide the crypto provider did not load, a devPlugins entry is now named devPlugins[i] rather than by its position after the stack's plugins. The refusal reads an entry's providesServices through the same predicate as cryptoProviderPlugins, and its docstring states the rule the code applies: an entry that declares other services, or declares none, is ruled out. Clause-②: no Metadata-protocol: none Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5mgePB9NQ4PNhvYVxk
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ Contract-review-claim: session_01FEkQ5o8PE7ZtVjcor51wBZ · head 279bb7d · 2026-11-08T04:04Z |
📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 35 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0ea93a5ced4a3eb3345ef7be27d1330f1b15c31e && git checkout 0ea93a5ced4a3eb3345ef7be27d1330f1b15c31e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d0512c2fbec9e0abd2f7fbd09986e4fdab73211d 279bb7dca919e2b09539f9db8bf38ba9253b7df0 && git checkout -B drift-repro d0512c2fbec9e0abd2f7fbd09986e4fdab73211d && git merge --no-ff 279bb7dca919e2b09539f9db8bf38ba9253b7df0
node scripts/docs-audit/affected-docs.mjs --json d0512c2fbec9e0abd2f7fbd09986e4fdab73211d
|
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ Contract reviewServed-tier: Inputs read: the PR body, file list, its one commit and message, and the net diff against Check-runs on the head at the time of writing: 45 runs, 30 completed (17 ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing read against the published spec on Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ 席位意见:接受。#31263 复审三条应改项的收尾:开发态插件项在拒绝中以 席位核对 — ACCEPT ·
|
Requested by Leehom · project thread
Refs #28284
Clause-②: no
Metadata-protocol: none
维护者速读
os serve --dev因可能提供加密提供者的项没能加载而拒绝启动时,devPlugins里的项现在点名为devPlugins[i],不再按它排在plugins之后的位置点名。判断是否拒绝的providesServices读取改为与cryptoProviderPlugins共用同一个判定,docstring 也写明了「声明其它服务或什么都没声明的项被排除」。@objectstack/cli(patch)。哪些项会被拒绝不变,只改报错里的名称。回滚即 revert 本 PR。packages/cli/src/commands/serve.ts的declaresCryptoProvider、refuseUnloadedCryptoProviderPlugins的 label,以及栈插件循环 catch 里的list: 'devPlugins'。pnpm --filter @objectstack/cli exec vitest run --project integration src/commands/serve-host-crypto-provider.test.ts test/serve-crypto-provider-plugin-load-failure.integration.test.ts,预期 34/34。What changes
os serverefuses to boot when an entry that may provide the crypto provider (crypto-provider) does not load. Under--dev, adevPluginsentry is now nameddevPlugins[i], where it used to be named by its position after the stack'splugins(plugins[plugins.length + i]).UnloadedStackPlugingains an optionallist('plugins' | 'devPlugins'; absent meansplugins).pluginslength.refuseUnloadedCryptoProviderPluginsreadsprovidesServicesthrough the predicatecryptoProviderPluginsfilters by (declaresCryptoProvider), not through its own copy.Which entries are refused is unchanged.
Why
Follow-up to the contract review of #31263 (should-fixes 2 and 3, and the docstring half of 1).
Verification
Readings on head
279bb7dca(one commit onmainat9447f9552).Pins, red-first and restore
serve-crypto-provider-plugin-load-failure.integration.test.ts: a fifth real boot,os serve --devover a host config whoseplugins[1]anddevPlugins[0]are specifiers that do not import. It is refused, and namesdevPlugins[0] ('…')andplugins[1] ('…').serve-host-crypto-provider.test.ts:devPluginslabel;cryptoProviderPluginsagree on a declaring entry, an entry declaring another service, and an entry declaring none;unloadedStackPlugins.push(.serve.tsset back to itsmainblob, the two files read 2 failed | 32 passed (34). The two red cases were thedevPluginslabel unit case and the--devboot. Restored (blob equal to HEAD): 34 passed (34).Package suite and typecheck
tsc --noEmitinpackages/cli: exit 0.pnpm --filter @objectstack/cli testunder the verify lock: Test Files 608 passed | 1 skipped (609), Tests 7538 passed | 9 skipped (7547),VERDICT command-exit 0.Derived gates
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands: 72 families on this diff, every one run and exit 0 (check:type-check-debtunder the verify lock).--ranreconciliation: 72 derived, 72 run, 0 NOT-MEASURED, 0 UNRUN.Human Minimum
packages/specholds no runtime logic. (Nopackages/specchange.)eslint --no-inline-configon the three changed source files: exit 0.main, one pull request.packages/spectouched: not touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code