Repository navigation
T136 — A failed retire is retried, and a resumed host-address box is admitted again - #2964
Conversation
A host_ip box whose retire exchange with the VM host daemon fails is retired again, three times with a doubling backoff, so it leaves the gate's union. Each failed attempt is a warn line with its number. An attach that admits a resumed host_ip box again logs an info line naming the box (NET-085).
…etire-is-retried-and-a-resumed-host-ad
|
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: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The retry and the re-admit conform to §4.3 rule 2 (line 84): the cohort is evaluated against each live host_ip box's rules. The destroy path in release_held_box_name() still sends one retire. The PR notes name this gap but file no issue for it. A lost retire there leaves a destroyed box's rules in the union. File the issue and link it from the PR body, as C1 says. No code change is required.
Ruled at a051040 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
The info line ran on every attach and exec, and also when the session lookup failed, so it claimed a resume that did not happen. It now logs only when the session is still there, and it says admitted.
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The retry on the residency drop and the re-admit before attach agree with §4.3 rule 2 and §5.5. The info-line change since the last head is more exact, and the earlier ruling stands. Three retires in vm_host.rs still send one exchange only: destroy, post-attach and the re-admit undo. A lost retire there leaves a box that is gone in the cohort union, against §5.5 line 183. C1 routes them through retire_host_ip_box_retrying, or files the residual as an issue in the PR body.
Ruled at bb6fc5b against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Review threads the coder judged:
After a VM host daemon restart, an attach or exec into a host_ip box admits its egress rules again before it runs. A HostIpResidency retire that fails is sent again three times with a doubling backoff, so that box leaves the gate's union. The info line for an admit now prints only when the session is still there, and it no longer claims a resume. Notes from the agent: Revise round 1. Thread PRRT_kwDOPdfcxM6zZA5B: the destroy path (release_held_box_name) still sends one retire with no retry. The finding asks for an issue and a link in the PR body. This round cannot file issues or edit the PR body, so a person must file it. A retry on that path also changes how a destroy behaves against a VM host daemon that does not answer the retire verb, so it needs its own task. cargo clippy -p minimal --all-targets reported no warnings. |
|
/revise Clear arch-review's C1 and the MEDIUM thread on
Pin both in tests beside |
The destroy, the release after an attach and the re-admit undo now retire through the retries, off the async worker. All the attempts of one retire end at one deadline, so a hung VM host daemon costs one control timeout in total. A retire given up on is a warn line.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 4 unresolved threads — minimal-arch[bot] crates/minimal/src/cmd/boxes/vm_host.rs:608, minimal-foundry[bot] crates/minimal/src/cmd/boxes/vm_host.rs:385, minimal-foundry[bot] crates/minimal/src/cmd/boxes/vm_host.rs:677, minimal-arch[bot] crates/minimal/src/cmd/boxes/vm_host.rs. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
This head sends every host_ip retire in vm_host.rs through the retries, and one deadline bounds all the attempts. Section 4.3 line 84 evaluates the cohort against each live box only. So in this layer, a lost retire no longer keeps a gone box in the union. The dashboard paths in crates/minimal/src/dash/rpc.rs still send one retire, and they do not log the re-admit line. That file is outside the task's layers. File an issue for it, as C1 says, and name it in the PR body. Then the change can merge.
Ruled at ef33f53 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 2 of 10 on a /revise note, pushed as
Verify Review threads the coder judged:
After a VM host daemon restart, an attach or exec of a resumed host_ip box admits its rules again, so the box reaches what its rules allow. A host_ip box whose first retire failed is retired again. This is true on the activation drop, on destroy, after an attach that ends with the session gone, and on the re-admit undo, so the box leaves the gate's union. A hung VM host daemon holds a retire for one control timeout (5 s) in total. Notes from the agent: Round 2. The release_held_box_name, release_held_name_after_attach and re-admit undo paths now use the new retire_host_ip_box_with_vm_host. It runs retire_host_ip_box_retrying on spawn_blocking. The retry has one overall deadline, HOST_IP_RETIRE_DEADLINE = BOX_CONTROL_TIMEOUT (5 s). Each exchange runs on its own thread, so a hung exchange holds that thread and not the caller. A retire given up on logs a warn line. HostIpResidency::drop still blocks its thread, but now for 5 s at most. Outside the layers: crates/minimal/src/dash/rpc.rs (resume undo at line 354, settle_destroyed_box at line 372) still sends one retire through host_ip_box_with_vm_host. That file was not changed. It can call crate::retire_host_ip_box_with_vm_host in a follow-up, if the function is re-exported like host_ip_box_with_vm_host. The just clippy-strict gate was not run. |
|
/revise Arch C1 only, and this is a PR-description change with no code change. Add a |
|
Round 3 of 10 on a /revise note: the coder changed nothing. every commit this round put on the branch above ef33f53 is a merge of the base branch, so it carries no work of its own |
There was a problem hiding this comment.
Reviewed ef33f53b against T136's plan block. A failed retire now goes out again with a doubling backoff, all attempts share one control timeout, and each exchange runs on its own thread so a hung VM host daemon cannot hold the caller past it. Arch C1 is met: the PR description names #2989 as a residual.
|
/revise No code change unless a thread still holds. Check each of the five open threads against this head, and resolve the ones that are addressed. Arch C1 is met by the |
|
That What the platform saidcould not start the coder: Error: there is no container instance that can be provided to this durable object Nothing to type again: the command gets a rocket when its round starts, or a refusal that names the reason. No round was counted for it yet. |
|
Round 4 of 10 on a /revise note: the coder changed nothing. Revise round 4: no code change. The one open thread (PRRT_kwDOPdfcxM6zaBBF) holds on this head, but its fix is outside the task's layers. crates/minimal/src/dash/rpc.rs (settle_destroyed_box, and the prepare_attach undo near line 354) and crates/minimal/src/cmd/boxes/lifecycle.rs:596 (stop) still send one retire through host_ip_box_with_vm_host(.., None, false). A follow-up task must route them through retire_host_ip_box_with_vm_host in vm_host.rs. I have no credential to file an issue or to edit the PR body. A person must file the issue and name it in the PR body. I did not rerun the test: lines because nothing changed since round 3. Review threads the coder judged:
|
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 ef33f53b9d3d 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.
T136 — A failed retire is retried, and a resumed host-address box is admitted again
slice: S16
kind: task
covers: NET-085
size: M
est: 80 code, 130 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: the client's log carries one warn line per failed retire with the attempt number, and
min bugbundles carry the VM host daemon log, where the admit for a resumed box appearsobservability: one warn line per failed retire attempt and one info line per resumed box admitted again, each naming the box
layers:
- client:
- crates/minimal/src/cmd/boxes/vm_host.rs:
HostIpResidencyretries a retire whose exchange with the VM host daemon fails, three times with backoff;resume_box_rowadmits a resumedhost_ipbox's rules again, so a resumed box gets its egress back after a VM host daemon restarttest: cargo nextest run -p minimal failed_host_ip_retire_is_retried
test: cargo nextest run -p minimal resume_readmits_host_ip_box
produces: none
consumes: none
proof: After a VM host daemon restart, a resumed
host_ipbox reaches what its rules allow, and a box whose first retire failed leaves the gate's union.Proof
When the first retire of a host_ip box's egress fails, HostIpResidency sends it again, up to three more times with a doubling backoff from 100 ms. The box then leaves the gate's union. failed_host_ip_retire_is_retried shows two lost retires followed by one that lands. After a VM host daemon restart, an attach on a resumed host_ip box admits its own egress rules again, so the box reaches what its rules allow. resume_readmits_host_ip_box shows one admit with the record's egress against a fresh VM host daemon stand-in.
Notes from the agent: The re-admit on resume already existed on this branch. rehold_held_name_before_attach in vm_host.rs runs right after resume_box_row in attach.rs, and dash/rpc.rs prepare_attach does the same. resume_box_row itself is in crates/minimal-client/src/box_registration.rs, which is outside the layers, so I did not move the admit into it. This task adds an info line, naming the session and the box, when the admit for a resumed box lands, plus a test that pins the admit. The dashboard path in dash/rpc.rs does not log that info line, because the file is outside the layers. The retry covers HostIpResidency's drop only, as the layer note says. The destroy path, release_held_box_name through host_ip_box_with_vm_host, still sends one retire. A follow-up can route it through retire_host_ip_box_retrying. minimal_client::attach::host_ip_box_at logs its own warn line with the failure reason. So each failed attempt gives two warn lines: that one, and the new one with the attempt number. A fix needs a change in minimal-client, which is outside the layers. The retries block the dropping thread for at most 700 ms, as the single retire already blocked. I also ran
cargo nextest run -p minimal vm_host(35 passed).Residuals
crates/minimal/src/dash/rpc.rsstill retires a box once, andprepare_attachlacks the re-admit info line. Both are outside this task's layers.Tests
cargo nextest run -p minimal failed_host_ip_retire_is_retriedcargo nextest run -p minimal resume_readmits_host_ip_boxVerify
min task run agent-verifyexited 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Base
The base branch moved while the coder worked; it was merged in before the tests ran.
Closes #2930