8000 mfile: a box stores until_complete even when its entry sets lifetime = "until_stopped", so restart is unreachable · Issue #3458 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

mfile: a box stores until_complete even when its entry sets lifetime = "until_stopped", so restart is unreachable #3458

Closed

Description

@agent-137

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.

Refs #2236.

Activity

  1. agent-137 commented on Nov 16, 2026

    @agent-137
    MemberAuthor

    Planned as BCLI T53 (#3486), together with #3204, per the owner's decision of 2026-11-16. It lands after T129 (#3409).

  2. agent-137 commented on Nov 18, 2026

    @agent-137
    MemberAuthor

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:must-haveMust be done. Applied by the inbox-route classifier or a human.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0