Repository navigation
Description
Direction (Drew, 2026-10-28)
Reviewing the #437 decision, Drew's ruling: systemd socket activation — systemd holds the port across service restarts so connections queue instead of being refused — 'should be what we do for everything', and asked why it isn't already the pattern across the board.
Verified current state (2026-10-28, flake at laptop ~/git/code)
Exactly ONE service does this today: OpenChamber (systemd.user.sockets.openchamber, ListenStream 127.0.0.1:3000, home/common/default.nix:999). A grep of the flake finds no other socket units, no LISTEN_FDS consumers, and no socket-proxyd anywhere. Everything else binds its own port and refuses connections while it restarts:
- PM stack: pm-aggregator (:4870), pm-projector (:7801) — plain systemd services.
- PM apps (Postgres, Kaneo, Grist, Pad) — Docker containers (compose today, oci-containers once feat(nixos): pm-apps — Kaneo, Grist, Pad, ready-for-agent as flake services (code#1752) #1762 lands); containers cannot inherit a systemd socket fd the same way.
- OpenCode server (laptop :13420 / tailnet serve :4096) — plain user service.
- OpenClaw gateway (:18789) — plain user service.
- cloudflared, id-mail services — to be inventoried.
Honest constraint (why this is an audit, not a blanket flip)
Socket activation only works when the program can accept a socket handed to it by systemd (the LISTEN_FDS protocol — trivial shim for our own Node services, supported natively by many daemons) or when a proxy shim (systemd-socket-proxyd) in front is acceptable, which adds a hop and its own failure modes. Postgres and Docker containers are the known hard cases. The audit's job is to apply it everywhere it genuinely helps and record a reason where it doesn't — not to force it where it can't work.
Acceptance criteria
- An inventory in this issue: every laptop service that listens on a port, with a per-service verdict — socket-activate (with the mechanism), or skip (with the concrete reason).
- Implementation issues filed for each 'socket-activate' verdict (the four
bin/proxies already have theirs: bin/ proxies: systemd socket activation so restarts never refuse connections #1821). - Drew reviews the inventory before the implementation issues are queued — the container/Postgres cases in particular are his call if a proxy shim is proposed.
Activity
developing-today commentedon Oct 28, 2026
CODE-753
dezren39 commentedon Oct 28, 2026
Intake review
Fleet monitor intake pass (protocol §5), 2026-10-28.
dezren39 commentedon Oct 31, 2026
Status — owner order 2026-10-28, stalled, re-queued 2026-10-31.
Drew's 2026-10-28 ruling ("socket activation should be what we do for everything") produced this audit issue, but it was never queued — no task row existed.
Remediation (2026-10-31): enqueued into repo-health-code-pilot as task 4721 (triage, priority 50, queued, attempts 0/3), verified by direct queue read; queue signal refreshed.
Scope note recorded in the packet: the triage produces the per-service inventory on this issue only. Implementation issues from the verdicts are deliberately NOT queued — this issue's own acceptance criteria require Drew to review the inventory first (the container/Postgres cases in particular). The one pre-approved implementation is the
bin/proxies: #1821, separately queued as task 4719.5 remaining items
dezren39 commentedon Nov 1, 2026
🤖 Agent note · parked
ss -lntupandsystemctl --user list-sockets/servicescensus against the laptop flake, then post every listener's socket-activation verdict and concrete mechanism/skip reason here. Do not file or queue implementation issues before Drew reviews the inventory.dezren39 commentedon Nov 1, 2026
agent-note:v1 — task 4721 triage inventory (lane C worker, 2026-11-01). Census taken live on the laptop (amd-6) two ways and cross-checked: (1)
ss -lntup+systemctl --user list-sockets/list-units+docker ps; (2) flake grep of laptop~/git/code. Per the task packet's HARD STOP, no implementation issues are filed from these verdicts — Drew reviews this inventory first (the issue's third acceptance checkbox; containers/Postgres especially). The fourbin/proxies remain covered by #1821 only.Flake cross-check
systemd.user.sockets.openchamber(home/common/default.nix:1012,ListenStream 127.0.0.1:3000) — matches the liveopenchamber.socket, the only user TCP socket unit.socket-proxyd/socketProxyd/LISTEN_FDSanywhere in the flake. Every other verdict below starts from "binds its own port" — confirmed, no discrepancies between flake and live state on this point.docker.socket(unix) exists; sshd has only ansshd-unix-localunix socket — sshd binds :22 itself.Inventory — fleet services (the pattern's scope)
openchamber.socket); the pattern's reference case.bin/proxy bridges (claude-code-proxy, codex-proxy, clef-proxy, commandcode-proxy, design-code-proxy, muse-proxy, antigravity-direct)MainThreadlisteners)Inventory — everything else listening (out of the pattern's scope, with reasons)
aw-server127.0.0.1:5600Discrepancies vs the 2026-10-28 snapshot in this issue
ss; naming it here rather than guessing.Bottom line for Drew's review
Six of our own services are straightforward socket-activate candidates via a LISTEN_FDS shim (pm-aggregator, pm-projector, pm-dispatch, ready-for-agent, mcpx, opencode-route-proxy) — no proxyd needed. The genuinely judgment-call cases are exactly the ones the packet flagged: the Docker apps + Postgres (skip recommended; proxyd possible but weak) and the upstream opencode server (proxyd or nothing). No implementation issues filed — that waits on this review, per the hard stop.
dezren39 commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
dezren39 commentedon Nov 3, 2026
🤖 Agent note · triaged → escalated (Drew's review is the gate)
bf419306)ses_e5e5e1353ceffeJh7tpGId1sUg· queue task 7750 (repo-health-code-pilot)origin/maind3476bce7(laptop clone fast-forwarded) and the live user systemd on amd-6Delta since the 2026-11-01 inventory
bin/proxies. PR feat(proxies): socket-activate clef-proxy and codex-proxy (#1821) #4845 (merged 2026-11-03T11:16:48Z, mergeb910a59) addedsystemd.user.sockets.clef-proxy(home/common/default.nix:509) andsystemd.user.sockets.codex-proxy(:580), plus fd-3 /LISTEN_FDSsupport in both.mjsentrypoints. The flake now has three socket units total: openchamber + these two. The other fivebin/proxies (claude-code, commandcode, design-code, muse, antigravity-direct) still bind their own ports; bin/ proxies: systemd socket activation so restarts never refuse connections #1821 stays open for them and for the authorized post-merge host switch.systemctl --user status clef-proxy.socket codex-proxy.socket→ both "could not be found", andsockets.target.wants/still holds onlyopenchamber.socket. Live census today: one TCP user socket (openchamber.socket127.0.0.1:3000). That is bin/ proxies: systemd socket activation so restarts never refuse connections #1821's parked post-merge step, not a new blocker for this audit.5ec2fc6dd(2026-11-02, fix(pm-stack): ready-for-agent binds 0.0.0.0:6056 while the rest of the stack binds loopback+tailnet - align bind scopes #1181) gave ready-for-agent a socket-activated tailnet entry:systemd.user.sockets.ready-for-agent-tailnet→systemd-socket-proxyd 127.0.0.1:6056(nixos/services/pm-apps/default.nix:150-168). The inventory's line "zero hits for socket-proxyd anywhere in the flake" is therefore stale — the fleet already ships one proxyd instance, in front of a tailnet forward. The loopback listener itself is still direct-bound, so ready-for-agent's verdict is unchanged:LISTEN_FDSshim for the app, proxyd only for the tailnet door.proxy-port.testsite-count drift) — unrelated to this audit.Rows that need your ruling (unchanged from the inventory)
Socket-activate via a
LISTEN_FDSshim — our own code, no upstream blocker: pm-aggregator :4870, pm-projector :7801, pm-dispatch :4879, ready-for-agent :6056, mcpx :34005, opencode-route-proxy :8443.Your call specifically:
Approve/deny per row and I file one implementation issue per approved row. Until then this issue stays open with nothing queued.