8000 T126 — Refuse a named loadout on a sealed box, a loadout that sets loadout_mode, and a contradicted constraint; a sealed box reads no default loadouts · Issue #3254 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T126 — Refuse a named loadout on a sealed box, a loadout that sets loadout_mode, and a contradicted constraint; a sealed box reads no default loadouts #3254

Closed

Description

@agent-137

Task

slice size difficulty model who estimated lines
Types only narrow M needs care strongest an agent 300 (140 code, 160 tests)

On top of T124's gate: a loadout named on a sealed box, a loadout that sets loadout_mode, and an entry that contradicts a type constraint on the mode each fail the expansion with exit 3, before any loadout is applied. A sealed box never reads its default loadouts, and prints nothing about skipping them.

Covers:

  • BOX-171
  • BOX-172
  • BOX-173
  • BOX-175
  • BOX-181

Layers:

  • expansion:
    • crates/mfile/src/expand.rs: three more checks at T124's gate, all before any loadout is applied. A Box Type constraint that holds loadout_mode at another value is refused as BOX-061 refuses, without reading any loadout (BOX-181). On sealed, a loadout a flag named is refused (BOX-173). On open, a selected loadout whose table sets loadout_mode is refused (BOX-172). Layers gains the names of the loadouts a flag named, beside the folded loadouts table.
    • crates/mfile/src/error.rs: the BOX-172 and BOX-173 refusals, with the text below
    • cargo nextest run -p mfile loadout_setting_loadout_mode_refused_exit3
    • cargo nextest run -p mfile named_loadout_on_sealed_box_refused_exit3
    • cargo nextest run -p mfile constrained_loadout_mode_refused_before_loadouts
  • loadout:
    • crates/boxes/src/core/loadout.rs: LoadoutFile drops a key it does not know, so the loader reads the raw loadout_mode key and hands it on, so BOX-172 can see it
  • client:
    • crates/minimal/src/loadouts.rs: resolve_active_loadouts takes the box's loadout_mode. On sealed it reads neither the config's default_loadouts nor the built-in default loadout, so a missing or malformed default cannot fail the box (BOX-175). Loadouts that --loadout names are still passed on, so the expansion refuses them under BOX-173.
    • crates/minimal/src/cmd/boxes/create.rs: reads the mode from the expansion of the layers up to the entry before it resolves loadouts, and prints nothing about a skipped default loadout (BOX-171)
    • crates/minimal/src/task.rs: the same for min task run
    • crates/minimal/src/tests.rs: tests
    • cargo nextest run -p minimal sealed_task_run_prints_nothing_about_loadouts
    • cargo nextest run -p minimal sealed_box_ignores_broken_default_loadout

User-facing text. These messages are new. Each one ends the command with exit 3, from both the creating command and min box spec <entry>. <layer> is the words expand.rs's layer_words gives today.

  • BOX-172, a selected loadout sets the key:
    Loadout <name> sets loadout_mode. A loadout cannot set loadout_mode. Remove loadout_mode from loadout <name>.
  • BOX-173, a flag names a loadout for a sealed box, where no type constraint holds the mode:
    Cannot apply loadout <name>. This box's loadout_mode is sealed, set by <layer>. Run the command without --loadout <name>, or set loadout_mode = "open" in <entry layer>.
  • BOX-173, where a type constraint holds the mode:
    Cannot apply loadout <name>. This box's loadout_mode is sealed, set by <layer>. The <type> box type requires loadout_mode = "sealed". Run the command without --loadout <name>.
  • BOX-181 uses BOX-061's existing constraint refusal unchanged.

Code spans mark the key, the value, the flag and the loadout name. They are shown bare above so the line reads as printed. The mfile tests above pin each text. BOX-171 adds no text: sealed_task_run_prints_nothing_about_loadouts pins that min task run on a sealed box prints nothing about loadouts on stdout or stderr.

Observability. The daemon log names the box's mode at creation.

Owner decisions this task follows:

Plan block
### T126 — Refuse a named loadout on a sealed box, a loadout that sets loadout_mode, and a contradicted constraint; a sealed box reads no default loadouts
  slice: S5
  kind: task
  covers: BOX-171, BOX-172, BOX-173, BOX-175, BOX-181
  size: M
  est: 140 code, 160 tests
  executor: agent
  difficulty: needs care
  model: strongest
  diagnostics: each refusal names the loadout and the layer that set loadout_mode; the daemon log names the box's mode
  observability: the daemon log names the box's mode at creation
  layers:
    - expansion:
      - crates/mfile/src/expand.rs: refuse a constrained mode, a named loadout on a sealed box and a loadout-set mode before the loadouts layer
      - crates/mfile/src/error.rs: the two loadout refusals
      test: cargo nextest run -p mfile loadout_setting_loadout_mode_refused_exit3
      test: cargo nextest run -p mfile named_loadout_on_sealed_box_refused_exit3
      test: cargo nextest run -p mfile constrained_loadout_mode_refused_before_loadouts
    - loadout:
      - crates/boxes/src/core/loadout.rs: the loader keeps the raw loadout_mode key
    - client:
      - crates/minimal/src/loadouts.rs: a sealed box reads no default loadouts
      - crates/minimal/src/cmd/boxes/create.rs: reads the mode before resolving loadouts; prints nothing for a skipped default
      - crates/minimal/src/task.rs: the same for min task run
      - crates/minimal/src/tests.rs: tests
      test: cargo nextest run -p minimal sealed_task_run_prints_nothing_about_loadouts
      test: cargo nextest run -p minimal sealed_box_ignores_broken_default_loadout
  produces: none
  consumes:
    - crates/mfile/src/expand.rs
  proof: Each refusal fails before a loadout is applied, and a sealed task never reads a broken default loadout or prints about it.
  depends on:
    - blocked by #3247

Activity

  1. minimal-foundry commented on Nov 12, 2026

    @minimal-foundry
    Contributor

    Done. #3301 merged.

    branch agent/3254-refuse-a-named-loadout-on-a-sealed-box-a-loadout · epic #2236 · PR #3301

    round outcome job
    1 changed nothing: Revise round 1: no code change this round. Both threads were judged against the branch. The dashboard create path (crates/minimal/src/dash/app.rs) still resolves default loadouts without the loadout-m 61197ac3
    2 pushed e2629ee1
    3 pushed e8311561
    4 failed: branch agent/3254-refuse-a-named-loadout-on-a-sealed-box-a-loadout is at 887f7ce but the job pushed ded1d14. Refusing to act on a branch this job did not write. 6a21d572
    5 pushed a661c489
    6 pushed 420ca786
    1 pushed b4ba1af3
    1 changed nothing: every commit this round put on the branch above 3151c0f is a merge of the base branch, so it carries no work of its own d51b5655

    Updated 2026-11-13T03:27:12.286Z.

  2. added
    needs-humanAn agent handed off; a human must act, then clear this label. Set by defer and handoffs.
    on Nov 12, 2026
  3. removed
    needs-humanAn agent handed off; a human must act, then clear this label. Set by defer and handoffs.
    on Nov 12, 2026
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