Repository navigation
fix(service-automation)!: the inbound hook door refuses the address of a flow slot whose package is disabled, before anything is enqueued (ADR-0150 D5) - #34278
Conversation
…hose package is disabled A slot of a flow name two packages hold is judged when its trigger fires: while its package is disabled the run is skipped (said once at info), never substituted, and it dispatches again on re-enable with no re-arm. Slot keys, bindings and the dispatch holder do not move (ADR-0150 D3, seat ruling 6884403301 amendments 3 and 7). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…kipped Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
… state 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
…as a narrowing The changeset carries Clause-② no (narrowing), the BREAKING banner, the ADR-0087 not-required marker, and says an event fired while the package is disabled is dropped, not replayed. The single-holder CONTROL reads "as on main today". Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…s alone is not dispatched by its trigger, and the bare entries answer as for no flow A flow name one package holds, that package disabled while the engine still holds its slot (a disable whose re-sync failed or did not run): its trigger binding is not dispatched (said once at info), and execute, getFlow and toggleFlow answer as for a flow the engine does not hold, which is what the namespaced address answers. A re-enable dispatches it again with no re-arm. The durable reads (slot key, dispatch holder, version history) do not move. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…package also ships keeps its slot key and its trigger A disable is reversible and moves no key. While the registry holds a flow name under two packages and the others are disabled, the served package's lone slot is filed, and stays, under PACKAGE/NAME: the boot pull files it so beside a disabled holder, and the re-sync's withdrawal of the disabled holder's slot no longer re-keys it to the bare name or stops its binding. The M1 decline and its refused-body warning are kept for a body another served package really had refused. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
# Conflicts: # packages/services/service-automation/src/engine.ts # packages/services/service-automation/src/flow-slots-per-package.test.ts
… once the disabled co-holder is uninstalled A lone slot kept under PACKAGE/NAME beside a disabled co-holder now settles back to the bare name at its next placement once the registry no longer holds the name twice (the uninstall's re-sync re-registers it), through the same record move a withdrawal uses. isShared reads the registry and the slot count again, as on main: a name one package holds is never read as shared, so removal, version history, rollback, withdraw, the bare inbound hook and the credential source serve it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
… holder's flow moves The clone door's taken-name probe, the definition writes' rollback copy and carried-forward credentials, and the DELETE door's answer all ask getFlow, so they move with it; the changeset now says how. The runtime door pin gains the clone door's source row. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…ning co-holder and reached before the uninstall's re-sync A lone slot filed under its qualified key beside a disabled co-holder is declined only once another package's body of the name is recorded as refused, so the enable's re-sync registering the served holder first arms it with no refused-body warning. A co-holder that returns while the incumbent is already qualified moves no key, so the incumbent's re-arm is done where the move's would have been. A refusal recorded later still declines it and says so. The fold back to the bare name after the co-holder leaves the registry now also happens the first time the engine fires the slot or reads its name (the bare key resolvers and the inbound hook), not only at its next placement, so a failed re-sync leaves no unreachable flow. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…d co-holder, and the clone answer as ruled Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…lder's slot before anything is enqueued AutomationEngine.inboundHookSlot answers `unadmitted` for a slot whose registry-held package is disabled (isDisabledHolderSlot): the qualified address of a disabled co-holder's slot, and every address of a disabled sole holder's flow. Both faces then answer the door's one 401 once the body is read, the bytes the address gets after the disable's re-sync, and nothing is enqueued whose run would be skipped. The cause is logged at info, never sent. Asked at post time, so a re-enable serves the address again with no re-arm. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…th faces 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
# Conflicts: # packages/services/service-automation/src/engine.ts
…d-only The hook door writes no credential, so the store double carries no write verb and owes no engine-double ledger row. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 11 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 71f3a00e36602d555c3c900349c4d84d58442e1f && git checkout 71f3a00e36602d555c3c900349c4d84d58442e1f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin babda9d339b6e7c1ab0a527917edc2e8fb827bce 84e37cabec247f97fd422aa5bab72b37438f42a5 && git checkout -B drift-repro babda9d339b6e7c1ab0a527917edc2e8fb827bce && git merge --no-ff 84e37cabec247f97fd422aa5bab72b37438f42a5
node scripts/docs-audit/affected-docs.mjs --json babda9d339b6e7c1ab0a527917edc2e8fb827bce
|
|
domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3 Request: review · PR #34278 · area S6 · Fixes #33906 · head
Generated by Claude Code |
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Review claim · head 84e37ca · 2026-11-16T04:04Z (review-c, S6; L1 ACCEPT read + L2 CONTRACT_REVIEW_TIER record, narrowing face) |
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Contract reviewServed-tier: Read: card #33906 with its five comments (measurement 6897225218, ruling 6898449441, regrade 6898457477, claim 6903498595, dev report 6906551199), ruling 6884403301 as data, PR #34278 body and three files, the net diff against ① Derived judgments
② Semver level
Clause-②: no (narrowing). Correct as declared: a sender-visible answer moves from ③ Boundary flags
④ Design judgmentThe change makes a declared refusal real; it takes no declared capability away. The published contract ( Attempts to break it, each read in the tree:
No must-fix, no should-fix. N1 (nit) — The door's own N2 (nit) — The N3 (nit) — The engine's line also fires for an address that would be refused with the package enabled (a wrong namespace on a disabled sole holder), and its text speaks of redelivery after the enable. Log wording only; accepted deviation. Implemented-by: VERDICT: PASS |
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Review — PASSHead-sha: What I checked:
Follow-up owed (N1, needs a card): the door's own Accepted nits:
Not governed: the area lands this PR per |
|
domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3 席位核对ACCEPT · area S6 lands PR #34278 at head
Generated by Claude Code |
Requested by Steedos · project thread
Fixes #33906
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: follow-up owed — skills/objectstack-automation/SKILL.md:383-395
维护者速读
cause: 'disabled-holder'),不告诉发送方。!),只影响"包已停用但重同步没撤掉槽位"的流程的 hook 地址;会在非 2xx 时重试的发送方可在重新启用后补投,不重试的发送方这段时间的事件会被拒收(之前是被假受理后丢弃)。共享名的裸 hook、在服务的同名包、无包流程、用槽位开关关掉的流程,回答都不变。回滚即还原本 PR。packages/services/service-automation/src/engine.ts的inboundHookSlot(两处新判断:单一持有者分支、地址选定槽位之后)与新增的disabledHolderHookRefused;测试packages/qa/dogfood/test/inbound-hook-disabled-holder-33906.test.ts。pnpm --filter @objectstack/dogfood exec vitest run --project isolated --maxWorkers=2 test/inbound-hook-disabled-holder-33906.test.ts(需先构建依赖),预期 6 个用例全部通过。What changes
AutomationEngine.inboundHookSlot(both faces of the inbound hook door ask it before the signature is read) now asksisDisabledHolderSlot, the predicate the trigger's fire-time skip already asks (PR #33890, extended to a name one package holds by PR #34048):unadmitted. The slot is judged after the pick, so no other holder is served in its place (amendment 8: admission is judged on the slot that would execute).undefinedand judged it as before): a disabled sole holder answersunadmittedfor every address, the bare one included.unadmittedis the door's existing answer: the self-hosted mount (ApiTriggerPlugin) and the hosted face (handleInboundHookRequestin the runtime, and thetrigger-apimember for the bare hook) read the body in full and answerinboundHookRefusal(),401 INVALID_SIGNATURE. No door file changes. The engine logs the real cause atinfo, once per refused post, with{ cause: 'disabled-holder', flow, package, slot }; the door's own line still logsunadmitted-address(qualified) orunknown-flow(bare). Nothing is enqueued.The question is asked at post time, so the enable serves the address again with no re-arm.
Not moved: the bare hook of a name two packages hold stays the
shared-namerefusal (PR #33646 "Not moved"); the served co-holder beside a disabled one, a flow no package ships, and a flow switched off withtoggleFlowSlot(its address still routes to its slot:flow-triggers-per-slot.test.ts:198-210, untouched) answer as before.Tests
New file
packages/qa/dogfood/test/inbound-hook-disabled-holder-33906.test.ts(6 tests). The rig: the realAutomationEnginebuilt by the realAutomationServicePlugin.init()(so its flow-name resolver is the plugin's own) over a realSchemaRegistry; the realApiTriggerPluginmounting the self-hosted routes and registering thetrigger-apimember; the real runtimeHttpDispatcheras the hosted face over a kernel with nohttp.server; a queue that hands each message to the trigger's consumer at once, so a run is observed. Each post is signed with the hook's correct secret, so the disable is the only reason for a refusal.inboundHookRefusalResponse()and to the same address afterwithdrawFlowSlot(the re-sync); nothing enqueued, nothing run; the cause is in the log only (the body names no package, namespace ordisabled).202and runs again; the active trigger bindings and the queue subscriptions are unchanged (no re-arm).202on both faces and runs.202on both faces and runs its own flow.The file is new rather than a describe in
flow-hook-per-slot.dogfood.test.tsbecause the order names it; that file's rig mounts only the self-hosted face.Acceptance notes
skills/objectstack-automation/SKILL.md:383-395(the area files that card).unadmitted-addressqualified,unknown-flowbare); the engine'sdisabled-holderline beside it is the true cause. Giving the door a cause of its own would add a member toUnverifiedPostCauseintrigger-apiand the runtime's door text, outside this claim.registry.disablePackageand no re-sync.Verification
All readings are on head
84e37cab(the branch withorigin/mainmerged in, #34048 included) unless a line says otherwise.pnpm --filter @objectstack/dogfood exec vitest run --project isolated --maxWorkers=2 test/inbound-hook-disabled-holder-33906.test.ts: Test Files 1 passed, Tests 6 passed.!): the dependency closure built (--filter '@objectstack/dogfood^...' build, exit 0), thenpnpm --filter @objectstack/dogfood testunder the verify lock: exit 0, Test Files 470 passed, 3 skipped (473); Tests 3980 passed, 42 skipped (4022); 2007 s.@objectstack/service-automation:pnpm test: Test Files 284 passed, Tests 4040 passed (flow-triggers-per-slot.test.ts, the toggled-off slot pin at L198-210, untouched and green).pnpm typecheck: exit 0, test layer compiles.dispatch-gates --commands, 76 families): 75 exit 0.check:dual-build-cjs-loadsexit 3, PREREQUISITE NOT MET (it reads every package'sdist/and this tree built only the dogfood closure): NOT MEASURED here; CI runs it.--ranreconciliation: 76 derived, 76 run, 0 unrun.check:engine-double-contractwas red on an earlier head (the rig's credential store pinned write verbs the ledger does not record); the store is now read-only, so no ledger row is owed, and the gate is green.check-changeset-no-major,check-adr-0087-registration([BREAKING+bang+clause-②-narrowing] not-required (no-migration-prescription)),check-closing-keyword-parity,check-partof-closing-keywordon this body: all exit 0.dispatch-gates --tier: no path-derived model mandate.pnpm lintis left to CI.Ablation: each leave-out put back, the pins go red (rebuilt, marker proved in dist/, restored)
Each leg went through
scripts/ablation-replace.mjs(anchor hit 1 to 0, blob checked), thenpnpm --filter @objectstack/service-automation build, thenablation-dist-preflight.mjs(marker present indist/index.jsanddist/index.cjs), then the pin file. Taken onaa16cc6e, before the merges, with the same engine hunk.if (globalThis.__ABLATED_33906_SHARED__ === true && ...)): 3 failed, 3 passed. The red lines for the disabled co-holder, for both holders disabled, and for the enable go red, for exampleAssertionError: self-hosted: expected { status: 202, …(2) } to deeply equal { status: 401, …(2) }.AssertionError: self-hosted {"ns":"alpha","flowName":"zz_disabled_alone"}: expected { status: 202, …(2) } to deeply equal { status: 401, …(2) }.Restore: each blob equal to HEAD,
git diff HEADempty. A rebuild, thenablation-dist-preflight --absentfor both markers: absent from all 6 built files, tree clean. The pin file: 6 passed.Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
🤖 Generated with Claude Code