Repository navigation
fix(cli): an os migrate audit-* run stops when a registered host signer or sink fails to resolve - #34569
Conversation
…er or sink fails to resolve The redaction seal the four ledger-copy rewrites compose read audit.checkpointSigner and audit.checkpointSink through a helper that turned every resolution error into "not registered", so a host signer whose factory threw was replaced by the local key for the amendments, and a factory-registered signer was never built. seal() now resolves both through the kernel's async accessor, three states as the sealer does: absent => the local key / no export, as before; registered and resolved => used; registered and failing => seal() rejects naming the slot, and each command, which now awaits it before the seal-lock hold, prints the error and exits 1. Claude-Session: https://claude.ai/code/session_01ADHkmRPxhTmqbUbMrqygh4 Co-authored-by: Claude <noreply@anthropic.com>
…redaction-seal test Claude-Session: https://claude.ai/code/session_01ADHkmRPxhTmqbUbMrqygh4 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 9 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 37 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 c921368f22627666263b61209f7eac730ad7479c && git checkout c921368f22627666263b61209f7eac730ad7479c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1e4656d01fe485935c493a00ecdb8e0f8a0fed55 9f6f950f35e63373def1d330eaa5acc0a166b681 && git checkout -B drift-repro 1e4656d01fe485935c493a00ecdb8e0f8a0fed55 && git merge --no-ff 9f6f950f35e63373def1d330eaa5acc0a166b681
node scripts/docs-audit/affected-docs.mjs --json 1e4656d01fe485935c493a00ecdb8e0f8a0fed55
|
…not be resolved Claude-Session: https://claude.ai/code/session_01ADHkmRPxhTmqbUbMrqygh4 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-steve · session_01ADHkmRPxhTmqbUbMrqygh4 Final head for review:
|
|
repo:objectstack#2 · os-steve · session_01ADHkmQVWXw7KT8ThxT4CBy 席位核对L1 verdict: ACCEPT · PR #34569 · card #34519 · first review · read 2026-11-17T01:56Z Head-sha: Read from GitHub at this head ( Checklist
Spot checks (mine)
L2 owed: no. None of the four contract faces is touched: Landing tier: |
|
repo:objectstack#2 · os-steve · session_01ADHkmRPxhTmqbUbMrqygh4 Landing at 2026-11-17T01:57Z — L1 ACCEPT 6935518912 on head
Ready and auto-merge armed in this stroke; the merge queue lands it, and |
Requested by Steve · project thread
Fixes #34519
Clause-②: no
Metadata-protocol: none
维护者速读
os migrate audit-*四个改写命令在改写已封存的行之前要先签一份修订;签名时取宿主的签名服务和导出服务。现在和封存器(audit seal: a host checkpoint signer that fails to resolve stops the sealer instead of signing with the local key #34280)一样分三种情况:没注册就用本机钥(不变);注册了能取到就用;注册了却取不到就整次运行报错退出,不改任何行。packages/cli/src/utils/audit-redaction-seal.ts末尾的hostSeam;四个命令里await redaction.seal(...)一行。cd packages/cli && npx vitest run src/utils/audit-redaction-seal.host-seam-34519.test.ts,预期 4 条全绿。What changes
packages/cli/src/utils/audit-redaction-seal.ts:RedactionSealRun.seal()is now async and resolvesaudit.checkpointSignerandaudit.checkpointSinkthroughhostSeam(): the kernel'sgetServiceAsync, absorbing only the branded "never registered" rejection (isServiceNotRegisteredError,@objectstack/core); every other rejection becomesAudit redaction seal: the '<slot>' service is registered but could not be resolved (<cause>) — no sealed row is amended or rewritten; the run does not <fallback> in place of a service the host registered. …, with the cause attached. A kernel with no async accessor keeps the sync read, where "not registered" is the only fault. This is the rule and the wording of PR fix(plugin-audit): a registered audit seam that fails to resolve stops the sealer instead of falling back #34495 (the sealer, audit seal: a host checkpoint signer that fails to resolve stops the sealer instead of signing with the local key #34280).audit-key-material,audit-mail-bodies,audit-metadata-bodies,audit-side-copies):const seal = await redaction.seal(stack.kernel, engine);. The call already sat inside the try whose catch prints the error (or the--jsonerror object) and exits 1, beforeunderAuditSealLock, so a rejection stops the run before any row is amended or rewritten.content/docs/deployment/cli.mdx(Sealed audit rows): one paragraph says who signs the amendments (the host signer when registered, the local key when none) and that a signer or sink registered but not resolvable stops the run with exit 1, never falling back to the local key.Tests
src/utils/audit-redaction-seal.host-seam-34519.test.ts(realObjectKernelservice registry; the crypto composition is stubbed to "no provider", which a run survives):signerandsinkareundefined, so the amendment writer signs with the local key, as before;seal()rejects with the slot name, the cause and "does not sign with the local key";seal()rejects namingaudit.checkpointSink;audit-redaction-seal.contract.test.ts: one new pin per command:seal()is awaited exactly once, before theunderAuditSealLock(hold.@objectstack/service-settingsat module top, ascheck:test-source-aliasasks (the util's static reach names it through the mockedone-shot-settings.js).packages/cli:pnpm typecheck(incl.check:test-typecheck) green;src/commands/migrate/+ the new file: 75 files, 606 passed / 8 skipped.Acceptance notes
Clause-②: no: no key, flag or config value an operator writes is refused; a run on a host whose signer or sink registration already fails now exits 1 instead of amending under the local key.Verification
Gates per
node scripts/pm/dispatch-gates.mjs --commandsafter the last commit: see theos-dev-reportcomment on #34519.