You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provider-bound declarative connectors: entries now reconcile at boot and on metadata:reloaded (add / tear down / re-materialize by signature). ConnectorDescriptor carries origin ('plugin' | 'declarative'). Follow-up to ADR-0096 (#2977).
Copy file name to clipboardExpand all lines: docs/adr/0096-declarative-connector-instances.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,8 +118,22 @@ If a provider-bound instance and a plugin-registered connector share a `name`, b
118
118
-**Open source:** the `rest` / `openapi` / `mcp` provider factories; **static** auth (`none` / `api-key` / `basic` / `bearer`); `credentialRef` resolved from **environment variables** (`defaultEnvCredentialResolver`) — the degraded-but-honest story for environments with no managed secrets service.
119
119
-**Enterprise:** managed credential **vaulting** and OAuth2 authorization-code/refresh lifecycle (inject a vault-backed `CredentialResolver` via `AutomationServicePluginOptions.credentialResolver` — no change to the materialization path), plus per-tenant connection lifecycle. The open tier deliberately omits OAuth2 from `ConnectorInstanceAuthSchema`.
120
120
121
+
### Runtime reconcile (follow-up, landed)
122
+
123
+
Materialization is no longer boot-only. `materializeDeclaredConnectors` is a
124
+
**reconcile** against the declared set, run both at boot (`fatal: true`) and on
125
+
`metadata:reloaded` (`fatal: false` — a Studio publish / dev reload). The reconcile
126
+
adds newly-declared instances, tears down removed / newly-`enabled:false` ones
127
+
(calling their `close`), and re-materializes only those whose signature (a stable
128
+
hash of `provider` + `providerConfig` + `auth` + identity) changed — an unchanged
129
+
MCP instance is never needlessly reconnected. On reload a bad entry (unknown
130
+
provider, unresolvable credentialRef, factory failure, name conflict) is **logged
131
+
and skipped**, never crashing the live server; a changed instance's old connector
132
+
keeps serving until its replacement materializes successfully. Boot keeps the
133
+
"fail loudly" contract.
134
+
121
135
### Deliberate scope boundaries
122
136
123
-
-**Boot-time only.** Materialization runs once at boot. Re-materializing a provider-bound instance published at runtime (Studio) is a follow-up; the descriptor audit still re-runs on `metadata:reloaded`.
124
137
-**`providerConfig.spec` (openapi)** accepts an inline document or an http(s) URL; resolving a `./file.json` ref relative to the stack is the stack loader's job, not the connector's.
125
138
-**MCP credentials** ride the transport (ADR-0024); for an http transport a resolved `auth` is folded into the request headers.
139
+
-**MCP at boot** connects during materialization, so an unreachable server fails boot; a fail-soft "optional" marker for boot-time materialization is a possible future refinement (runtime reloads are already soft).
0 commit comments