Skip to content

docs: propose ADR 0046 d2b 3.0 Provider control plane#334

Merged
vicondoa merged 115 commits into
v3from
adr0046-provider-resource-control-plane
Jul 25, 2026
Merged

docs: propose ADR 0046 d2b 3.0 Provider control plane#334
vicondoa merged 115 commits into
v3from
adr0046-provider-resource-control-plane

Conversation

@vicondoa

@vicondoa vicondoa commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Dependency: none

Base: v3/main @ 9cc7db2
Head: 6078a87
Tree: ed7ae3508a7315c73e8dc11c16ddec7977a5162e
candidate_id: pending canonical post-rebase snapshot
content_id: pending canonical post-rebase snapshot

Checks:

  • Rebased onto required 9cc7db2 baseline
  • Tier 0: passed
  • Layer-1 workflow drift: passed
  • CI workflow policy tests: passed
  • Specification closure: 55 specs, 27 Provider dossiers, 543 work items
  • Implementation graph: 598 nodes, 1940 edges, acyclic and wave-monotonic
  • Final panel: rerunning after rebase
  • GitHub CI: pending

@vicondoa
vicondoa changed the base branch from main to v3 July 24, 2026 23:05
vicondoa and others added 29 commits July 24, 2026 16:51
Freeze the shared Zone, resource, Host/Guest, Provider, reconciliation, process, session, and bootstrap contracts before parallel specification authoring. This keeps the pre-ADR45 v3 tree as the factual baseline while allowing exact, independently reviewed reuse from main.
Record the reviewed Host/Guest model, bootstrap authority, sensitive credential channel, minimal resource and Provider catalogs, Nix cleanup/artifact rules, and fixed performance/security bounds before integrating parallel specs.
Specify Zone-local control resources, direct Nix ResourceSpec authoring and artifact resolution, configuration cleanup, and the complete CLI contract on top of the ADR 0046 foundation.
Keep bootstrap resources runtime-owned, resolve Process templates through semantic owners without package references, and avoid treating current VM listings as Host resources.
Define fine-grained Volume layout, views, ACL repair, attachments, and quotas alongside external Device discovery, arbitration, claims, Provider packaging, and cleanup contracts.
Specify the bounded core emitter, optional OTEL Provider, authoritative audit and support surfaces, and the exhaustive pre-ADR45-to-v3 code and artifact disposition map.
Define Credential binding, lifecycle, Provider placement, redaction, audit, and end-to-end Noise KK token and signature delivery without exposing sensitive output to intermediary Zones.
Specify Provider-owned Volume state, schema migration, sealing, snapshots, relocation, lifecycle cleanup, and configuration publication without exposing paths or seizing controller/API resources.
Specify ZoneLink hierarchy, per-hop authorization, transport Provider binding, relay constraints, watch and call forwarding, and configuration-driven cleanup on the fixed core controller.
Specify Host, Guest, Process, EphemeralProcess, and User schemas, async launch and reconciliation, pidfd supervision, sandboxing, no-isolation posture, Nix authoring, and exact migration work.
Specify Network fabric, dynamic bridge and firewall reconciliation, net-VM system artifacts, runtime config delivery through fine-grained Volumes, guest agents, and child-first cleanup.
Align CLI, Nix, telemetry, and migration specs on core-managed ownership, fixed core-controller publication, event-only Deleted revisions, post-commit audit recovery, and count-based retention without forced finalizers.
Define the fixed Host/User bootstrap Provider and the ADR 0021-preserving virtiofs attachment Provider, including exact package layouts, lifecycle, security, and delivery work.
Test failure of the runtime-owned bootstrap resource rather than expecting a forbidden Nix declaration.
Specify Wayland session and policy resources, canonical Process and Volume composition, authenticated FD handoff, GPU dependency, decoration metadata, filtering, and fail-closed compositor mediation.
Specify same-user Host and Guest placement, injected D-Bus FD access, lease reconciliation, end-to-end Noise KK delivery, redaction, and complete package/test boundaries.
Specify gateway-Guest-only cloud control, co-located Credential delivery, canonical Process and Provider-state Volume composition, async effects, relay routing, and redacted lifecycle evidence.
Reconcile the ADR 0046 foundation specs and dossiers so the Provider
control-plane contract is internally consistent and normative:

- Canonical Provider ResourceSpec is exactly artifactId/config; manifest,
  package, component, resource, status, and generated properties are
  resolved from the signed manifest/catalog, never authored fields.
