Skip to content

fix(node-runtime): qualify exact shipped daemon units on real systemd (OSS-376) - #546

Merged
athNdev merged 2 commits into
mainfrom
codex/node-daemon-qual-fix
Nov 19, 2026
Merged

athNdev merged 2 commits into
mainfrom
codex/node-daemon-qual-fix

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Node runtime exact-unit qualification fixes (OSS-376 / OSS-379). New branch from main 4e461789, rebased onto current main after the installer adapter merged. No merge, release, deployment or registry write.

Three real defects fixed (found by booting the exact units with real dockerd 29.1.3 on a clean Ubuntu 24.04 / systemd 255 fixture)

  1. Private pidfile. Canonical daemon.json now emits a pidfile under the owned runtime root (no-clobber validation); the rootful unit carries a matching PIDFile=. No collision with a preinstalled engine's /var/run/docker.pid.
  2. Default container capabilities. Rootful CapabilityBoundingSet/AmbientCapabilities now include CAP_FSETID, CAP_KILL, CAP_NET_BIND_SERVICE and CAP_SETFCAP plus the daemon caps. Default-cap containers start; previously they failed unable to apply caps: operation not permitted. Hardening retained.
  3. Rootless notify. Rootless per-user unit now has NotifyAccess=all so the child-dockerd READY notification under rootlesskit is accepted by Type=notify.

CheckOptionParity and CheckUnitContract assert all three. Shared ADR0019 enrollment contract untouched.

Caller-compatibility fix (checkpoint)

CI found that PR544's installer CanonicalRenderer adapter passed caller specs without a pidfile into the new invariant. Fixed at the callers without weakening the invariant:

  • nodeinstall.DaemonSpec gained a caller-owned pidfile; validate() requires a private *.pid inside RuntimeRoot, distinct from the socket; toNative() passes it through.
  • Updated installer fixtures/specs, the shell qualification spec writer and the Python installer fixture spec.
  • Added refusals for missing/shared/clobbering/outside-root pidfiles and a positive test that the caller-owned pidfile reaches config and unit.

Precise qualification (no overclaim)

Proven: the exact shipped ROOTFUL unit boots with real systemd (active/success, NRestarts=0), private socket/pidfile/roots exist, a default-capability container runs, memory/pids limits apply, and systemctl restart preserves containers and limits (live-restore).

Network wording, deliberately precise: observed were the published mapping 0.0.0.0:30123->8080/tcp, one matching iptables DNAT rule, and a TCP success from a second container to the private-bridge listener 10.231.0.2:8080. Client TCP reachability on the published game port was NOT measured (HOST_PUBLISHED_PORT=CLOSED from the fixture's own loopback with userland-proxy=false). DNAT-rule presence and bridge-side listener are distinct observations, not proof of published-port reachability.

Not verified / blockers: ROOTLESS active/success remains UNQUALIFIED on this WSL host (nested user-namespace/NAT denies iptables -t nat -N DOCKER); the NotifyAccess=all fix is present and contract/syntax-verified but must be retried only on an authorized disposable suitable Linux fixture. VM boot smoke may use isolated QEMU software emulation only if available without KVM (no /dev/kvm here); LXC needs its own suitable disposable runtime with real pins. Both are separate next steps, not qualification claims.

Exact output: security-runtime-plans/node-runtime-requalification-20261119.md.

Verification

  • Pinned Go 1.26.11: go build ./..., go vet ./..., go test -count=1 ./... all green.
  • golangci-lint v2.13.2: 0 issues on touched packages.
  • knowledge-lint -fix then plain: 75 concepts / 40 queries pass.
  • Installer Python fixtures: 6/6 pass.

Head: b12532128bb6951e804b67d07663e8a05acc13d1. No merge/release.

… (OSS-376)

Three real defects found by booting the EXACT units with dockerd 29.1.3 on a
clean disposable Ubuntu 24.04 / systemd 255 fixture:

- Add a private pidfile under the owned runtime root to canonical daemon.json
  (with no-clobber validation) and a matching PIDFile= in the rootful unit,
  removing collision with a preinstalled engine's /var/run/docker.pid.
- Add the four missing Docker default container capabilities (FSETID, KILL,
  NET_BIND_SERVICE, SETFCAP) to the rootful CapabilityBoundingSet and
  AmbientCapabilities; default-cap containers now start. Hardening retained.
- Add NotifyAccess=all to the rootless per-user unit so the child dockerd READY
  notification under rootlesskit is accepted by Type=notify.

CheckUnitContract and CheckOptionParity assert the fixes. Exact rootful unit
re-qualified active/success on the clean fixture (private socket/pidfile/roots,
bridge, DNAT, default-cap container, limits, live-restore restart). Rootless
NotifyAccess fix is contract/syntax-verified; full rootless active/success is
blocked by nested-userns iptables on the WSL2 fixture kernel and is honestly
reported as a remaining blocker. Shared ADR0019 enrollment untouched.

Verification: go build/vet/test (pinned Go 1.26.11), golangci-lint v2.13.2
0 issues, knowledge-lint 75 concepts/40 queries.
…enderer (OSS-379)

PR546 checkpoint: CI's Backend Test Suite failed because PR544's installer
CanonicalRenderer adapter passed caller specs without a pidfile into the new
native BuildManifest invariant (OPTIONS_PRIVATE_PIDFILE). Fixed at the callers,
without weakening the invariant:

- nodeinstall.DaemonSpec gained a caller-owned pidfile; validate() requires a
  private *.pid inside RuntimeRoot, distinct from the socket; toNative() passes
  it to native.DaemonSpec.
- Updated installer test fixtures/specs, the shell qualification spec writer
  and the Python installer fixture spec to set a canonical private pidfile
  beside the socket.
- Added refusals for missing/shared/clobbering/outside-root pidfiles and a
  positive test that the caller-owned pidfile reaches config and unit.

Qualification wording kept precise: exact rootful systemd+dockerd boot, restart
and default-cap container/limits were observed; DNAT rule and bridge-side
listener are distinct from measured client TCP reachability on the published
game port (not measured). Rootless active/success remains unqualified on this
WSL host (nested namespace/NAT); VM software-emulation boot and LXC guest boot
are separate blockers/next steps.

Verification: pinned Go 1.26.11 build/vet/full go test, golangci-lint v2.13.2
0 issues, knowledge-lint 75 concepts/40 queries, installer Python fixtures 6/6.
@athNdev
athNdev force-pushed the codex/node-daemon-qual-fix branch from 3c8ac0f to b125321 Compare November 19, 2026 00:20
@athNdev
athNdev merged commit 11d1c39 into main Nov 19, 2026
12 checks passed
@athNdev
athNdev deleted the codex/node-daemon-qual-fix branch November 19, 2026 00:39
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