Skip to content

fix(minimal): every rename of a running host_ip box moves only its name hold and keeps its VM-host - #3395

Merged
norrietaylor merged 1 commit into
mainfrom
agent/3384-every-rename-of-a-running-host-ip-box-moves-only
Nov 13, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
agent/3384-every-rename-of-a-running-host-ip-box-moves-only

Conversation

@minimal-foundry

Copy link
Copy Markdown
Contributor

Defect

Fixes #3384

Task marker
### D3011 — Every rename of a running host_ip box moves only its name hold and keeps its VM-host egress rules
  kind: task
  size: S
  est: 20 code, 60 tests
  executor: agent
  defect: bug
  epic: 2879
  layers:
    - rename:
      - crates/minimal/src/dash/rpc.rs: rename calls crate::rename_box_with_vm_host in place of its own hold moves, so the dashboard also withdraws the old name by id and retires nothing
      - crates/minimal/src/cmd/boxes/vm_host.rs: keeps move_held_box_name free of any retire, and adds a test that the dashboard rename of a host_ip box sends no retire
      test: cargo test -p minimal a_rename_retires_nothing_and_a_stop_retires_as_stopped
      test: cargo test -p minimal dashboard_rename_of_host_ip_box_retires_nothing
  proof: After min box rename, min session rename or the dashboard rename of a running host_ip box, the VM host daemon gets no retire request and the box keeps its egress rules.

Proof

min box rename, min session rename and the dashboard rename of a running host_ip box now all go through rename_box_with_vm_host. The VM host daemon gets a withdraw of the old name by the box's id, a release of the old name and a hold of the new name. It gets no retire request, so the box keeps its egress rules.

Notes from the agent: move_held_box_name already sent no retire at the branch head, so vm_host.rs gets only the new test. The new test calls rename_box_with_vm_host over control_sock_beside(ssh socket), which is the exact call dash::rpc::rename now makes. It does not drive dash::rpc::rename itself, because that needs a live daemon client. cargo clippy -p minimal --all-targets is clean.

Tests

line exit tail
cargo test -p minimal a_rename_retires_nothing_and_a_stop_retires_as_stopped 0 st::tests::a_rename_retires_nothing_and_a_stop_retires_as_stopped ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 958 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 34 filtered out; finished in 0.00s running 0 test
cargo test -p minimal dashboard_rename_of_host_ip_box_retires_nothing 0 running 1 test test cmd::box_verbs::vm_host::tests::dashboard_rename_of_host_ip_box_retires_nothing ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 958 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 34 filtered out;

Verify

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

 {
                "parent_span_id": "5e7d5b91dd71dbf0",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "5df83d4532bbf7f2",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "5df83d4532bbf7f2",
                "queued_behind": "0",
                "span_id": "6b7a0fde6589949d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "5e7d5b91dd71dbf0",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "6c91569c8d522879",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "6c91569c8d522879",
                "queued_behind": "0",
                "span_id": "09bd24841853065d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "6c91569c8d522879",
                "queued_behind": "0",
                "span_id": "79c431d0e712fe05",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "79c431d0e712fe05",
                "span_id": "d54e0e8931cb08b4",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "79c431d0e712fe05",
                "queued_behind": "0",
                "span_id": "52fe1263ceb114ee",
                "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 [  68.034s] 1119 tests run: 1118 passed, 1 failed, 2 skipped
        FAIL [   2.968s] (1119/1119) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

The dashboard rename moved the name holds itself and did not withdraw the
old name by the box's id. It now calls rename_box_with_vm_host, the move
that min session rename and min box rename make. A test pins that this
move sends no retire to the VM host daemon.
@coderabbitai

coderabbitai Bot commented Nov 13, 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: 8345372a-e68a-444a-9e50-eda36c62aa7b

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

@minimal-foundry

minimal-foundry Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: no findings at 4aafcbc7e510.

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-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 against D3011 at 4aafcbc7. dash::rpc::rename now calls crate::rename_box_with_vm_host, the path min box rename and min session rename already take, so a running host_ip box's old name is withdrawn by its id, its hold moves, and nothing is retired: the box keeps its egress rules. dashboard_rename_of_host_ip_box_retires_nothing asserts withdraw, release and hold and no retire. It drives the shared helper rather than dash::rpc::rename, as the plan places it. Arch: PASS against arch 15b603e6, no conditions.

@norrietaylor
norrietaylor added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 865e85e Nov 13, 2026
39 checks passed
@norrietaylor
norrietaylor deleted the agent/3384-every-rename-of-a-running-host-ip-box-moves-only branch November 13, 2026 16:21
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.

D3011 — Every rename of a running host_ip box moves only its name hold and keeps its VM-host egress rules

1 participant