Repository navigation
fix(minimald): leave the host_ip QUIC cohort when a box's shell exits on its own (T64) - #2570
Conversation
A host_ip box whose shell exits on its own ends its host loop with no Stop, so it stayed a cohort member and kept the cohort's UDP 443 block in place. launch_host now wraps the loop's handle in a watcher. When the loop ends, the box leaves the cohort, and the other members move home when it was the last blocker. An info line names the box and the members that still block. A launch number taken before each join keeps a replaced host's late loop end from removing a later launch's membership. An abort of the watched handle still aborts the loop.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: every review thread resolved at @norrietaylor resolved the last thread, which releases the approval this review had withheld. Nothing to do. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The exit-path departure conforms to §5.3 line 150. A box whose shell exits on its own is no longer a resident member, and the cohort's block lifts only when no blocker is left. The new log line is also emitted on every Stop and Destroy of a host_ip member. kill_and_stop_loop awaits the watched handle, and the watcher departs while the launch number is still current. So the log says that the shell exited on its own when a Stop ended it. Make the change in C1: retire the launch number before the kill, and keep the departure after it. Then the change conforms.
Ruled at fee4db0 against gominimal/arch@109541a48c31 by claude-opus-5-5.
The watcher resumed a panic from the host loop before it left the cohort, so a blocking member kept UDP 443 blocked until a Stop. It now leaves first and then resumes the unwind.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 3 unresolved threads — minimal-foundry[bot] crates/minimald/src/box_actor/host.rs, minimal-arch[bot] crates/minimald/src/box_actor/host.rs:621, minimal-arch[bot] crates/minimald/src/box_actor/host.rs:168. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to Networking §5.3 line 150. A host_ip box whose shell exits on its own leaves the cohort through the same depart call as a Stop. The cohort lifts the block only when no resident member blocks. At this head the box also leaves when its host loop panics, and the box's own pids stay in the blocked leaf. No condition is open.
Ruled at 99971d9 against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Review threads the coder judged:
A host_ip cohort whose only blocked member's shell exits on its own sends UDP 443 again without a Stop or destroy. The same now holds when that member's host loop panics: the box leaves the cohort before the panic reaches the watched handle. Notes from the agent: Revise round 1: watch_quic443_exit now calls exit_quic443_launch before it resumes a panic. The test gains a case where the loop panics and the block lifts. The doc comment on watch_quic443_exit says an aborted loop leaves nothing, but the code calls exit_quic443_launch on every outcome. The launch number keeps that safe. This round did not change that behaviour. |
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of 99971d931de5 withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter approval at 99971d9: every merge gate passes at this head (arch PASS at 99971d9, zero open threads, every lane aggregator green). Squash title fix(minimald): leave the host_ip QUIC cohort when a box's shell exits on its own (T64) and the squashed message pass commitlint. Queued for squash merge.
Generated by Claude Code
T64 — Leave the host_ip QUIC cohort when a box's shell exits on its own
slice: S9
kind: task
covers: BEP-018
size: S
est: 40 code, 80 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: the daemon log tail carries one line when a box whose shell exited on its own leaves the cohort, naming the box and the members still blocking
observability: one info log line per departure through the exit path, with the blocking members left
layers:
- lifecycle:
- crates/minimald/src/box_actor/host.rs: the path that observes the host process's exit calls
leave_quic443_cohortthe waystop_runningdoes, so a box whose shell exits on its own stops blocking the cohort and the remaining members move home when the last blocker goestest: cargo nextest run -p minimald host_ip_cohort_shell_exit_leaves_and_lifts_the_block
produces: none
consumes: none
proof: A host_ip cohort whose only blocked member's shell exits on its own sends UDP 443 again without a Stop or destroy.
depends on:
- blocked by T53
Generated by Claude Code
Proof
A host_ip box with a blocked quic443 stance whose shell exits on its own now leaves the cohort when its host loop ends. When it was the only blocking member, the other members' processes move out of the blocked leaf and send UDP 443 again, with no Stop or destroy. The new test drives this over a stand-in cgroup tree, and the daemon log gets one info line that names the box and the members that still block.
Notes from the agent: The host loop that sees the process exit is in box_runtime.rs, outside the layers. So host.rs observes the exit at the loop's JoinHandle: launch_host wraps the handle of each host_ip member in a watcher task (watch_quic443_exit). When the loop ends by itself, the watcher calls leave_quic443_cohort, the same call stop_running makes. An abort of the watched handle aborts the loop through a drop guard, so the abort semantics of stop_running and mint_session_host do not change. A per-box launch number (Quic443Launches, a static in host.rs) is taken before each join. With it, a replaced host whose loop ends late, after kill_and_stop_loop detaches it on timeout, cannot remove a later launch's membership and lift its block. stop_running and the failed-join path now call stop_quic443_launch, which clears the number and departs. The two earlier cohort tests also pass. I did not run just ci, clippy-strict or the whole crate suite. cargo clippy -p minimald --all-targets shows no warning in host.rs.
Tests
cargo nextest run -p minimald host_ip_cohort_shell_exit_leaves_and_lifts_the_blockVerify
min task run agent-verifyexited 101 under rustc 1.98.1, which the repository does not pin (1.97.0 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Closes #2556