ADR-0275: Bootstrap binds Connected Services at the consumer scope
Status
Proposed — 2026-11-28. Owning feature: #1439.
Context
ADR-0251 gives Bootstrap typed resource references and protected configuration initializers. ADR-0248 supports explicit per-profile plans and ADR-0274 composes independent startup references from selected GUID settings. A deployed PostgreSQL connection should be reusable by Nantes without another copy of its password or an installation-specific connection name inside the consumer resources.
Decision
Add connectedService to the existing typed profile binding contract. Permit
this ordinary binding at Instance, Tenant and Workspace scope, while preserving
the existing restrictions on other kinds. A resource uses the existing
{binding: name} placeholder. Convert the selected connection to a typed
Bootstrap resourceRef and let the owning resource preparation resolve its
native revision immediately before application. The Storage/Connected Service
services retain responsibility for scope hierarchy, access, availability,
export compatibility and protected values. Do not add another connection store,
value resolver or general interpolation engine.
Existing manual plans can select a compatible producer earlier in the ordered
composition. Independent initial applications and profile references carry a
bounded Bindings list with profile/name, target name, namespace and optional
exact scope. These configuration-only string coordinates are parsed into the
normal resource/binding contracts before topology mutation. They retain ordinary
configuration-provider behavior without adding type converters to public domain
identifiers. Startup references do not resolve a targetProfile; producer order
and explicit logical scope identify their prerequisite connection.
Validate selection shape, declared names and required bindings during structural preparation. Resolve only bindings used in the current startup phase, consistently in preview and execution, so a resource-phase connection does not change the Topology/Policy phase digest. Preserve the full phase/profile digest checks. Native service/type revision evidence joins the reviewed fingerprint; changed or unavailable state requires a new review and never repins an existing consumer. Only metadata and exact references enter previews/history, never connection values, secret values or their hashes.
The existing Bootstrap selector lists same-scope and descendant-visible connection metadata using logical scopes. Normal preview/apply authorization remains mandatory. Add only the localized binding-kind label; reuse the existing selection/review/application controls and retain the deferred UX scenario gate.
Split the optional Nantes local connection into nantes-postgresql; the shared
nantes-alertes consumer binds its JSONB Storage to the selected connection.
An installed nantes-alertes-postgresql remains its default target. Fresh local
compositions select the infrastructure profile first. Preview compositions use
preview-postgresql-documents, whose existing recipe generates and retains its
credentials on the target, then OpenAPI operational configuration and Nantes.
All container/cloud orchestration stays external to Agentstration.
Consequences
- Default startup remains offline and SQLite-backed; the new scenario is opt-in.
- Fresh standalone Nantes application now composes its optional infrastructure first or selects an existing service. Existing resources are not deleted.
- Ordinary replay preserves connection/Secret/consumer identities and operator edits; explicit reset retains its existing meaning.
- OpenAPI options use ADR-0270's operational configuration contract. Foundry can be enrolled without introducing a model call into Nantes Bootstrap.
- Offline fixture tests establish binding/scope/review behavior. Live discovery, real document operations and cloud readiness require explicit qualification.