Repository navigation
feat(service-automation): the connector connection store, the connect door and the OAuth callback read and write one instance by its package and name - #33218
Conversation
… door and the OAuth callback read and write one instance by its package and name The store reads, connects, revokes and lists by (organization, package, name). A package-less row answers a package's instance only where the name's durable resolution binds it there (or no registry can judge), and that package's connect adopts it in place. Two answering rows are refused 409 at the door and 503 at a dispatch, never one used; an organization whose read is refused is still counted. The door resolves the name to one declared instance; the begin records its package in the pending authorization and the callback completes exactly that package's entry. An unstamped entry is the instance of the package its name's durable resolution holds it under, for the door and the dispatch alike. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT
📓 Docs Drift CheckThis PR changes 1 package(s): 46 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 17 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. 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 1e977dd8bf0d607fa0176fa1ca2583318ff945b4 && git checkout 1e977dd8bf0d607fa0176fa1ca2583318ff945b4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e540baf8873c22642ce191b99e7e5ce1fd3b4620 0704ffc0478e381ff0eaf59b5c75324bf8eb790c && git checkout -B drift-repro e540baf8873c22642ce191b99e7e5ce1fd3b4620 && git merge --no-ff 0704ffc0478e381ff0eaf59b5c75324bf8eb790c
node scripts/docs-audit/affected-docs.mjs --json e540baf8873c22642ce191b99e7e5ce1fd3b4620
|
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Contract-review-claim: session_01L9qibzKCovWpJoMZD6U3NT · head e72a245 · 2026-11-14T14:19Z The maintainer lifted the review pause at 14:17Z. An isolated reviewer sub-agent of the card thread is reviewing this head at |
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Posted 2026-11-14T14:33Z. The brief the card thread handed its isolated reviewer sub-agent for the record below, verbatim. Contract review brief — PR #33218 @
|
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Posted 2026-11-14T14:34Z. An isolated reviewer sub-agent of the card thread produced this record from the brief alone (card #31699 with all 37 comments, PR #33218's body, file list and net diff, and the check-runs on the head). Contract reviewServed-tier: ① Derived judgmentsRead: 11 files, +866 / -72, all under
② Semver level
③ Boundary flags
Implemented-by: VERDICT: FAIL |
…connection row of the name answers its instance, so a declaration that moves keeps its connection The contract review found that a declaration moving to another package (or to the environment) read "not connected" under one holder, and its old row could be neither read nor revoked. Under one holder, or with no registry to judge, the store now answers every row of the name, as the read by name did; a connect adopts and restamps the row, null included, and a revoke removes it. Under two holders a package reads its own rows, and a row naming none of the holders is no package's. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT
…lared entry the door serves where the name resolves to another package Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Posted 2026-11-14T14:37Z. This is the same isolated reviewer's delta review of the fix for FAIL record 6878911246, under brief 6878905826, read as Contract reviewServed-tier: ① Derived judgmentsDelta: 5 files, +148 / -67. The new rule (
New in the delta, all nits:
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx 维护者速读 · PR #33218 @
|
Requested by Tesla · project thread
Part of #31699
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
?package=,地址化的门随收窄兜底的 PR 一起落,不晚于它)、M6(无持有者时用条目自己的包)、S3(两个持有者时包自己的行优先)。三条都经红线审读接受。packages/services/service-automation/src/connector-connections.ts(answering)、src/plugin.ts(connectorInstancePackage、connectionDoorInstance)、src/oauth2-grant/grant-handle.ts。What changes
ConnectorConnectionStore):connect,read,readOrRefuse,revoke,listFortake the instance's package. One rule (answering) decides which rows answer: the package's own rows, plus a package-less row only where the name's durable resolution (the boot backfill's question) binds it to that package or no registry can judge; a connect adopts that row in place (M2). Two answering rows are refused, never picked. A package-less row of a name two packages hold is no package's: the read and the revoke are refused 409 namingos migrate stored-references bind.listForstill counts a conflicted organization, carrying the refusal. The post-insert take-back from feat(service-automation, metadata-protocol, driver-mongodb, cli): a connector connection is unique per organization and instance (package, name) #33199 now counts by package.connectorInstancePackage): a real stamp; none for the environment's stored entry; for an unstamped or compatibility-default entry, the durable holder's package. Door, dispatch handle, materializer and reconnect mark all use it.connectionDoorInstance): resolves the name; two holders 409; no registry or no holder serves the one declared entry (two declared entries 409).packageId(explicitnullfor no package). The callback completes exactly that package's entry; a record from before this change (no key, TTL ten minutes) resolves the name.createOAuth2GrantHandle): reads by package; a conflict is 503 on both the selection and the refresh read; an org-less dispatch never takes a conflicted organization's row.content/docs/automation/connectors.mdx.Declared deviations from the design review
?package=on the HTTP door and no spec change here. The addressed door lands with the PR that narrows the one-holder backstop, and no later. Until then a name with two holders (a package installed after boot) is refused at every leg of the door, revoke included.null.Verification
connector-connection-package.test.ts(new, real ObjectQL over SQLite): 10 pins on the store rule, adoption, two holders, two rows, revoke,listFor.connector-connection-door.test.ts: 13 new pins through the booted plugin and a realSchemaRegistry: stamping, the 409s, the callback completing the recorded package (includingnull) after the declarations change, refusal before the code is used, M2 adoption, two rows refused with and without the run's organization, a conflicted organization still counted (422), revoke 409 under a disabled second holder, unstamped and__runtime__entries keeping their row across the backfill bind.listForskips a conflicted organization; revoke answers not-connected under conflict; door fallback removed; the resolver arm of the instance package removed.@objectstack/service-automationfull suite, rebased onmainafter feat(service-automation, metadata-protocol, driver-mongodb, cli): a connector connection is unique per organization and instance (package, name) #33199: 281 files, 3871 tests passed.tsc --noEmit, ESLint on touched files,tenant-audit-census,check-engine-double-contractgreen.Red-line read
Run in this thread by a separate review pass (maintainer's instruction: 「你自己有fable,自己审就可以了吧?」). Round 1: PASS-WITH-CHANGES, one must-fix (an org-less dispatch could take the first of two answering rows) and five should-fix (a conflicted organization skipped turning a 422 into a dispatch; the door's holder-to-entry match; revoke 404 vs read 409; revoke under two holders; the changeset's "as before"), all taken; M5, M6 and S3 accepted. Round 2: PASS-WITH-CHANGES, one should-fix (an unstamped entry must be its durable holder's instance, or the backfill bind loses its row), taken. Round 3: PASS. Carried to 3b: re-key the grant handles by
(package, name)and evaluate the handle's package per read, before any PR lets two instances of one name live.These red-line reads ran before the 2026-11-14 04:37Z pause of seat-run contract reviews. This PR is opened as a draft and owes a contract review at TIER_DEFAULT (widening) from the new review agent before it is marked ready.
Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT