carlos / platform Public

console-addr-from-install

A tunnel hub now hands fleet boxes' console calls to the console through a socket root's install creates, so the flagship hub needs no hand-set CARLOS_REPLICA_CONSOLE_ADDR (it answered 503 replica-console-missing without one).

What changes

  • internal/caps: the carlos- runtime-directory prefix is the platform's (ReservedRuntimeDir), refused at ship, adopt, converge and render; guard test TestRuntimeDirectoryRenderSites.
  • Root's adopt pass (internal/host/consolefleet.go): keeps a drop-in RuntimeDirectory=carlos-console on console.service under a reload-pending marker, and writes /var/lib/carlos-console-fleet/status.json saying whether the console holds /run/carlos-console alone, with its uid. Refused: a root console, a preserved or foreign-owned directory, an app's claim on the name. A failed record write removes the old record.
  • Console (cmd/console): binds /run/carlos-console/fleet.sock when that directory is its own, serving only the box doors; TCP unchanged.
  • Edge: env > socket > route scan. The socket is used only with root's exclusive record, the directory owned by the recorded uid, and the listener's uid proved with SO_PEERCRED before a byte is written. The route scan, kept one release (Paul), takes only loopback TCP console routes.
  • carlos system status shows, under a box with a console, the last box call's result, source and age, and why the socket is not ready.

Design and review (on the branch): spec docs/superpowers/specs/2026-11-24-hub-console-address-from-install-design.md (rev 3; Paul's decisions §12, §14, §15), plan docs/superpowers/plans/2026-11-24-hub-console-socket.md. Design review 2 rounds; plan review 2; task reviews T1, T4, T5 ready after fixes; T3 four rounds with Paul's cuts after rounds 2, 3 and 4. Census READY twice (#280). Whole-branch review (Fable) READY AFTER FIXES, fixes applied. UX pass and Luna copy in docs/superpowers/notes/copy/hub-console-socket.md.

After release: roll the boxes, then restart the console (its next deploy) so systemd creates /run/carlos-console. When carlos system status shows no "socket not ready" line under carlos-flagship-ie, remove the interim CARLOS_REPLICA_CONSOLE_ADDR line from its host.env and restart carlos-edge; the console line should then read ok · socket. Delete the route scan the release after.

Commits 34
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity