Repository navigation
feat(service-automation)!: two packages of two namespaces may each declare a connector of the same name (ADR-0150 child B, the narrowing) - #33431
Conversation
…clare a connector of the same name, and a flow, a pull and the connection door address one by package The connector, the last type of ADR-0150 child B, narrows its one-holder rule to the namespace: it joins the namespace-scoped type sets (core, objectql, metadata), the declared-connector reconcile materializes each package's instance under its package (the backstop is lifted), the engine resolves a bare name for every caller over the served holders, a pull resolves its connector from the mapping's package, and the namespace connection door connects the addressed package's instance. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT
510a840 to
1530146
Compare
📓 Docs Drift CheckThis PR changes 7 package(s): 33 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 15 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 186 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 e01e168d1ea59305fc661846b28d549003bc89e8 && git checkout e01e168d1ea59305fc661846b28d549003bc89e8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ba35dfd78283d5f839eaaaab24764322ae3e263a 1530146d3e5029e149aaf4d5cfe8b6d78b30914e && git checkout -B drift-repro ba35dfd78283d5f839eaaaab24764322ae3e263a && git merge --no-ff 1530146d3e5029e149aaf4d5cfe8b6d78b30914e
node scripts/docs-audit/affected-docs.mjs --json ba35dfd78283d5f839eaaaab24764322ae3e263a
|
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Contract review brief — #31699 narrowing PR (connector, last PR of ADR-0150 child B)Reviewer: an isolated agent with no part in writing the change. Read the code, not the author's summary, and judge it yourself. What to read
What to judge
OutputWrite the report to
Do not edit the worktree, push, or post anywhere. Running tests read-only is fine ( Generated by Claude Code |
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Contract review r1 — #31699 narrowing PR (connector), commit 4a9d32b9Reviewer: isolated agent, no part in the change. Read: every hunk of 4a9d32b9, the changeset, the PR body draft, issue comments 6871869590, 6879929803, 6816295828, 6820178514, 6882996364, and the surrounding code the hunks depend on. Five claims below were measured with probe tests run from a scratch directory against the worktree's source (nothing in the worktree was written; Verdict: PASS-WITH-CHANGESRed lines 1 and 2 hold on every path I traced: I found no caller served or sent another package's instance, and no instance picked by order. Two defects block landing: one answer moves for a one-holder deployment without being declared (red line 3), and one bare-name key still mixes two packages' instances. Must-fixM1. The credential listing loses
|
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Contract review, delta after r1 — #31699 narrowing PR (connector), head de90aedbScope: Verdict: PASSNo must-fix item remains, and the delta introduces none that I found. What was run
Per finding
Notes, none blocking
Clause-② judgement
delta-2 — head 510a840 (
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT
Requested by Tesla · project thread
Fixes #31699
Clause-②: yes (narrowing)
Metadata-protocol: added
维护者速读
none,只有插件代码注册的连接器例外;拉取按映射所在的包解析连接器;带命名空间地址的连接门(/automation/connectors/:ns/:name/connection)连接该命名空间那个包的实例。GET /connectors加?package=。本 PR 用已有的命名空间地址代替第二种写法,GET /connectors不加过滤,每个描述符带packageId。认领修订 6882996364 事先说明了这一点。packages/services/service-automation/src/engine.ts(resolveConnectorInstanceFor)、src/plugin.ts(协调器的期望集合与judgedByPackage、connectionDoorSubject)、src/connector-pull.ts(第 2 步)、packages/runtime/src/domains/automation.ts(准入块)。What changes
connectorjoinsNAMESPACE_SCOPED_BARE_NAME_TYPES(core),PACKAGE_SCOPED_READ_TYPES(objectql) andPACKAGE_SLOTTED_STORE_TYPES(metadata). Every covered type has now narrowed.plugin.ts):refusedDeclaredConnectorNames, andrefusedConnectorNamesinconnector-package-scope.ts).connectorInstanceRefusal).desired, the materialized, degraded and credential-refusal maps, retry, dematerialize andgrantHandlesare keyed by instance (connectorInstanceKey:name, orPACKAGE/NAME).judgedByPackage, red line 1).(package, name): an unstamped artifact item is stamped with its manifest id at capture, so a reload of one package leaves the other package's instance of the name live. With no manifest id, or no package-scoped registry, it supersedes by name, as before.engine.ts,resolveConnectorInstanceFor):none.none, unless the name has a connector a plugin registers in code (packagenull, originplugin), which is served as before. That keeps a package's catalog descriptor plus a plugin's connector working.getConnectorDescriptorssetspackageId.connector-pull.ts): the mapping's connector is resolved from the mapping's holder package through the registry's optionalresolveConnectorInstanceFor, and its origin, degraded state, provider (materializedProviderOf), action andinputSchemaare read from that instance. New reasonconnector_name_refused(409).ConnectorConnectionRequest.package(spec, optional). The runtime admits a namespace address of a two-holder connector name to the addressed holder (admitAutomationAddressanswers a slot, as for a flow) and passes the package. The bare door keeps its 409.packageIdis the entry's stamp, as on main.content/docs/automation/connectors.mdxgains "Two packages, one connector name" and two failure-mode rows. The objectql, core and metadata module docs say the connector narrowed.Verification
connector-connection-door.test.ts(7): both instances materialize; the bare door 409 and the addressed begin, read and revoke per package, each with its own row and token; revoke one, the other keeps serving; an unowned entry under two holders refused; a duplicate within a package; the no-registry CONTROL; N6.flow-package-scoped-resolution.test.ts: the narrowingnonepin (FROM the fallback arm); the plugin catalog CONTROL; the disabled holder in both registration orders (A's caller never served B's or A's instance; a caller with no package served B; CONTROL both enabled) and a lone disabled holder; the null caller refused naming both; the no-registry CONTROL.connector-pull.test.ts(4) andconnector-pull-service-door.test.ts(1): each package's mapping pulls its own instance; the provider read per instance; holder with no instance isconnector_not_registered; an environment mapping over two holders is409 connector_name_refused.connector-materialization.test.ts: two holders of different namespaces both materialize (FROM the boot refused); a reload of one holder's artifact leaves the other's instance live; the credential listing reports each of two instances' states, and asys_metadataor__runtime__entry over a one-holder name reads the holder's state.connector-connection-door.test.ts(review round): a disabled holder at the bare door and at its own namespace address (404, nothing written), both orders; a revoked instance is held degraded; the unstamped entry's handle reads its fixed package.flow-package-scoped-resolution.test.ts(review round): a caller inside the disabled package reads its own instance (both orders, and alone); two catalog holders beside a plugin connector (each package served the plugin's, the null caller refused naming both).connector-pull.test.ts(review round): one of two holders disabled, the environment's mapping pulls through the served holder.connector-descriptor-audit.test.ts: a package's catalog entry is not silenced by another package's live instance of its name.automation-addressed-route.test.ts: each namespace address reads its own package's instance (FROM 409).marketplace-install-local-bare-name-conflict.test.ts: the refusal case is now a same-namespace co-owner; a cross-namespace connector install is admitted (FROM 422).scripts/ablation-replace.mjs, each restored with an emptygit diff HEAD), each red on its pins: the fallback arm back (3), the disabled branch off (1), the null caller not asking the resolver (8), no plugin instance (1), the unowned entry not refused (1), no registry judged (6), grant handles by name (5), the pull by bare name (4), the door ignoring the package (3), the provider by name (1), no connector slot at the runtime address (1); the reload merge by bare name (1, A12); the credential listing by stamp (1, A13); the inert audit by name (1, A14). Record:server-seat-7/r2026-11-14/31699-narrow-ablations.txt.df9fe946: service-automation 3941, runtime 12060 (19 skipped), core 3480, objectql 12976, metadata 2479, metadata-protocol 22848 (43 skipped), cloud-connection 1210, CLI stored-references 13. All passed. Rebased again on4ace1fa9over fix(metadata-protocol)!: history and rollback doors refuse a bare two-holder name and address one holder by ?package= #33193 (head1530146d): metadata 2490, metadata-protocol 22865 (43 skipped), service-automation 3941, runtime 12074 (19 skipped), spec 28422 (1 todo), speccheck:generatedgreen.tsc --noEmit(service-automation, runtime), ESLint on every changed file, tenant-audit, system-context, route-ledger and engine-double censuses, changeset no-major / empty / fixed, doc-authoring, doc-anchors, speccheck:generated(its test-typecheck leg needs a larger Node heap here:NODE_OPTIONS=--max-old-space-size=12288; then OK, no debt moved).dispatch-gates --ran: 124 derived families accounted for, 122 run green, 2 NOT-MEASURED for prerequisites this checkout lacks and the diff does not touch:check:dual-build-cjs-loads(nostudio/embedder-openaidist) and thecheck-plugin-teardown-shapeself-test (shallow clone).check:dts-closurewas red once in the sweep and green when re-run alone (311/311 declaration files present).Contract review
An isolated contract reviewer read the card, ADR-0150, the handoff and the diff with no anchor on mine.
4a9d32b9: PASS-WITH-CHANGES. Two must-fix items: M1, the credential listing lost an environment row's state; M2, a reload of one package's artifact tore down the other package's instance. Five should-fix items (S1 to S5) and four nits.de90aedb: PASS. Three notes; I acted on all three: no-registry reloads supersede by name as on main, a changeset clause, and a__runtime__pin.510a8400: PASS.e467615b, the rebase over fix(metadata-protocol)!: history and rollback doors refuse a bare two-holder name and address one holder by ?package= #33193: PASS.connectorjoinsPACKAGE_SLOTTED_METADATA_TYPES(@objectstack/spec), the one list the history and rollback doors and the metadata store read; the changeset says what moves on those doors.The brief, the r1 record and the delta record are posted as comments on this PR.
Human Minimum
packages/specholds no runtime logic. (Two optional members on TypeScript interfaces; no schema.)pnpm lintpasses on the changed files.main, one pull request.packages/spectouched:check:generatedis green for its artifacts.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT