Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1850d90
feat(minvmd): control socket registers a box and hands its addresses
minimal-foundry[bot] Oct 1, 2026
93248d7
feat(minimal): activate registers an own-address box with the VM host
minimal-foundry[bot] Oct 1, 2026
fed4b2f
feat(minimald): attach an own-address box at its handed address
minimal-foundry[bot] Oct 1, 2026
86d4ca3
style: rustfmt the box-registration layers
minimal-foundry[bot] Oct 1, 2026
2be91e7
style: satisfy the strict clippy gate on the registration layers
minimal-foundry[bot] Oct 1, 2026
5cb14db
Merge remote-tracking branch 'origin/main' into agent/1711-register-a…
minimal-foundry[bot] Oct 1, 2026
4cff856
feat(minimald): the coder's uncommitted work as it stood when its 720…
minimal-foundry[bot] Oct 1, 2026
fc3341a
Merge remote-tracking branch 'origin/main' into agent/1711-register-a…
minimal-foundry[bot] Oct 1, 2026
c797826
fix(minimald,minvmd): split the PTask run between the two allocators
minimal-foundry[bot] Oct 1, 2026
d662268
fix(minimal): warn that an unregistered box runs unattributed
minimal-foundry[bot] Oct 1, 2026
a0e0f96
style(minimald,minvmd): take the reserve length with div_ceil
minimal-foundry[bot] Oct 1, 2026
d7491c0
fix(minimald): release a handed lease when its attach ends
minimal-foundry[bot] Oct 1, 2026
078e69e
style(minimald): use expect for the reserved mutex in abandon
minimal-foundry[bot] Oct 1, 2026
7a0a132
Merge remote-tracking branch 'origin/main' into agent/1711-register-a…
minimal-foundry[bot] Oct 1, 2026
fb36cef
fix(minvmd): pass box_addresses in the vm-escape session config
minimal-foundry[bot] Oct 1, 2026
d0d7c1b
fix(minimald): release every lease with its attach
minimal-foundry[bot] Oct 1, 2026
688b0bc
Merge remote-tracking branch 'origin/main' into agent/1711-register-a…
minimal-foundry[bot] Oct 1, 2026
cf02a4a
feat(minvmd,minimald-rpc): add the withdraw verb to box control
minimal-foundry[bot] Oct 1, 2026
692ebe5
feat(minimal): withdraw the box's row on destroy and failure
minimal-foundry[bot] Oct 1, 2026
ef485da
style(minimal,minvmd): cargo fmt the withdraw changes
minimal-foundry[bot] Oct 1, 2026
142148e
fix(minvmd): silence the strict gate's poison-guard expect
minimal-foundry[bot] Oct 1, 2026
dbc7482
docs(minimald-rpc,minvmd): sharpen the verb-tag corner and the reques…
minimal-foundry[bot] Oct 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/minimal-tui/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ pub async fn activate(
project_path: project_path.clone(),
network,
policy: SessionPolicy::default(),
box_addresses: None,
// Same default as an activate with no flags: the dashboard
// has no `--no-hooks` of its own, and a session created here
// is attachable later like any other.
Expand Down
1 change: 1 addition & 0 deletions crates/minimal-tui/tests/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ fn record(name: Option<&str>, network: NetworkMode) -> sessions::Record {
project_path: paths::HostAbsPath::try_new("/src/api").unwrap(),
network,
policy: sessions::SessionPolicy::default(),
box_addresses: None,
status: sessions::SessionStatus::Active,
hooks_enabled: true,
attrs: Default::default(),
Expand Down
21 changes: 21 additions & 0 deletions crates/minimal/src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ mod net;
mod project;
mod session;

// The Ctrl-C cleanup (`arm_activation_interrupt`) withdraws the row the
// activation registered with the VM host daemon; the withdrawal lives with
// the session commands.
use session::{vm_host_control_sock, withdraw_box_row};

pub use admin::*;
pub use list::*;
pub use net::*;
Expand Down Expand Up @@ -663,6 +668,9 @@ pub(crate) fn arm_activation_interrupt(
session_id: sessions::SessionId,
) -> ActivationInterrupt {
let sock = client::resolve_socket_path(global.minimal_dir.as_deref(), global.use_minvmd());
// Resolved here, not inside the task: the withdrawal's socket is the
// same provider dir's, and the borrow must not cross the spawn.
let control_sock = vm_host_control_sock(global);
let task = tokio::spawn(async move {
// Only the first Ctrl-C is intercepted; a second falls through to
// the default disposition so a wedged cleanup can still be killed.
Expand All @@ -677,9 +685,22 @@ pub(crate) fn arm_activation_interrupt(
&& let Ok(mut client) = client::Client::connect(&sock).await
{
use minimald_rpc::{AbortSession, AbortSessionRequest};
// The record is fetched **before** the abort, which may take it
// with the session: it carries the pair the box's registration
// handed back (T66), whose row is withdrawn after the abort —
// the creator's withdrawal, best-effort. A session that
// registered no box (a task session, a native host) holds no
// pair, and the withdrawal stays silent for it.
let row = get_session_record(&mut client, &session_id.to_string())
.await
.ok()
.and_then(|resp| resp.record);
let _ = client
.oneshot_rpc::<AbortSession>(AbortSessionRequest { id: session_id })
.await;
if let Some(record) = row {
withdraw_box_row(control_sock, record.name.as_deref(), record.box_addresses).await;
}
}
std::process::exit(130);
});
Expand Down
Loading
Loading