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.89 remaining items
dezren39 commentedon Nov 17, 2026
agent-note:v1
state: blocked (escalated-to-user - escalation now DELIVERED via a new ledger entry)
task 18140 (repo-health-code-pilot, lane code-e)
Bulk-intake triage, 2026-11-17.
Fresh state checked this run: issue #1822 is OPEN, labels include user/escalated, status/blocked, queue/claimed, kind/infrastructure, priority/normal, effort/s. No held, user/owned, do-not-merge, or do-not-auto-edit label.
State of the work, from the record on this issue (task 15848, 2026-11-16, three lanes concurring): slice 1 merged (PR #9718) - socket units exist, deliberately not in sockets.target. Slice 2 has no code, and the wiring assumption behind it was experimentally disproved on the deployed Bun v1.4.4 (Bun.serve ignores an fd option; node:http listen({fd}) accepts but never answers), so slice 2 needs a real LISTEN_FDS shim design. The decision the work waits on is unchanged: (a) a dedicated live-ops session/window owning slices 2-4 end to end, or (b) authorisation to split the epic into lane-sized code-only tasks (per-service LISTEN_FDS shim + unit tests, no live switch), the live switch kept as its own gated task.
Delivery gap found and fixed in this pass: that (a)/(b) gate was escalated on 2026-11-16 by label and block stamps only. Searched this run, no pending-decisions ledger item existed for this gate (the only #1822 item, per-service-inventory-1822, is the earlier AC3 inventory approval, already answered). Per the fleet's own rule, an escalation is a delivered ask and the ledger is the record - so this pass created the entry: pending-decisions item socket-activation-window-1822 (status pending), carrying the one decision, its context, and both options. Task 18140 blocks as escalated-to-user naming that item. The queue-side churn that kept undoing task 15848's blocks is a separate defect, already filed separately per the 2026-11-16 notes; it is not re-filed here.
dezren39 commentedon Nov 22, 2026
Decided: Split socket activation into code-only service slices; start with the independent mcpx fd-3 listener slice and leave live switch verification as a separate later step.
Why: The issue records Bun 1.4.4 ignoring passed fds and the Go
Transport.Listenseam as independently implementable; this slice needs no Bun route choice or live laptop access.Undo: A later PR can replace the mcpx fd-3 approach if a tested systemd listener contract or service architecture requires it.
By: oc-code-08
dezren39 commentedon Nov 22, 2026
🤖 Agent note · triaged — code-only split starts with mcpx fd-3
The latest decision on this issue selects independent code-only service slices, beginning with mcpx's fd-3 listener; live switch verification remains a separate later step. Fresh inspection confirms already exposes and , so the mcpx slice is bounded to opt-in fd-3 adoption plus focused daemon tests. No focused issue or PR existed, and no held labels are present.
Routed the slice as #12270 and enqueued task 20977 in . It excludes socket-unit enablement and live host changes. The existing broad task 15848 remains untouched (it is still claimed).
Triage verdict: triaged; implementation routed to #12270 / task 20977. #1822 remains open for the remaining service slices and the separate live verification/accounting.
dezren39 commentedon Nov 22, 2026
Correction to my preceding note: shell quoting stripped inline code spans, but the intended paths and identifiers are
pkgs/mcpx/internal/daemon/transport.go,Transport.Listen,tcpTransport.Listen, andrepo-health-code-pilot. The routing remains issue #12270 / task 20977.dezren39 commentedon Nov 22, 2026
🤖 Agent note · parked — task 15848 stays on the parent audit
The approved split routes the mcpx fd-3 code-only slice to dedicated issue #12270 / task 20977. Parked the broader #1822 task for 24 hours while that separately scoped item runs; remaining service slices, live switch verification, and closing accounting remain in #1822. No live NixOS changes are included in this slice.
dezren39 commentedon Nov 23, 2026
🤖 Agent note · picked up
queue/15848-1822-socket-unitsandorigin/queue/15848-mcpx-listen-fdexist and must be reconciled before changes.dezren39 commentedon Nov 23, 2026
🤖 Agent note · picked up
dezren39 commentedon Nov 23, 2026
🤖 Agent note · slice PR opened
dezren39 commentedon Nov 23, 2026
🤖 Agent note · parked — PR #12887 review follow-up pushed
f3e99c2413baddsprojectorSocketActivation(default false) so the current public bind remains on 7801 while disabled; enabling the socket also switches the service backend to 17801.nixfmt --checkandgit diff --checkpass.dezren39 commentedon Nov 23, 2026
Correction to my prior note: the queue rejected my checkpoint/park because task 15848 had moved to
agent-next-06;repo-queue list --task 15848still reportsclaimed. I cannot change another worker’s claim. I sent that worker the PR #12887 update and asked them not to duplicate the slice and to park/reconcile the task. Thequeue/claimedlabel remains accurate; my earlier “parked” wording described my intended handoff, not the broker state.