Repository navigation
fix(service-automation): a stored connector under a host plugin connector's name is skipped at start, as it is while the platform runs - #28755
Conversation
…in to start (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oNHddQQdvMrpeQxiJ
…ross a restart (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oNHddQQdvMrpeQxiJ
… start Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oNHddQQdvMrpeQxiJ
📓 Docs Drift CheckThis PR changes 2 package(s): 11 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 44 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 8e94c1e9445ceabe4313bc6f75b83008f7fe8547 && git checkout 8e94c1e9445ceabe4313bc6f75b83008f7fe8547
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5493b8842995fabb0979ae535301d3f3cb9fc65e 08182e92e841af25746ca51776c4847728033dac && git checkout -B drift-repro 5493b8842995fabb0979ae535301d3f3cb9fc65e && git merge --no-ff 08182e92e841af25746ca51776c4847728033dac
node scripts/docs-audit/affected-docs.mjs --json 5493b8842995fabb0979ae535301d3f3cb9fc65e
|
|
domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo Contract reviewServed-tier: PR #28755 (card #28713), reviewed 2026-11-01T17:38Z against merge-base ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo 席位核对ACCEPT · The maintainer's standing authorisation for landing reviewed PRs, verbatim: 「按照 pm-dispatch 规则复核过的都授权」.
Generated by Claude Code |
|
domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo CI note · 2026-11-01T18:07Z
Generated by Claude Code |
|
domain:server#2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo Contract reviewServed-tier: Re-pin, 2026-11-01T18:09Z, of the PASS record on head ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Requested by Leehom · project thread
Fixes #28713
Clause-②: yes (widening) —
@objectstack/coreadds one read-only public member,dispatchesBootPhaseHooks(), onObjectKernelandObjectKernelBase(soLiteKernel); no accepted value changes, nothing is narrowed.Metadata-protocol: none
维护者速读
@objectstack/core的两种内核上加一个只读方法dispatchesBootPhaseHooks(),让插件在自己的start()里知道启动阶段钩子是否会派发;不会派发(或宿主不回答)时,保存的连接器仍在自动化插件的start()中实例化,与原来一样,绝不落空。packages/services/service-automation/src/plugin.ts(holdStoredEntries、kernelDispatchesBootPhaseHooks、kernel:bootstrapped那一轮的held判断)、packages/core/src/kernel.ts与kernel-base.ts的新方法、src/connector-materialization.test.ts新的 service-automation: a stored connector saved under a host plugin connector's name stops the next boot (#28698 follow-up) #28713 一节。pnpm --filter @objectstack/service-automation exec vitest run src/connector-materialization.test.ts,预期 108/108 通过(含 service-automation: a stored connector saved under a host plugin connector's name stops the next boot (#28698 follow-up) #28713 一节 6 例:插件同名跳过、空闲名在监听前就绪、宿主同名仍失败、三种不派发钩子的宿主仍在 start 中实例化)。What changes
readyunder that name, and the saved connector is skipped with the same log record naming it. Precedence is unchanged (the plugin's connector wins, as ADR-0097 §4 already has it on a running platform), so no §4 ruling is needed.kernel:bootstrappedconnector pass), instead of during the automation plugin's own start. They are stillreadybefore the server accepts requests. Connectors the host's own stack declares, and an installed package's, still materialize during the automation plugin's start, with their fail-loud behavior unchanged, including on a name a plugin's connector also uses.@objectstack/coregainsdispatchesBootPhaseHooks(), read-only:ObjectKernelanswersfalseexactly when itsbootPhaseHooksoption isfalse;LiteKernel(and anything onObjectKernelBase) answerstrue. On a kernel that answersfalse, or a host whose kernel does not expose the member, saved connectors materialize during the automation plugin's start, as before.Tests
connector-materialization.test.ts, new#28713describe (6 cases): a saved entry under a name a plugin registers in its ownstart()(after the automation plugin's): the boot starts, the plugin's connector serves its own action, the saved entry is skipped with the §4 record; control: a saved entry under a free name is not yet registered when a later plugin starts and is registered bykernel:listening; control: the host's own entry under such a name still fails the boot; a realObjectKernelwithbootPhaseHooks: false, and a host whose kernel has no reader or answersfalse, keep saved entries in the start reconcile so they serve.kernel.boot-phase-hooks.test.tsreadsdispatchesBootPhaseHooks()from a plugin's ownstart():falseunderbootPhaseHooks: false,truefor absent /true/undefined;lite-kernel.test.tspinstrue.stored-connector-package-ref-restart.dogfood.test.ts: the first start also saves an environment-wide connector under the showcase'sslackplugin connector name; the second start over the same database starts, lists the plugin'sslackconnectorreadywith the plugin's actions (not the saved one's), and its start record names the saved entry; control: the saved inline connector is alreadyreadyon the first read after the start.Red on base, green on head, ablations
plugin.ts,kernel.ts,kernel-base.ts) restored to base1c5b1773, rebuilt: unit2 failed | 106 passed (108)(the two new service-automation: a stored connector saved under a host plugin connector's name stops the next boot (#28698 follow-up) #28713 cases that measure behavior; the hookless-host cases pass on base, as base keeps every saved entry in the start reconcile); restart dogfood8 failed | 1 passed (9). Tree restored,git diff HEADempty.108 passed (108); dogfoodstored-connector-package-ref-restart,stored-connector-package-ref,install-local-restart-connectors:3 passed (3)files,21 passed (21)tests.@objectstack/service-automation; unit2 failed | 106 passed, restart dogfood8 failed | 1 passed. Restored: blob9f3bdcad== HEAD, marker absent after rebuild, tree clean.3 failed | 105 passed(the three hookless-host cases). Restored: blob9f3bdcad== HEAD, marker absent after rebuild, tree clean.Package suites and type checks
pnpm --filter @objectstack/core --filter @objectstack/service-automation run typecheck: exit 0 (bothcheck:test-typecheckOK).pnpm --filter @objectstack/core test:129 passedfiles,2892 passedtests.pnpm --filter @objectstack/service-automation test:251 passedfiles,3216 passedtests.Acceptance notes
Verification
Every local reading above is on head
525f355c. Derived gate families (node scripts/pm/dispatch-gates.mjs --commands, reconciled with--ran): 67 derived, 66 run with exit 0, 1 not measured (check:dual-build-cjs-loads, exit 3: its prerequisite, every package'sdist/, is not met in this checkout). The changeset, ADR-0087, empty-changeset and closing-keyword gates were also run against this body: exit 0. The repo-wide lint,test:repoand the full farm are CI's. Overlap: open PR #28693 also editsservice-automation/src/plugin.ts;git merge-treeof its head with this one is clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5oNHddQQdvMrpeQxiJ
Generated by Claude Code