mfile: a box stores until_complete even when its entry sets lifetime = "until_stopped", so restart is unreachable · Issue #3458 · gominimal/minimal · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mfile: a box stores until_complete even when its entry sets lifetime = "until_stopped", so restart is unreachable #3458
Found by pc's manual run of the Box CLI Test Plan (U9). It blocks N28.
A session entry that sets [sessions.default.box] lifetime = "until_stopped" shows that lifetime in min box spec <entry>. The created box's stored spec says until_complete. So the box ends when its shell returns, and min box restart (BOX-176) can never reach it.
By the code on main, the typed spec that the create sends never reads the lifetime from the expansion. BoxSpec::build in crates/mfile/src/spec.rs sets lifetime: Lifetime::UntilComplete for every box (line 259, with the comment "The shipped session and task types both end their run when the entrypoint returns"). The tests in the same file pin that value for both a task and a session.
Scope: take the lifetime from the expanded spec when the client builds the create, so a box stores the lifetime that min box spec shows (BOX-068). Pin it with a test that creates a session box from an entry with lifetime = "until_stopped" and reads until_stopped back from the stored spec. Then BOX-176's restart path can be reached end to end.
Related: T129 (#3409) makes the daemon store the expanded spec, and #3204 carries a typed session entry's body into the stored spec. Neither names the lifetime. If T129's stored expanded spec also drives the box's lifetime, this closes with it. Otherwise it is its own change in BoxSpec::build or the create path.
Fixed by #3500 (T53, merged 2026-11-18 as 315600c). BoxSpec::build now takes lifetime from the expanded session entry. The layer that sets it wins, and a derived Box Type beats its parent. session_entry_until_stopped_stores_until_stopped pins that an entry with lifetime = "until_stopped" stores until_stopped, so min box restart can reach the box. This unblocks test-plan N28.
Activity
agent-137 commentedon Nov 16, 2026
Planned as BCLI T53 (#3486), together with #3204, per the owner's decision of 2026-11-16. It lands after T129 (#3409).
agent-137 commentedon Nov 18, 2026
Fixed by #3500 (T53, merged 2026-11-18 as 315600c).
BoxSpec::buildnow takeslifetimefrom the expanded session entry. The layer that sets it wins, and a derived Box Type beats its parent.session_entry_until_stopped_stores_until_stoppedpins that an entry withlifetime = "until_stopped"storesuntil_stopped, somin box restartcan reach the box. This unblocks test-plan N28.