Repository navigation
fix(service-automation): a stored connector's configuration fault never stops the platform starting - #28729
Conversation
…skipped at boot, never fatal Claude-Session: https://claude.ai/code/session_01FEkQ5oQNecNsthbZA1bZTp Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 2 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 — 10 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 5ee01cef441013706b5f235c1b8089700a3faaac && git checkout 5ee01cef441013706b5f235c1b8089700a3faaac
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c16040d8daf2664c6e3fcd67935d4768ba1fa6d3 f76068ce17edcef9e3eb8bc741d3985c73b587f6 && git checkout -B drift-repro c16040d8daf2664c6e3fcd67935d4768ba1fa6d3 && git merge --no-ff f76068ce17edcef9e3eb8bc741d3985c73b587f6
node scripts/docs-audit/affected-docs.mjs --json c16040d8daf2664c6e3fcd67935d4768ba1fa6d3
|
|
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 |
Requested by Leehom · project thread
Fixes #28698
Clause-②: no — no accepted value and no public surface changes: the same stored definitions are refused as before; a start now carries on past them instead of stopping.
Metadata-protocol: none
维护者速读
plugin.ts启动连接器协调中的一个判断:错误归属于存储条目时走已有的软路径(同一条日志记录,无新记录形状)。回滚即还原该提交;宿主条目的失败语义未变,有对照测试钉住。packages/services/service-automation/src/plugin.ts(fail的stored参数及各调用点)、src/connector-materialization.test.ts新的 service-automation: a stored connector row whose configuration became invalid stops the next boot, where the same fault after boot only skips the row (#28594 follow-up) #28698 一节、packages/qa/dogfood/test/stored-connector-package-ref-restart.dogfood.test.ts。pnpm --filter @objectstack/service-automation exec vitest run src/connector-materialization.test.ts,预期 102/102 通过(含 5 类故障各一对「存储条目跳过 / 宿主条目失败」)。What changes
providerConfigfile ref is read from the HOST's package root, so an install-local app can bind the host's own file (measured: it materializedreadywith the host's OpenAPI document) #28534'sinstalled/unrecordedreadings), still stop the start on a configuration fault. Which entries count as stored is the classifier PR fix(service-automation)!: a connector stored in the environment never reads the host's files #28671 introduced, unchanged.reconcileDeclaredConnectors, the reconcile'sfailreporter takes a third argument,stored; at start it throws only when that is false. Each fault site passes the entry's reading. The per-entry flag PR fix(service-automation)!: a connector stored in the environment never reads the host's files #28671 used for the ref refusal is removed, because the ref refusal is now one stored fault among the others and reaches the samefailcall. The package readers are read once at the top of the run (they were read a few lines later before), so the duplicate check can use them.patchfor@objectstack/service-automation.Tests
stored-connector-package-ref-restart.dogfood.test.tsnow also carries a stored connector whose provider no installed plugin offers, beside the existing refused-ref rows and the inline control. After a restart the platform starts, the row is not listed and the start's record names it, and the inline control and the showcase's own connectors listready. Red on base0be4c8a5(6 failed, 1 passed), green at head (7/7).connector-materialization.test.ts, new#28698section). For each of five faults (unknown provider, invalidretryConfig, throwing credential resolver, plugin-held name, provider-refused config): a stored entry lets the start finish, is skipped with its record, and the host's entry beside it serves; and a control where the host's own entry with the same fault still fails the start. Plus a stored duplicate of the host's name (skipped, host serves), two host entries of one name (fails), and an installed package's entry with an unknown provider (fails, connector materializer: an installed package's package-relativeproviderConfigfile ref is read from the HOST's package root, so an install-local app can bind the host's own file (measured: it materializedreadywith the host's OpenAPI document) #28534 unchanged). The connector materializer: a stored orauthoredprovider-bound connector row resolves its package-relativeproviderConfigrefs against the HOST's root (the #28534 class, through the metadata door) #28594 control "an unknown provider still fails the boot" now uses a host entry filed as declared, since a stored one with that fault is exactly what this PR makes soft.Ablations (each restored, blob equals HEAD, marker absent from dist after restore)
1 failed | 101 passed(the stored unknown-provider case); restart dogfood6 failed | 1 passed.failthrows at start for every entry): unit12 failed | 90 passed(the five stored faults, the stored duplicate, and the six connector materializer: a stored orauthoredprovider-bound connector row resolves its package-relativeproviderConfigrefs against the HOST's root (the #28534 class, through the metadata door) #28594 stored-ref cases); restart dogfood6 failed | 1 passed. Every host control stays green under both.Acceptance notes
422 INVALID_METADATA), so it is covered by the unit test only. A name saved twice (environment-wide and in an authored package) lists once and does not reach the duplicate check from stored rows; the duplicate case is unit-covered. The showcase has no credential resolver that throws; that case is unit-covered.check:dual-build-cjs-loadsanswered exit 3 (prerequisite: a full build) and is NOT MEASURED locally; CI is the record.plugin.tswith a comment around the flow contenders, far from this hunk.Verification
At head
f76068ce:Package and file runs
@objectstack/service-automation:typecheckexit 0;test: Test Files 251 passed (251), Tests 3210 passed (3210).connector-materialization.test.ts: Tests 102 passed (102).stored-connector-package-ref-restart+stored-connector-package-ref: Test Files 2 passed (2), Tests 14 passed (14), after rebuilding@objectstack/service-automation.Derived gates
dispatch-gates --ran: 65 derived, 64 run, 1 NOT-MEASURED (check:dual-build-cjs-loads, exit 3), 0 unrun. Every other family exit 0.Generated by Claude Code