Skip to content

feat: replace Guest control with ComponentSession - #478

Merged
vicondoa merged 71 commits into
v3from
feat/v3-guest-control-plane
Aug 25, 2026
Merged

vicondoa merged 71 commits into
v3from
feat/v3-guest-control-plane

Conversation

@vicondoa

@vicondoa vicondoa commented Aug 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

This completes the v3 Guest control-plane clean break. Feature-specific Guest
RPCs, legacy daemons, and the unreleased host cutover path are replaced by one
authenticated ComponentSession and Resource API architecture.

The final branch:

  • uses signed controller placement and one fenced assignment per resource;
  • runs shared d2bd host / d2bd guest and d2b-broker host / guest
    artifacts as separate mode-bound authority instances;
  • deploys Provider controllers and workers as target-local Processes;
  • routes exec, shell, activation, configuration, health, semantic Bindings,
    display, clipboard, notification, audio, security-key, and telemetry through
    resources, typed services, and named streams;
  • keeps ordinary Guests isolated from Zone stores, public sockets, Host
    authority, realm credentials, and sibling Guests;
  • gives gateway parent-Guest and child-Zone roles separate daemon and broker
    instances, sockets, state, identities, and audit roots.

Clean break

The branch removes d2b-guestd, the legacy exec runner,
guest_control.proto, generated bindings, runtime bridges, old Guest Nix
services, token material, stale closures, and compatibility fallbacks.

It also removes the entire unreleased cutover feature: the d2b-cutover
package, CLI and public-wire operations, daemon and broker handlers, runner,
Nix packaging, schemas, policies, fixtures, VM and live-host tests, and
current operator documentation. No v1 cutover option, deprecated command,
feature flag, or no-op compatibility path remains.

Old peers fail closed. There is no SSH, raw tunnel, direct-spawn, Host-broker
fallback, legacy Guest RPC path, or cutover escape hatch.

Design decisions

  • Nix and the Zone resource store remain authoritative.
  • Controllers create Process or Endpoint children; they do not spawn feature
    processes directly.
  • Bindings remain explicit user intent and are never synthesized by Services.
  • The editable Guest configuration stays at
    /var/lib/d2b-guest/guest-config.nix, owned by the workload user with
    d2bd group read access.
  • Host integration builds the fixed eight host tools with local Bazel and
    injects those outputs into NixOS VM checks, including shared Guest daemon and
    broker binaries.

Session-settled decisions carried from planning: shared daemon and broker
executables, target-scoped controller instances, ComponentSession as the only
Guest control plane, explicit Bindings, and resource-backed child execution
were user-directed; the separate config Provider was user-approved.

Known limitation

Non-QEMU USBIP attach fails closed with runtime-capability-unsupported.
The legacy Guest importer is gone, and the signed usbip-guest-proxy
Process/effect adapter is not yet available. Host-only export is never reported
as success, and failed Guest detach does not release the host claim.

Validation

  • make check
  • make test-host-integration - all 13 retained NixOS VM checks passed
  • Host integration used the staged Bazel host-tool bundle instead of
    rebuilding d2bd or d2b-broker through Nix
  • Attic dependency-closure upload completed without caching VM test results
  • labs/** and nix/gas-city-contributor/** remain unchanged

vicondoa and others added 30 commits August 21, 2026 02:53
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add provider-neutral Guest ComponentSession enrollment, bounded target lifecycle, and mode-bound broker composition while preserving the Host daemon surface.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lane

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lane

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	Makefile
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route guest exec and shell lifecycle through Process-family resources and authenticated named streams while preserving owner, auth, and disconnect boundaries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route Guest activation, bounded configuration, health, and signed target-local process execution through authenticated ComponentSession and Guest broker contracts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run public validation lanes directly, compile Rust tests through BuildBuddy, keep test actions and Nix checks local, and retire obsolete source-policy and locality suites.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the integrated exec and shell paths while adding typed Guest activation, configuration, health, and signed process execution contracts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vicondoa and others added 16 commits August 24, 2026 07:23
Combine resource-backed display startup and interaction lifecycles with the semantic Binding and Endpoint admission contracts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Classify only trusted local-vm Wayland nodes as resource-backed so QEMU-media retains its DAG-spawned proxy and readiness edge.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Include the final semantic telemetry provider in the Guest workspace and regenerate canonical Guest-static policy artifacts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the protected reusable workflow compatible with the root toolchain authority through a relative package-path symlink.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the retired Rust shard, make broker profile coverage runner-independent, and use native Bash on FHS CI hosts while preserving the NixOS fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the async blocking regression below its backend delay and allow cold realized Nix and advisory performance jobs to finish on hosted runners.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Delete guestd, legacy exec and shell RPC infrastructure, generated guest-control contracts, obsolete Nix services, stale closures, and unused compatibility paths after ComponentSession replacement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerate final Guest-static policy artifacts on the reviewed U7-U9 graph while preserving complete guestd-static removal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerate broker, product, and Guest runner closure inputs after removing the legacy Guest daemon and protocol contexts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align USBIP Nix expectations with ComponentSession ownership, isolate CLI daemon fixtures from stale host config, and refresh trusted build evidence.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reject persistent shell wiring without a configured non-root workload user and retire the final guest-control fixture options.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Stop reporting host-only USB export as a successful attach, require exact resource-backed Guest readiness, and preserve host claims when Guest detach is unavailable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Seed the editable Guest configuration at the same path consumed by d2bd guest and pin the evaluated VM contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the editable config in a workload-owned directory with d2bd group access, aligned across tmpfiles, daemon defaults, tests, and runbook.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vicondoa vicondoa changed the title feat: route guest control through ComponentSession feat: replace Guest control with ComponentSession Aug 25, 2026
@vicondoa
vicondoa marked this pull request as ready for review August 25, 2026 06:43
vicondoa and others added 10 commits August 25, 2026 00:00
…lane

# Conflicts:
#	nixos-modules/host-broker.nix
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the package, CLI and daemon protocols, broker operations, Nix packaging, generated contracts, tests, fixtures, and current documentation. No compatibility path remains.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The generic resource activation check retains Guest list and metadata persistence coverage while the dedicated runtime check owns launch and restart adoption.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a realized VM output as the closure root when its binary cache does not retain the original derivation, while still excluding VM result paths from Attic upload.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vicondoa
vicondoa merged commit 4bdbca9 into v3 Aug 25, 2026
27 of 29 checks passed
@vicondoa
vicondoa deleted the feat/v3-guest-control-plane branch August 26, 2026 03:36
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