8000 fix(minimal): a dashboard destroy and the prepare_attach undo retire a host_ip box with retries, and by minimal-foundry[bot] · Pull Request #3361 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimal): a dashboard destroy and the prepare_attach undo retire a host_ip box with retries, and - #3361

Merged
norrietaylor merged 1 commit into
mainfrom
agent/3352-a-dashboard-destroy-and-the-prepare-attach-undo
Nov 13, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
agent/3352-a-dashboard-destroy-and-the-prepare-attach-undo

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

Defect

Fixes #3352

Task marker
### D2989 — A dashboard destroy and the prepare_attach undo retire a host_ip box with retries, and the re-admit logs its info line
  kind: task
  size: S
  est: 25 code, 120 tests
  executor: agent
  defect: bug
  epic: 1437
  layers:
    - dash:
      - crates/minimal/src/dash/rpc.rs: settle_destroyed_box and the prepare_attach undo call crate::retire_host_ip_box_with_vm_host, and the re-admit of a live session logs the admitted info line
      test: cargo test -p minimal tui_destroy_retires_a_host_ip_box_after_a_lost_exchange
      test: cargo test -p minimal dashboard_attach_retires_a_gone_host_ip_box_after_a_lost_exchange
  proof: When the first retire exchange of a dashboard destroy fails, the VM host daemon gets a second retire, and the gone box's rules leave the cohort union.

Proof

When the first retire exchange of a dashboard destroy, or of the dashboard attach's undo for a gone box, fails, the VM host daemon gets a second retire. The two new tests in crates/ 8000 minimal/src/dash/rpc.rs show this with a stand-in daemon that drops the first retire and counts two.

Notes from the agent: settle_destroyed_box and the prepare_attach undo now call crate::retire_host_ip_box_with_vm_host. A re-admit that finds the session still live logs the same info line as min session attach. No test pins that log line, because the crate has no log-capture helper and no test line asks for one. The dash::rpc tests (16) pass and cargo clippy -p minimal --all-targets is clean. The test module has its own copy of the stand-in fake_vm_host_dropping_retires, because the copy in cmd/boxes/vm_host.rs is private to that test module and outside the layers.

Tests

line exit tail
cargo test -p minimal tui_destroy_retires_a_host_ip_box_after_a_lost_exchange 0 c::tests::tui_destroy_retires_a_host_ip_box_after_a_lost_exchange ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 941 filtered out; finished in 0.10s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 33 filtered out; finished in 0.00s running 0 test
cargo test -p minimal dashboard_attach_retires_a_gone_host_ip_box_after_a_lost_exchange 0 running 1 test test dash::rpc::tests::dashboard_attach_retires_a_gone_host_ip_box_after_a_lost_exchange ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 941 filtered out; finished in 0.14s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 33 filtered

Verify

min task run agent-verify exited 100, so this PR is a draft.

 {
                "parent_span_id": "edbd88260c2b85be",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "90528794006996cf",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "90528794006996cf",
                "queued_behind": "0",
                "span_id": "834905344960c36d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "edbd88260c2b85be",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "0c36873341ff8fe1",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "0c36873341ff8fe1",
                "queued_behind": "0",
                "span_id": "14f36f5c69121111",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "0c36873341ff8fe1",
                "queued_behind": "0",
                "span_id": "a748c659a287de97",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "a748c659a287de97",
                "span_id": "7314f43dd551462b",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "a748c659a287de97",
                "queued_behind": "0",
                "span_id": "b1a552813479cc4f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  65.343s] 1101 tests run: 1100 passed, 1 failed, 2 skipped
        FAIL [   2.890s] (1101/1101) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

The dashboard's destroy and the undo of its attach re-admit sent the
host_ip retire once, so a lost exchange left a gone box's rules in the
gate's union. Both now retire through retire_host_ip_box_with_vm_host,
as min session destroy and attach do. A re-admit of a live session logs
the admitted info line.
@coderabbitai
coderabbitai Bot commented Nov 12, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1a202d5f-7dc7-4209-a6ed-0b4b63a51da5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@norrietaylor
Copy link
Copy Markdown
Member

/revise make min task run agent-verify pass: it exited 100 on this head (1fdb6630), so this PR is a draft.

Evidence: the PR body's verify section says one of 1101 tests failed ("1101 tests run: 1100 passed, 1 failed, 2 skipped", "Cancelling due to test failure"). The tail is cut off before the failing test's name. Both of this task's own test: lines passed, and GitHub CI is green on every lane.

Do:

  1. Run the verify, and name the test that failed.
  2. If this change causes the failure, fix the cause. Do not weaken, skip or narrow the test.
  3. If the failure is not this change's (it fails the same way on main at this PR's base, or it is a timing flake), change no file. Say which test it is and give the evidence in your final message.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note: the coder changed nothing. I did not reproduce the verify failure. I ran the gate's test step (cargo nextest run --locked -p minimal) five times at 1fdb663 in a worktree, and once at the current head 14d50502 (1fdb663 merged with origin/main). Every run passed: 1101/1101 at 1fdb663 and 1115/1115 at 14d50502. The directive's evidence cuts off before the test name, so I cannot name the test that failed. The two new tests use no sleeps or wall-clock waits. The retire retry has a 100 ms backoff inside a BOX_CONTROL_TIMEOUT deadline, and the fake daemon answers at once. I conclude that the failure was a timing flake elsewhere in the minimal crate's suite, and not a failure that this change causes. I changed no file. I did not run fmt, clippy or the quality gate parts of agent-verify. The PR body reports only a test failure.

@norrietaylor
norrietaylor marked this pull request as ready for review November 13, 2026 05:52
@norrietaylor
norrietaylor requested a review from a team as a code owner November 13, 2026 05:52
@minimal-foundry
minimal-foundry Bot commented Nov 13, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: no findings at 1fdb6630496c.

Nothing to do.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none seen.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS · the full ruling

The change conforms to UC5 (line 107) and §5.5 (line 184). A dashboard destroy and the prepare_attach undo now retire a host_ip box through crate::retire_host_ip_box_with_vm_host, which retries. Thus one lost exchange does not leave a gone box's rules in the gate's union. The dashboard path now matches min session attach and min session destroy, as the #3368 ruling requires. The new info line goes to dash.log, not to the terminal. The failed verify test is in otel_cli.rs and does not reach this code. The merge gate must settle it.

Ruled at 1fdb663 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 13, 2026
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 1fdb6630496c against D2989's plan block. settle_destroyed_box and the prepare_attach undo now call retire_host_ip_box_with_vm_host, the retrying path min session destroy uses, so one lost exchange no longer leaves a gone box's rules in the gate's union (NET-085). A lookup error in the undo still does nothing, as before, and a live session logs the admitted line, as the block asks. Both tests use a stand-in daemon that drops the first retire's connection, and both assert a second retire arrives. The only file changed is the one layer the task names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

D2989 — A dashboard destroy and the prepare_attach undo retire a host_ip box with retries, and the re-admit logs its info line

1 participant

0