Repository navigation
Conversation
e660f7f to
de4c5fc
Compare
de4c5fc to
605afdb
Compare
605afdb to
92c564b
Compare
_get_client_ip_for_server opens a UDP socket to learn which local address routes to the server. AppArmor or a sandbox can refuse to create that socket, which raised outside the existing try block. It now logs a warning and returns 127.0.0.1, as it already did when the connect failed. The bare except is narrowed to OSError. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A MORANGO_NODE_ID set in the environment overrides the node ID, so test_consistent_0_5_instance_id got a different instance ID than the one it expects. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A sandbox can deny binding to port 0, which LiveServerTestCase uses by default and get_free_tcp_port used to find a free port. get_free_tcp_port moves to the test helpers and falls back to a fixed list of ports when port 0 is denied. A new FreePortLiveServerTestCase picks its port with it in setUpClass, so each class gets a port that is free when its server starts. The client test cases now extend it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
92c564b to
9cc2ca5
Compare
🟡 Waiting for changesOutcome: skipped — no new commits since Last updated: 2026-11-06 00:39 UTC |
rtibblesbot
left a comment
There was a problem hiding this comment.
PR #411: the narrowed IP-probe fallback and explicit live-server ports look correct. CI is passing.
- suggestion: the two new fallback branches in
_get_client_ip_for_serverhave no tests (inline). - nitpick:
get_free_tcp_portleaks a socket per failed bind (inline).
Next step: This is a low-risk change; it needs a light-touch code review by a human engineer.
Written by rtibblesbot, an LLM-based coding agent.
The socket was only closed after a successful bind, so each port the sandbox refused left a socket open until garbage collection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers both paths that return 127.0.0.1: when the UDP socket can't be created, and when connect raises OSError, UnicodeError or OverflowError. The second also checks that the socket is closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rtibblesbot
left a comment
There was a problem hiding this comment.
PR #411: both prior findings resolved. No new findings. CI still pending.
Prior-finding status
RESOLVED — morango/sync/syncsession.py:71 — no test covers _get_client_ip_for_server fallbacks
RESOLVED — tests/testapp/tests/helpers.py — failed bind leaks open socket
Next step: Needs a full code review by a human engineer.
- Confirm falling back to
127.0.0.1in_get_client_ip_for_serverwhen the probe is denied is acceptable for real sync sessions, not just sandboxed tests.
Written by rtibblesbot, an LLM-based coding agent.
Summary
_get_client_ip_for_serverto be more tolerant of sandboxing by handling specific socket establishment errors separately from connection errors to retrieve the addressget_free_tcp_portto be tolerant of failures using port0for automatic free port assignmenttest_consistent_0_5_instance_idto override environment variables since the test must assert thatMORANGO_NODE_IDdoes not influence the resulting IDReviewer guidance
nono?Necessary config for ports
AI usage
Claude and I debugged these issues within my sandboxed agent session using nono, while working on #410 . Most of the changes were clear to me, so I made them initially, then let Claude ensure that the changes were robust. Then had Claude handle the review feedback, which we should have caught earlier.