Skip to content

feat(node-runtime): host-native Linux private daemon mode (OSS-376) - #527

Merged
athNdev merged 1 commit into
mainfrom
codex/node-native
Nov 18, 2026
Merged

athNdev merged 1 commit into
mainfrom
codex/node-native

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the HOST-NATIVE LINUX PRIVATE DAEMON deployment mode (OSS-376, parent OSS-368). This is a mode-specific lane: it consumes the shared enrollment/control contract (ADR 0019, node_control.proto, PR516/517/518) and does not fork it. No proto field, RPC, shared DB column or shared auth middleware is changed.

What is included

  • internal/noderuntime/native: compatibility gates selecting rootless only when user namespaces, subuid/subgid, delegated cgroup v2 controllers, a qualified storage driver and a private 0700 runtime directory are all present. Hardened dedicated rootful is the explicit compatibility path; an unqualified host fails closed with precise refusal codes. A preinstalled/shared Docker engine is never a fallback.
  • Private-socket / private data+exec roots / dedicated containerd namespace / private bridge+port range enforced by named refusals; rendered unit and config never contain the host socket, a public raw API listener or blanket privileges.
  • Live enrollment/auth boundary implementing the approved scheme against shared proto types: node-generated >=256-bit secret, REQUIRED operator-approved public key, CSR_PRE registration material, challenge-bound fresh SIG_CLAIM, single-use atomic consume, TLS topology support/refusal, signed public X.509 client certificate, three non-crossing authorization domains, no secret in read responses or fixtures.
  • cmd/carbon-node: bounded preflight/doctor runtime caller reading injected facts; it never probes or changes a live host, installs a daemon, writes a host unit or mounts a real socket.
  • Mode prerequisite/isolation doc with compatibility gate matrix, and a governing knowledge concept.

Evidence (fixture-only)

  • go build ./... clean; go vet and go test -count=1 on ./internal/noderuntime/..., ./cmd/carbon-node, plus adjacent ./internal/rpc and ./internal/db all pass.
  • 25 fixture tests/subtests cover the qualified rootless path, every refusal code, rootful fallback, daemon spec refusals, in-memory unit/config rendering and the full enrollment state machine (valid claim, mismatched key, CSR_PRE-as-proof, stale/replayed nonce, replay, revoked/generation, three-domain scope, topology support/refusal, digest-only storage, no secret in responses, atomic rollback, durable rotation across snapshot restart).
  • go run ./cmd/knowledge-lint -root . -fix then plain lint: 65 concepts / 38 queries pass, indexes current.

Limits

All keys/secrets are synthetic or ephemeral and private files live in temp directories. No fixture starts a daemon, probes a real host, changes host configuration or writes a real credential. These fixtures prove refusals, state transitions and contract shape only — not live-host, install, gameplay or deployment success. No production enrollment RPC handler is mounted. No merge, release or deployment is requested.

Head: 58ec5f7

Add the mode-specific host-native implementation that consumes the shared
ADR0019 node-control contract without forking it.

- Compatibility gates select rootless only when userns, subuid/subgid,
  delegated cgroup v2, a qualified storage driver and a private 0700 runtime
  dir are present; hardened dedicated rootful is the explicit fallback and
  an unqualified host fails closed with precise refusal codes.
- Private socket, data/exec roots, containerd namespace and bridge/port range
  are enforced by named refusals; rendered unit/config never contain the host
  socket, a public raw API listener or blanket privileges.
- Live enrollment boundary implements the approved scheme against shared
  proto types: node-generated secret, REQUIRED approved key, CSR_PRE material,
  challenge-bound fresh SIG_CLAIM, single-use atomic consume, TLS topology
  support/refusal, signed public cert and three non-crossing auth domains.
- Disposable temp-dir fixtures with synthetic keys; no live host, daemon,
  global config change or production rollout.
- cmd/carbon-node bounded preflight/doctor runtime caller; mode doc, gate
  matrix and knowledge concept included.

Verification: go build ./..., vet + tests on touched and adjacent packages,
knowledge-lint 65 concepts/38 queries all green.
@athNdev
athNdev merged commit ace5f4b into main Nov 18, 2026
12 checks passed
@athNdev
athNdev deleted the codex/node-native branch November 18, 2026 08:34
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