8000 min box rm and min box prune verbs over ReapBox/PruneBoxes (BCLI-004/005/006) · Issue #2834 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

min box rm and min box prune verbs over ReapBox/PruneBoxes (BCLI-004/005/006) #2834

Open

Description

@mitodrummer

The daemon side of removing and pruning stopped boxes lands with T8 (#2395, PR #2833): the ReapBox and PruneBoxes requests, the running-box refusal, and the reaped list. No min command sends them yet.

This issue tracks the CLI verbs the BCLI spec (#1991, docs/specs/28-spec-box-cli) defines over those requests:

  • min box rm <box> [--force] sends ReapBox and prints what it reaped. On a running box without --force it reports BOX-019's refusal with exit 2, naming --force (BCLI-004).
  • min box prune [--older-than <d>] [--parent <box|self>] sends PruneBoxes and prints the reaped list. Off a TTY without --yes it fails with exit 2, naming --yes (BCLI-005). With --dry-run it sums the disk the matched boxes hold (BCLI-006). --older-than counts from when a box entered stopped or exited (architecture.md line 501).

It lands as a task of the BCLI plan once #1991 merges. It is listed as a residual on #2833.

Also in scope (from arch review of #2833):

  • A PruneBoxes dry-run mode on the daemon side. It lists the boxes the selectors match and the disk each holds, and reaps none (architecture.md line 501). min box prune --dry-run uses it (BCLI-006).
  • Amend BOX-021 in docs/specs/29-spec-box-local-first to name --dry-run. BOX-021 omits a flag that the design names.
  • A disk figure in the record BOX-159 returns (folded in from BOX: return the disk a stopped or exited box holds in BOX-159 (needed by BCLI-006) #2869). min box show <box> reports the disk that a stopped or exited box holds (BCLI-006), and the dry run above reports the same figure per box. The figure counts only what a reap frees: the retained filesystem (BOX-017), the retained output log (BOX-155) and the events stream (BOX-045). It excludes Box Volumes, because rm and prune leave a volume in place (BVOL-008, draft docs(specs): add the Box Volumes spec (BVOL) for inbox#731 #1990). Amend BOX-159 in docs/specs/29-spec-box-local-first to name the field.

Activity

  1. agent-137 commented on Nov 4, 2026

    @agent-137
    Member

    When this adds min box prune --dry-run (BCLI-006): the BCLI-005 refusal from T22 (#2907, PR #3008), PruneNeedsYes in crates/minimal/src/cmd/boxes/lifecycle.rs, already tells the user to run --dry-run. Until this lands, clap rejects that flag. Keep the refusal text and this flag in step, and update the test that pins the text if the wording changes.

  2. agent-137 commented on Nov 7, 2026

    @agent-137
    Member

    The daemon half that this issue's CLI scope waited on has landed: spec 29's BOX-021 prune preview and BOX-159 disk figure, in #3078 (BOX T63). min box rm and min box prune merged in #2961 and #3008. The rest, min box prune --dry-run with the disk each box holds (BCLI-006), is BCLI T23 (#2915), which no longer waits on this issue. Left open for its owner to close.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0