refactor(daemon): remove unused source-label socket API (closes #21) - #23
Conversation
Tier 5 / D3 decided: remove (no agents/harness.py adoption planned). Deletes acquire_listen_socket + try_launchd_socket / try_systemd_socket / bind_dev_socket and their test module — test-only code with zero production callers. The D69-guarded acquire_listening_socket (used by daemon/main.py) is the sole acquisition path and is unaffected: it has its own adopt_launchd_socket + live-listener guard and never used the removed helpers. Also drops the now-unused `import ctypes.util` and the ponytail deferral marker added in #22. Verification: py_compile + import OK; zero dangling refs to the removed symbols; production acquire_listening_socket intact. pytest not run locally (no env) — CI gate. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughRemoves the alternate ChangesSocket Activation API Replacement
Sequence Diagram(s)sequenceDiagram
participant Caller
participant acquire_listening_socket
participant adopt_launchd_socket
participant _socket_path_has_live_listener
Caller->>acquire_listening_socket: sock_path, launchd_name
acquire_listening_socket->>adopt_launchd_socket: launchd_name (macOS only)
alt launchd fd available
adopt_launchd_socket-->>acquire_listening_socket: [fd, ...]
acquire_listening_socket-->>Caller: (socket, owns_node=False)
else LISTEN_FDS set (systemd)
acquire_listening_socket-->>Caller: (socket from fd 3, owns_node=False)
else dev fallback
acquire_listening_socket->>_socket_path_has_live_listener: sock_path
alt live listener detected
_socket_path_has_live_listener-->>acquire_listening_socket: True
acquire_listening_socket-->>Caller: SystemExit
else no live listener
_socket_path_has_live_listener-->>acquire_listening_socket: False
acquire_listening_socket-->>Caller: (bound socket, owns_node=True)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Resolves #21 (Tier 5 / D3) with the remove decision — no
agents/harness.pyadoption planned.Removed (test-only, zero production callers)
acquire_listen_socket+ helperstry_launchd_socket/try_systemd_socket/bind_dev_sockettests/test_daemon/test_socket_activation.py(exercised only the above)import ctypes.util; the ponytail deferral marker from chore(daemon): record D3 socket-API deferral with a ponytail marker (#21) #22Unaffected
acquire_listening_socket(used bydaemon/main.py) — it has its ownadopt_launchd_socket+ D69 live-listener guard and never called the removed helpers. Its tests live intest_accept_loop.py.Verification
__all__reduced to the 3 production symbols.Closes #21.
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Refactor
Improvements
Tests