FFFF T56 — Store each box's stopped and exited ending on its record · Issue #2634 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
  • T56 — Store each box's stopped and exited ending on its record #2634

    Closed

    Description

    @mitodrummer

    Task

    slice size difficulty model who estimated lines
    Retained sessions M needs care strongest an agent 400 (250 code, 150 tests)

    A stored record holds stopped or exited with its reason, exit code and signal.

    Covers:

    • BOX-011

    Layers:

    • record:
      • crates/boxes/src/lib.rs: BoxState holds stopped and exited; Record stores reason, exit_code, signal
      • crates/boxes/src/core/record.rs: Record::state() reads the stored ending; state_is_exactly_one over Record
      • crates/boxes/src/store.rs: persist and load the ending; an unknown reason loads as written
      • cargo nextest run -p boxes record_stores_stopped_and_exited_with_their_ending
      • cargo nextest run -p boxes unknown_reason_loads_as_written
    • callers:
      • crates/minimal/src/cmd/list.rs: min ls label active → running
      • crates/minimal/src/attach.rs: state matches
      • crates/minimald/src/box_actor/setup.rs: state matches
      • cargo nextest run -p minimal list_labels_a_running_box_running

    The residual of BOX-011 that #2632 (T52) left: T52 added the five states as a type, but no stored record can hold stopped or exited. T3 (#2390) needs this first. Its first run ended with no PR, because it couldn't meet BOX-013, BOX-018 and BOX-154 without stored endings. Store reason as an open set of values, so later reasons such as BRES's oom and gominimal/inbox#678's output-validation end need no migration. This task doesn't turn a running record with no process into stopped at restart; that's BOX-154, in T3.

    Waits on:

    Plan block
    ### T56 — Store each box's stopped and exited ending on its record
      slice: S0
      kind: task
      covers: BOX-011
      size: M
      est: 250 code, 150 tests
      executor: agent
      difficulty: needs care
      model: strongest
      diagnostics: the store logs a record it loads with an unknown reason, naming it
      observability: none: no new runtime signal; the ending is read by T3's stop span
      layers:
        - record:
          - crates/boxes/src/lib.rs: BoxState holds stopped and exited; Record stores reason, exit_code, signal
          - crates/boxes/src/core/record.rs: Record::state() reads the stored ending; state_is_exactly_one over Record
          - crates/boxes/src/store.rs: persist and load the ending; an unknown reason loads as written
          test: cargo nextest run -p boxes record_stores_stopped_and_exited_with_their_ending
          test: cargo nextest run -p boxes unknown_reason_loads_as_written
        - callers:
          - crates/minimal/src/cmd/list.rs: min ls label active -> running
          - crates/minimal/src/attach.rs: state matches
          - crates/minimald/src/box_actor/setup.rs: state matches
          test: cargo nextest run -p minimal list_labels_a_running_box_running
      produces: none
      consumes:
        - crates/boxes/src/events.rs
      proof: A stored record holds stopped or exited with its reason, exit code and signal.
      depends on:
        - blocked by #2387
    

    Activity

    1. mitodrummer commented on Oct 27, 2026

      @mitodrummer
      MemberAuthor

      A note for whoever picks this up: store reason as an open set of values, not a closed enum that refuses an unknown one.

      Two pending specs add end reasons beyond BOX-011's table:

      • The resources spec (gominimal/inbox#698; BRES) adds oom.
      • The Agent Box epic's typed outputs (gominimal/inbox#678 S14) add an "output failed validation" end (exit 8), distinct from a workload failure.

      A stored record must survive a daemon that knows a newer reason. That means deserializing an unknown reason without failing, and rendering it as written. Adding a reason should then need no migration. The [[file_exports]] copy follow-up (#2668) will add per-export status alongside, under the same rule.

    2. mitodrummer commented on Oct 28, 2026

      @mitodrummer
      MemberAuthor

      Folded into #2390 (T3, stop a box and keep its record): its first run couldn't meet BOX-013, BOX-018 and BOX-154 without these stored endings. T3's layers now include a record layer with this issue's files (crates/boxes/src/lib.rs, core/record.rs, store.rs, min ls's label, and the state matches in attach.rs and box_actor/setup.rs). This issue closes when T3's PR merges.

    3. added
      kind:taskA task the plan skill rendered; the body carries ## Task
      on Oct 28, 2026
    4. changed the title [-]Store the stopped and exited states, with their endings, on every box record[/-] [+]T56 — Store each box's stopped and exited ending on its record[/+] on Oct 28, 2026
    5. added
      size:M200 to 500 net lines; one PR
      model:strongestThe strongest model available: unknown ground, or large work that needs care
      on Oct 28, 2026
    6. mitodrummer commented on Oct 28, 2026

      @mitodrummer
      MemberAuthor

      Change of plan from my last comment: the runtime refused T3 with this folded in ("task names 14 layer files, above 10: two tasks"). So this issue is now its own task, T56, under S0 (#2366), with the six files as its record and callers layers. T3 (#2390) is back to its original eight files and waits on this one.

    7. minimal-foundry commented on Oct 28, 2026

      @minimal-foundry
      Contributor

      Done. #2676 merged.

      branch agent/2634-store-each-box-s-stopped-and-exited-ending-on-it · epic #2236 · PR #2676

      round outcome job
      1 changed nothing: Revise round 1: the one thread is judged invalid, so this round adds no commit. The three test lines pass at the branch head, which includes the merge of origin/main. A rename of the wire name of BoxS 94c61a37
      2 pushed 95557aea
      3 pushed e0e5d367

      Updated 2026-10-28T19:24:18.780Z.

    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

      kind:taskA task the plan skill rendered; the body carries ## Taskmodel:strongestThe strongest model available: unknown ground, or large work that needs caresize:M200 to 500 net lines; one PR

      Type

      No type

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

      • 0