Conversation
Code Review: PR #439 — OSC over UDP loopback testOverviewAdds an end-to-end integration test ( Code Quality & Style ✅
Correctness ✅Traced the stack through
Kernel buffering makes the single-socket bind/send/receive sequencing sound (same rationale called out in Potential Issues / Suggestions1. No 2. Hang-on-failure vs. hard failure (acknowledged tradeoff) 3. 4. Success path only Performance ✅One UDP loopback socket per test word, closed after use. No unbounded allocation. Negligible overhead for an integration test suite. Security ✅Binds only to SummarySolid PR. The implementation is correct, the comments are clear and honest about the failure-mode tradeoffs, and it fills a real gap (no prior round-trip test existed). The suggestions above are all minor. Happy to approve as-is or with the |
- osc.msg-i round-trip — test-osc-msg-i-roundtrip added (/note 60 → 16-byte ,i payload), wired into main. - Verbose discard comment — drop drop drop now annotated drop ok port host → ( bytes ) so the stack walk is self-describing.
Code Review — PR #439: OSC UDP Loopback Integration TestOverviewThis PR adds What's Good
Concerns / Suggestions1. No timeout on The comment acknowledges this explicitly:
That's a deliberate tradeoff, but it's worth noting: when 2. The stack after Minor, but the existing 3. Missing round-trip test for negative int / edge-case float
4. Comment verbosity inconsistent with sibling file
5. justfile comment is accurate but slightly redundant with the existing one The new comment says "Same dir" which implies the reader needs to connect it to the comment three lines up. If the two lines ever get separated by a future addition, "Same dir" loses its meaning. Consider making it self-contained: Stack Trace Audit —
|
| Step | Stack | Aux |
|---|---|---|
| entry | ( msg ) |
[] |
0 udp.bind drop |
( msg socket port ) |
[] |
swap |
( msg port socket ) |
[] |
dup >aux |
( msg port socket ) |
[socket] |
swap |
( msg socket port ) |
[socket] |
"127.0.0.1" swap |
( msg socket "127.0.0.1" port ) |
[socket] |
rot |
( msg "127.0.0.1" port socket ) |
[socket] |
udp.send-to drop |
( ) |
[socket] |
aux> |
( socket ) |
[] |
dup >aux |
( socket ) |
[socket] |
udp.receive-from |
( bytes host port ok ) |
[socket] |
drop drop drop |
( bytes ) |
[socket] |
aux> udp.close drop |
( bytes ) |
[] |
Logic is correct. The >aux / aux> usage for carrying the socket across the send is clean.
Summary
Approve with minor suggestions. The test is correct, covers the important code paths, and the CI-parallel-safe port binding is a nice touch. The main thing to think about is the infinite-hang risk if send fails silently — acceptable today given CI timeouts, but worth documenting as a known limitation or filing a follow-up for udp.receive-timeout.
No description provided.