Repository navigation
docs(automation): connector credential texts follow the degrade rule (ADR-0097 note, clearConnectorCredential 503, QA item) - #28346
Conversation
Five texts still described the pre-#27237 rule for a declarative connector's credentialRef. On the tree an unresolved or refused reference degrades its instance instead of failing the boot, and a cleared stored value tears the live instance down. - ADR-0097: a dated note under "Runtime reconcile" (reload no longer skips an unresolvable credentialRef; a live connector whose value is gone is torn down; an unreadable store leaves it serving) and a pointer in the "Upstream availability" lead. - IAutomationService.clearConnectorCredential: the 503 SERVICE_UNAVAILABLE refusal joins its docblock. - connectors.mdx and the connector-mcp provider comment no longer put an unresolvable credentialRef on the boot-fatal side. - QA checklist item integration-system.connector-auth-kind-application (revision 5): acceptance[2] and negative[2] grade the degrade, and cite pins that exist. Text only, no behaviour change. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibx4wGGSrBq1y8R1CVJ
📓 Docs Drift CheckThis PR changes 3 package(s): 2 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 — 168 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 12e069ca1a1460f58b8be4191dcdf04e62e836b5 && git checkout 12e069ca1a1460f58b8be4191dcdf04e62e836b5
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b4ccbc6f1052090751489741247deae55b726372 8b24dd6d99a3a5b831826b4365d9253bfb7c0240 && git checkout -B drift-repro b4ccbc6f1052090751489741247deae55b726372 && git merge --no-ff 8b24dd6d99a3a5b831826b4365d9253bfb7c0240
node scripts/docs-audit/affected-docs.mjs --json b4ccbc6f1052090751489741247deae55b726372
|
…de rule The materializeDeclaredConnectors docblock still listed an unresolvable credentialRef among the boot-fatal and reload-skipped problems. Since #27237 such a reference degrades its instance in both modes, and a live connector whose value is gone is torn down first; a host resolver that throws keeps the fatal / skipped rule. Comment only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibx4wGGSrBq1y8R1CVJ
|
domain:spec#2 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract-review-claim: |
|
domain:spec#2 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract reviewServed-tier: Inputs: card #27429 (body: the five texts, the seat's claim and its amendment adding the materializer docblock as a sixth), PR #28346 (body, the file list of 6 files, the diff of 74 changed lines against ① Derived judgments
② Semver level
③ Boundary flags
Verdict reasoning. Six texts now state the rule the code has had since #27237, each checked against the door on Implemented-by: VERDICT: PASS |
|
domain:spec#2 · os-tesla · session_01L9qibx5r5nhDMwpRs4SL6D 维护者速读
席位核对 · ACCEPT ·
|
domain:spec#2 · os-tesla · session_01L9qibx5r5nhDMwpRs4SL6D
Requested by Tesla · project thread
Fixes #27429
Clause-②: no (text only)
Metadata-protocol: none
维护者速读
clearConnectorCredential的拒绝清单补上503,连接器文档与 MCP 提供方的一句注释不再把"凭据引用解析不到"归为启动失败,QA 清单的一条用例改为验收"降级"而不是"启动失败",自动化服务里连接器物化函数的说明注释同样改正。sys_connector_credential+ open-tier resolver chain (env → credential object → vault), reconcile on credential change, install-local prompt for missingcredentialRefs (ruling A on #27230) #27237 之后,凭据引用解析不到时只把该连接器实例降级(应用照常启动,管理员事后补填凭据即可恢复),清除已存凭据会把在线实例拆下;这六处仍写着旧规则,AI 和作者读到会照着错的规则写元数据、写测试。docs/adr/0097-declarative-connector-instances.md中 "Runtime reconcile" 下的新修订说明;docs/qa/platform-checklist/areas/integration-system.json条目integration-system.connector-auth-kind-application的acceptance[2]与negative[2];packages/spec/src/contracts/automation-service.ts的clearConnectorCredential注释。pnpm check:platform-checklist && pnpm check:adr-symbol-anchors,预期两个都通过(清单校验认可 revision 5,ADR 里引用的#degradeConnectorForCredential能解析到代码)。What changes
#27237 (PR #27344) made an unresolved or refused
credentialRefdegrade its instance instead of failing the boot, and its credential door'sDELETEtears a live instance down. Five texts still stated the old rule, and a sixth (the materializer's own docblock) was folded in by the seat's claim amendment. Each was measured againstmainat501c864d(plugin.ts#degradeConnectorForCredential,#clearConnectorCredential,#doorCredentialChain,#scheduleDeclarativeRetry) before it was rewritten. None of them had been fixed by a later PR; the card's line numbers had drifted (noted per item).docs/adr/0097-declarative-connector-instances.md(Tier H; triage 6490151714's cross-domain exception).credentialRefleaves the reload list, as it left the boot list (the §6 note). A reference no source answers for degrades its instance at boot and on a reload alike, and a live connector under that name is torn down first; that is how a cleared stored credential takes its instances down. A stored credential the deployment cannot read right now (unreadable store, no crypto provider yet) degrades too but leaves a live connector serving. Both go on the backoff. A host resolver that throws keeps the old rule (fatal at boot, logged and skipped on reload). Each fact is read fromdegradeConnectorForCredentialand the reconcile'scatcharoundresolveConnectorCredential.Amended byline gains the entry for this note, as every earlier amendment of this ADR has one.packages/spec/src/contracts/automation-service.ts,IAutomationService.clearConnectorCredential: the refusal list gains503 SERVICE_UNAVAILABLE(when the store cannot be read or written,ConnectorCredentialUnavailableErrorin#clearConnectorCredential, or the tenancy posture cannot be read,#doorCredentialChain), nothing changed. Docblock only.content/docs/automation/connectors.mdx(card ≈L361, now L407): the inline-secret example's "a reference, resolved at boot" becomes "resolved at materialization (unset, it degrades the instance)". The failure table at L593 already states the degrade.packages/connectors/connector-mcp/src/mcp-provider.ts(card ≈L243, now L273): the comment no longer groups a rejected credential "like an unresolvable credentialRef" on the fatal side; it says an unresolvable reference never reaches the factory, since the materializer degrades its instance first.docs/qa/platform-checklist/areas/integration-system.json, itemintegration-system.connector-auth-kind-application(card L1943 / L1992, now L1961 / L2010), revision 4 → 5 with a history row:acceptance[2]grades the degrade (api oracle: the degraded descriptor naming the reference and its remedies, the boot's warn line, the dispatch failure) andnegative[2]fails a boot that dies on it; the title,fixtures.requires[2](the env →sys_connector_credential→ host resolver chain),steps[3],steps[5],automated.refandsource[2]follow. The cited pin "fails boot loudly when credentialRef does not resolve" no longer exists; the item now cites "degrades the instance, naming the reference, when credentialRef does not resolve" (connector-materialization.test.ts) and "missing → degraded naming the reference; set → ready; clear → degraded again" (connector-credential-door.test.ts), both run below.packages/services/service-automation/src/plugin.ts, thematerializeDeclaredConnectorsdocblock (≈L2093; added by the seat's claim amendment): the boot-fatal / reload-skipped list no longer names an unresolvablecredentialRef(it names the host resolver that throws, which does keep that rule), and a paragraph says such a reference degrades its instance in both modes, tearing a live connector down first ({@link degradeConnectorForCredential}). Comment only.No changeset: the diff publishes no behaviour, only comment and docblock text (
skip-changesetdeclared at create).Tests
No test changes: text only. The two pins the QA item now cites exist and pass (output under Verification).
Acceptance notes
@objectstack/lintauthor-facing text says acredentialRefis "resolved at boot" (credential-literal.ts≈L22,lint-flow-credential-literals.ts≈L29,rule-explanations.ts≈L4705, the last pinned atlint-flow-credential-literals.test.ts≈L502). It describes where the secret lives rather than the failure rule, so it is loose rather than wrong; carrier: none, noted only.credentialRef" on the fatal side. The 2026-10-28 note right after it already reverses the rejected-credential half, and the new lead pointer covers thecredentialRefhalf; the dated note itself is left as written (amendments are append-only).clearConnectorCredentialalso answers400 VALIDATION_ERRORfor an empty or oversized reference (#credentialRefOfRequest), which its docblock does not list either. Left out: the ruling grants this one docblock line for the503.acceptance[2]was not run live (no echo-upstream fixture in this container); its evidence is this body and the item's history row, as RUNNER.md asks for a ledger edit's own verification.Verification
pins the QA item cites
pnpm --filter @objectstack/service-automation exec vitest run --maxWorkers=2 src/connector-materialization.test.ts src/connector-credential-door.test.ts -t 'TWO_CASE_NAMES' (the two names above)→ Test Files 2 passed (2), Tests 2 passed | 82 skipped (84); VERDICT command-exit 0.derived gates
8b24dd6d(after the sixth text):node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderives 98 families (the 95 below pluscheck-tenant-audit-censusand its--self-test, andcheck:durability-log-level), each run with stdin from/dev/null, exit code recorded before any pipe, after a dts rebuild of@objectstack/service-automation(record:27429-gates-ran-8b24dd6d.listin the seat's out folder).--ranreconciliation: 98 derived, 98 run, 0 NOT-MEASURED, 0 UNRUN, all exit 0.eef6c15b(the five texts): 95 families, record27429-gates-ran-eef6c15b.list, after a dts build of every non-ui, non-docs package (turbo, lock VERDICT command-exit 0).check-plugin-teardown-shape --self-testfirst exited 3 on the shallow clone (its pinned control621a4876unreachable); aftergit fetch origin 621a4876 --depth=1it exited 0.--ran: 95 derived, 95 run, 0 NOT-MEASURED, 0 UNRUN, all exit 0.Generated by Claude Code