Repository navigation
test(cli): os audit verify boots a stack that declares queues and assignment rules - #34220
Conversation
…ignment rules Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
📓 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:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3 Request: review · PR #34220 · area S6 · Fixes #34143 · head
Generated by Claude Code |
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Review claim · head 746ae96 · 2026-11-16T01:56Z (review-c, S6; L1 ACCEPT read, no contract face) |
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Review — PASSHead-sha:
No must-fix, no should-fix. Not governed: the area lands this PR per |
|
domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3 席位核对ACCEPT · area S6 lands PR #34220 at head
Generated by Claude Code |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43789452468 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43792843358 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3 Re-arm · PR #34220 · head
Generated by Claude Code |
Requested by Steedos · project thread
Fixes #34143
Clause-②: no
Metadata-protocol: none
维护者速读
os audit verify在声明了一个队列和一条分配规则的应用上启动、读取已封存的审计台账,并给出正常结论(3 行均 unmodified,exit 0)。没有改运行时代码。bootSchemaStack组合了 ownership-queue 服务),这里补上卡片要求的回归测试,并排查了其它 CLI 启动路径。packages/cli/src/commands/audit/verify.ownership-queue.integration.test.ts。pnpm --filter @objectstack/cli exec vitest run --project integration src/commands/audit/verify.ownership-queue.integration.test.ts,预期 2 个用例全绿。What changes
Test only. No runtime code changes, so no changeset (
skip-changeset).os audit verifyboots throughbootSchemaStack(packages/cli/src/commands/audit/verify.ts, thebootSchemaStack({ … extraPlugins: buildDataMigrationPlugins({ audit: true }) + crypto.plugins … })call). Since #33879,bootSchemaStackcomposescomposeOwnershipQueueProviderafter the composition and the extra plugins (packages/cli/src/utils/schema-migrate.ts). That registers theownership-queueservice whenever the boot has no sharing provider. So ask 1 of the card already holds onmain. The card's report was taken on 18.4.0 and 18.5.0, which predate that fix.New file:
packages/cli/src/commands/audit/verify.ownership-queue.integration.test.ts(integration tier). It spawns the real command from its source entry over a project whose artifact declares one sealed ledger object, one queue and one assignment rule. A child process writes three ledger rows of a settled window and seals them with plugin-audit's own sealer. The command must then boot, read the ledger and give its normal verdict:ok: true,sealed: true, 3 rowsunmodified, exit 0, and noerrorkey (neverboot_failed).Sweep: every CLI path that boots a kernel
git grepinpackages/cli/src(non-test files) fornew Runtime(,new ObjectKernel,new LiteKernel,createStandaloneStack(andnew ObjectQLPluginfinds two construction sites only:utils/schema-migrate.ts(bootSchemaStack) andcommands/serve.ts.audit verify,db orphans,storage orphans,secret orphans,secret rewrap,plugin trust add/list/revoke, everymigratesubcommand that bootsbootSchemaStackcomposeOwnershipQueueProvider, unless the composition already providessharingservesharingis on the always-on slate;SharingServicePlugin.init()registers itdev,startserveas a child (dev.tsspawnServeChild,start.tsspawn(… 'serve' …))serveverify@objectstack/verifybootStackharness.tsalways mountsnew SharingServicePlugin()(kernel.use(sharingPlugin))testCoreQA.HttpTestAdapteragainst--urldoctor,validate,lint,compile,datasource *,data *,meta *and the restThe candidate files the order named and what they do:
utils/schema-migration-plugins.tsbuilds plugin lists forbootSchemaStackand boots nothing.utils/stack-collections.tsreads stack declarations (hasObjectQLPluginis a list check).utils/extract-hook-body.tshas no kernel construction.utils/installed-plugins-boot.tscallskernel.useon a kernel passed in byserve.ts.doctor.tsnamesEnhancedObjectKernelonly inside a deprecation pattern.Acceptance notes
packages/cli/package.jsonis at18.5.0onmain,packages/cli/CHANGELOG.mdhas no entry for it, and.changeset/33608-migrate-ownership-queue.md(patch on@objectstack/cli) is still pending. It ships in the first@objectstack/clirelease after 18.5.0.queues/assignmentRules. It stands for whatever served the ledger. The subject here is the command's boot, not the sealer's.test-budget:header, because that header needs a CI reading this PR does not have yet. The siblingverify.integration.test.tshas the same shape.Verification
All readings are on
746ae96f(the merge oforigin/maininto this branch) unless a line names another head. After the merge, the dependency closure was rebuilt (pnpm --filter '@objectstack/cli^...' build, exit 0) before any test ran.Tests
pnpm --filter @objectstack/cli exec vitest run --project integration src/commands/audit/verify.ownership-queue.integration.test.ts:Test Files 1 passed (1),Tests 2 passed (2). It was also green at65106259, before the merge.test/vitest-tiers-partition.test.ts:Tests 22 passed (22). The new file is classified in the integration tier.pnpm --filter @objectstack/cli typecheck: exit 0, includingcheck:test-typecheck: OK.tsc -p tsconfig.json --listFilesOnlylists the new file, so the program compiles it.VERDICT queue-timeout (exit 99)). CITest Coreruns it.Ablation: the 18.5.0 composition (red), then restored
scripts/ablation-replace.mjs:bootSchemaStacknever uses the provider (if (ownershipQueueProvider && process.env.OS_ABLATION_NEVER)). The on-disk counts were marker 1 and anchor 0, and the blob went fromde7da81etob3f7180b. The command runs fromsrc/throughbin/run-dev.js(tsx), so there is nodist/leg for this file.8883cc9c:Tests 1 failed | 1 passed (2). Case 1 exited 2, and its--jsondocument was the card's refusal:{"error":"boot_failed","message":"[ObjectQLPlugin] the stack declares queues (1) and assignmentRules (1), but no 'ownership-queue' service is registered, so no queue would resolve and no assignment rule would route a row. Add @objectstack/plugin-sharing to the composition (it registers 'ownership-queue'); the job-queue service named 'queue' is a different service and does not serve ownership queues."}.git checkout HEAD -- packages/cli/src/utils/schema-migrate.ts(trap).git diff HEADis empty, and the blob is back tode7da81e, the HEAD blob.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackgave 54 commands at746ae96f. All 54 were run, and 52 exited 0.--ranwith exit codes:54 derived famil(ies) accounted for — 52 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).check:dual-build-cjs-loads: NOT MEASURED (exit 3,PREREQUISITE NOT MET). It needs every package built; CI builds them.check:i18n-coverage: NOT MEASURED (exit 3, a partial round, so nothing was compared).check:type-check-debt: exit 0,check-type-check-coverage --re-measure: OK.pnpm lint: exit 0.dispatch-gates --tier: no path-derived model mandate. The declarations areClause-②: noandMetadata-protocol: none, because the diff adds a test and changes no accepted input or published surface.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3