- ProviderStateSet is the logical, query-time grouping of ordinary Volume
  resources owned by a Provider, never a ResourceType or stored row.
  Every Provider component, including stateless ones, gets its own
  private framework-created Volume (empty stateSchema when stateless),
  using the canonical Volume schema and User/<name> layout principals
  from a bounded, Nix-preprovisioned pool; components mount only their
  own view, with no cross-component sharing. Core ProviderDeployment
  creates these Volumes from signed state declarations before launching
  the corresponding component Process. Resource rows and the core
  operation ledger remain sole authority for refs/generation/backoff.
- A closed, non-resource bootstrap state-realization exception documents
  the narrow, per-execution-target break in that ordering needed to
  bootstrap Volume creation itself: each Host/Guest/user-domain local-
  storage owner running its own volume-local controller instance has its
  own local bootstrap mechanism, provisioning only that instance's empty
  state Volume and, where present on that same target, system-core's/
  system-minijail's, which volume-local then adopts/reconciles as
  ordinary Volumes on its own startup. The mechanism never crosses an
  execution-target boundary or leaks a parent-Host dirfd, so a Guest can
  bootstrap its own primitive controllers independently; no other
  Provider/component receives this exception, and it is not a third
  Process-bootstrap Provider.
- No Provider process (including primitive Process/Volume/Network/Device
  Providers) imports/calls the broker or performs privileged mutation
  directly; Providers call injected async EffectPort traits and
  Core/ProviderSupervisor privately maps effects to broker/allocator/
  systemd/user/guest/kernel operations.
- Core ProviderDeployment creates static controller/service Processes and
  their per-component state Volumes; controllers never bootstrap their
  own Process; worker authority is narrowed to inherited LaunchTicket
  resources.
- Process common fields are frozen to their exact names (providerRef,
  executionRef, domain, userRef, processClass, template, configRef,
  credentialRefs, mounts, sandbox, budget, networkUsage, deviceUsage,
  endpoints, telemetry); successfulTtl/failedTtl defaults preserved.
- UserNamespaceSpec drops numeric hostUid/hostGid for a frozen semantic
  mappingClass (process-principal-root); Core resolves and writes
  uid_map/gid_map only in private LaunchTicket/effect-adapter state.
- Provider-specific ResourceTypes use the frozen vendor-qualification
  grammar <provider-name>.d2b.io.<Type>; standard types stay unqualified.
- Transport Providers are carriage-only; the core ZoneLink handler alone
  owns ZoneLink/Noise/session/reconnect/route/idempotency/intent state.
- Volume keeps fine-grained layout/ACL/view/attachment/quota semantics
  but drops raw host paths from the public spec in favor of an opaque
  sourcePolicyId resolved only inside private Nix/bundle/effect
  authority; volume-local remains sole Volume-type owner and
  volume-virtiofs stays attachment-only.
- Provider status is core-derived from component/dependency/process
  health, never self-declared by the Provider.
- Finalizer/deletion ordering never force-clears an undrained finalizer;
  audit appends only after the committed Deleted revision, using
  dedup/exactly-once recovery.
- Async reconciliation keeps p95 launch-attempt targets and forbids
  polling/debounce sleeps.

Records the underlying decisions as D075-D086 in the decision register.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vicondoa added 27 commits July 24, 2026 16:53
Keep metric dimensions bounded to closed semantic domains. Carry Zone and resource identity in the permitted OTEL resource and audit surfaces instead.
Define generation-fenced persistent tap deletion and bind USBIP firewall teardown to the existing closed action request.
Keep coarse Endpoint scope closed while moving subject, component, and operation restrictions into consumerPolicy. Bind controller admission and planned drift coverage to that contract so provider examples cannot introduce aliases.
Keep Credential identity confined to authorized bounded audit records, align service admission with canonical resource verbs and Role subresources, and narrow the Entra login Endpoint example.
Map Credential service admission one-for-one to allowed operation classes and require exact supplemental lifecycle subresources for administrative CRUD.
@vicondoa
vicondoa force-pushed the adr0046-provider-resource-control-plane branch from c2cbdc7 to 6078a87 Compare July 24, 2026 23:56
@vicondoa
vicondoa merged commit 9e3c58a into v3 Jul 25, 2026
47 checks passed
@vicondoa
vicondoa deleted the adr0046-provider-resource-control-plane branch July 25, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant