Repository navigation
Description
Origin
Follow-up to #437 (closed by Drew's decision, 2026-10-28): fixed ports + port-file publication is the standing design for the four bin/ proxies, AND option (e) from that issue — systemd socket activation — is approved.
What
Today each proxy (clef 18742, agy 18743, codex 18744, antigravity-ls 18745) binds its own port. When the service restarts or crash-loops, anything connecting in that window is refused, and a previous instance still holding the port crash-loops the new one.
With socket activation, systemd owns the listener from boot and hands the socket to the service: connections queue instead of being refused while the service restarts, and the port can never be double-bound. OpenChamber already works this way (systemd.user.sockets.openchamber, home/common/default.nix) — this extends the proven pattern.
Scope
- One
systemd.user.socketsunit per proxy, holding its existing fixed port (ports do not change — Local proxy discovery: port files, sockets, or a registry instead of fixed ports? #437 KEEP ruling). - Each proxy's
.mjsaccepts the handed-off socket (LISTEN_FDSprotocol,server.listen({ fd: 3 })) and still binds the port itself when launched outside systemd, so manual runs keep working. - Services become socket-activated (no longer need to bind on start).
Acceptance criteria
- Socket units + service changes land in the flake and evaluate in the
amdhost config. - After the NixOS switch on the laptop: restarting a proxy service mid-flight no longer refuses a client connection (it queues and completes once the service is back) — demonstrated for at least one proxy.
- Launching a proxy by hand (no systemd) still works exactly as today.
- A still-running previous instance can no longer crash-loop its replacement on the port.
Activity
developing-today commentedon Oct 28, 2026
CODE-752
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 approved socket activation (option (e)) for the
bin/proxies on #437 on 2026-10-28, but this issue was never queued — no task row existed.Remediation (2026-10-31): enqueued into repo-health-code-pilot as task 4719 (small_fix, priority 50, queued, attempts 0/3), verified by direct queue read; queue signal refreshed. Ports stay fixed per the #437 KEEP ruling.
33 remaining items
dezren39 commentedon Nov 3, 2026
🤖 Agent note · picked up
c29174f1-48e0-4b13-b4ff-9b73ab67e9ab)ses_e5e5ca52ecdffes8V8re6F4z2i· queue task 4719b910a59b); no competing open PR. Host switch/restart verification remains outside task scope and is not authorized by this claim.dezren39 commentedon Nov 3, 2026
🤖 Agent note · parked
c29174f1-48e0-4b13-b4ff-9b73ab67e9ab)ses_e5e5ca52ecdffes8V8re6F4z2i· queue task 4719b910a59b); bin/ proxies: systemd socket activation so restarts never refuse connections #1821 remains OPEN for the separately authorized host verification.dezren39 commentedon Nov 4, 2026
🤖 Agent note · parked
b910a59b0316257b46c8575640a0e5fba5d92e74, 2026-11-03T11:16:48Z); issue bin/ proxies: systemd socket activation so restarts never refuse connections #1821 still OPEN; issue Audit: socket activation as the default pattern for laptop services #1822 still OPEN withuser/escalated(pending Drew review — no scope expansion). No competing open PR.dezren39 commentedon Nov 4, 2026
agent-note:v1 — task 4719 parked again (lane code-n, 2026-11-04T10:31Z).
Fresh verification: PR #4845 is MERGED (
b910a59b0316257b46c8575640a0e5fba5d92e74); issue #1821 remains OPEN. The only remaining step is the amd host switch/restart verification for the clef + codex proxies, which the task packet places behind separate explicit authorization — no such authorization has been recorded, so task 4719 is parked 6h with that resume condition (third park for this gate; prior parks 2026-11-03T21:46Z and 2026-11-04T03:48Z).dezren39 commentedon Nov 4, 2026
Verified on amd — closing. The amd host switch landed this morning (2026-11-04, generation nixos-system-amd-26.11.20261102.f9887a8), which deployed PR #4845's socket units via home-manager. The switch alone left the sockets enabled-but-inactive (the same sd-switch limitation that left the new opencode unit unstarted), with the proxies still holding their ports directly from boot. That last step is now done and verified for both proxies:
systemctl restartof the service also returned 200 — the connection was held by the socket, never refused.All four units (both sockets, both services) are active. Restarts no longer refuse connections, as designed. Queue task 4719 is completed with this evidence; the earlier parks were only waiting on the host switch authorization, which Drew granted this morning.