8000 fix(minimald): record a box's project type, and match type nouns by root by agent-137 · Pull Request #4008 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimald): record a box's project type, and match type nouns by root - #4008

Merged
norrietaylor merged 32 commits into
mainfrom
fix/3997-record-project-box-type
Dec 4, 2026
Merged

norrietaylor merged 32 commits into
mainfrom
fix/3997-record-project-box-type

Conversation

@agent-137
@agent-137 agent-137 commented Dec 4, 2026 •
Copy link
Copy Markdown
Member

Stacked on #4005 (fix/3996-start-task-root-box-type), so this diff is #3997 only. It is retargeted to main once #4005 merges.

Why

A box started from an entry of a project Box Type, such as netsess (extends session) or ci (extends task), recorded session or task, not its own type, in both its record and its stored spec. BOX-001 says the record takes the type that the spec names.

Owner ruling 2026-12-03 (Karl, on #3997): a type noun covers the types that extend it. min session list/attach/stop/rm/logs and min task list/stop/rm/logs include boxes whose type extends session or task. So recording the real type hides nothing from the type nouns.

Closes #3997

What changes

  • The spec na 8000 mes the type and its root.
    • The projection already defines type.root (spec 29 BOX-071 and BOX-160), and the daemon already reads it at admission (spec_type_root and TypeFacts::of_spec).
    • mfile::spec::BoxSpec now writes and reads a top-level [type] root (type_root). For a project type, take_entry_type(expanded) sets box.type to the type and type.root to its built-in root.
    • for_session_entry and the task path (put_task_spec) both use it. A built-in type writes no [type] table, so the stored bytes of a plain session or task box are unchanged.
    • Entrypoint::implied decides by the root.
  • The daemon stamps the record from the spec.
    • record_box_type() in box_manager.rs takes the record's type from the received spec, replacing the match on the creating verb.
    • With no spec, or a spec that names no type (an older client), it falls back to the creating verb's type, as before.
    • Admission still refuses a type with no built-in root.
  • Type nouns match by root.
    • BoxListingEntry has a new type_root field, serde-defaulted and skipped when empty. The daemon fills it from the stored spec (listed_type_root), with no new Record field.
    • BoxListingEntry::is_of_type_noun(noun) is true for the exact type or its root. These callers use it:
      • typed_records (min session list, min task list);
      • resolve_box_over (the typed stop, rm and logs);
      • AttachVerb::visible (min session attach, with or without an address).
    • min box list --type <T> still matches the exact type. The ruling covers the type nouns.
  • Compatibility. A record or listing with no type_root, from an older daemon, matches by exact type as before. A stored spec with no [type] table reads as before.
  • Spec 29, BOX-001: a new EARS sub-bullet (T0). Spec 28: BCLI-030 now says the type nouns cover the boxes whose type, or whose type's built-in root, is that type, and BCLI-032 counts types rooted at session. Both cite the ruling, and no new ids were needed.
  • Docs: cli-min.md covers session list, task list/logs/stop/rm, and that the box records the entry's own type.

Verification

  • just test-one spec:: -p mfile --lib: 22 passed, including spec_names_project_box_type_and_root.
  • just test-one … -p minimald --lib (create, listing, upgrade, admission, root): 115 passed, including create_records_the_project_type_its_spec_names. That test covers netsess and ci recording and storing their type, plain session, a spec-less task create getting task, the listing's root, and neither noun matching a box of the other root.
  • minimal (CARGO_BUILD_JOBS=1, --lib): 15 and then 4 passed. These include:
    • typed_records_cover_types_built_on_the_noun: old root-less records, an agent-rooted type, and a record with no type.
    • type_nouns_cover_project_types_built_on_them: on the harness daemon, min session list lists a netsess box, min session attach finds it and refuses a ci box, min task list lists the ci box, and the typed stop/rm/logs resolve and refuse as expected.
    • fix(minimal): run a [boxes] entry whose type extends task #4005's task_type_entry_run_takes_its_type_network, which now also checks the stored ci and root task.
  • just test-one listing -p minimald-rpc: 1 passed.
  • just fmt-check, the workspace just clippy and just clippy-strict are clean. spec-lint reports nothing on the touched lines.
  • Not run here: just e2e and just test-vm. Vale is not installed.

🤖 Generated with Claude Code

https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

Summary by CodeRabbit

  • New Features
    • Boxes created from project-defined types retain their declared type and built-in root, which are shown in box listings and reports.
    • Session and task listings and related lookups include boxes whose types extend the corresponding built-in type, while displaying each box’s own type.
    • Project-typed boxes can be launched, resumed, and restarted using their stored specifications.
  • Bug Fixes
    • Creation is refused when a project-defined type is based on a different built-in type than the creating command.
    • Restarting a task-rooted box with an unsupported terminal setting is refused.
  • Documentation
    • Updated CLI and specification references to describe type-aware listings and box type reporting.

mitodrummer and others added 9 commits December 3, 2026 18:14
An entry whose type is a `[box_types]` type could not start: `min box
start` refused it as an unsupported type, and `min session start` refused
it as an entry whose session root the client cannot tell. So a type's
`defaults.network` (BOX-233) reached `min box spec <entry>` but no box.

`mfile::entry::read_entries` now resolves each entry's built-in root
through the file's `[box_types]` (BOX-059) and keeps it on `BoxEntry`. The
start picks and plans by that root, as the architecture's type nouns
narrow by root: a session-rooted entry starts through `min box start` and
`min session start` on the session path, and counts as a session entry
for a bare start and for the egress pick (closes the #3140 refusal for a
type that resolves). A task-rooted `[boxes]` entry reaches the #3213
refusal, which now names its type. Any other root, an unresolved type and
a missing type are refused with exit 2, naming the roots that start.

Spec 28 gains BCLI-089. The CLI and minimal.toml references say which
entries start. The session e2e gains `project_box_type_network` (N176).

Refs #3990, #3140, #3197, #3213.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
…x type error, exit 3

Arch condition C1 on #3998: a type that does not resolve (a cycle, an
unknown `extends`, an undeclared type) and a missing `type` are invalid
configuration, exit 3 (architecture.md Box Types and exit codes).

- `mfile::box_types::EntryRoots` reads each `[box_types.<name>]` on its own,
  so a broken type fails only the entries whose chain reaches it. A valid
  type beside it keeps its root. `BoxEntry::type_error` keeps the reason.
- The start refuses an entry with no root with that `BoxTypeError` as
  `ProjectFileInvalid` (exit 3), for a typed entry and when the pick must
  count the entries. `SessionEntryUndecided::TypeUnresolved` is gone.
  `UnsupportedType` (exit 2) is left for the agent, service, build and
  container-build roots only.
- Spec 28 BCLI-089 gains the exit-3 sub-bullet. The CLI and minimal.toml
  references say exit 3, and drop the obsolete row that refused a named
  session entry other than `default`.
- The e2e case checks that the box runs a command and has curl before it
  probes, fails on any probe failure but a resolve failure or a timeout,
  and reports an unverified enforcement as incomplete, not OK.

Refs #3990, #3998.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
…caped

The start of an entry whose type does not resolve now refuses with the
BoxTypeError itself. Its names come from minimal.toml, so a control
character in one is printed as its escape and cannot rewrite the refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
… broken

Arch clarified C1 on #3998 (architecture.md line 1502): a `[box_types]`
with a broken type is invalid as a whole. Every entry of a type that is
not built in, a valid type's entry included, is refused with the file's
first `BoxTypeError` and exit 3, as `BoxTypes::from_file` refuses them in
the loadout gate and the type layers. An entry of a built-in type still
starts.

`EntryRoots` now wraps `BoxTypes::from_file`. The start test refuses
`web` beside a broken `loop` with the `loop` error for both verbs, and
starts the built-in session and task entries beside it. Spec 28 BCLI-089,
the CLI reference and the minimal.toml reference say the same.

Refs #3990, #3998.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
The type error escaped only control characters, so a bidi override or a
zero-width character in a type name still printed raw. The rule min box
audit uses for the same threat moves to boxes::terminal, and both use it.
The docs say a built-in entry still starts when the start names it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
An entry of a project Box Type that extends task could not run:
min box start reached the #3213 refusal and min task run said
"unknown task", because only [tasks] held tasks. [tasks.<name>] is sugar
for type = "task" (BOX-046), so such an entry lives in [boxes].

mfile now reads each [boxes.<name>] entry whose type's built-in root is
task as a task, beside File::tasks, so the client, mctx and the box
host all find it. A task entry with no action, as min init --type task
writes it, leaves the file loading; its run refuses it with exit 3.
The run and the start look the entry up by root, so the box takes the
type's defaults.network (BOX-233). A broken [box_types] refuses the run
with its first error, exit 3. The #3213 refusal is gone.

Spec 28 gains BCLI-090. Docs and an e2e case follow.

Closes #3996. Closes #3213.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
A box started from an entry of a project Box Type now records that type
(`netsess`, `ci`) in its record and its stored spec, with the built-in
root in the spec's `type.root` (BOX-001, BOX-059, BOX-071). The daemon
stamps the record's type from the received spec, else the creating
verb's type, and reports each listed box's root.

Per the owner ruling of 2026-12-03 (#3997), the type
nouns cover the types built on them: `min session list|attach|logs|
stop|rm` and `min task list|logs|stop|rm` match a box by its type or its
built-in root. Spec 29 BOX-001 and spec 28 BCLI-030/032 are amended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
@agent-137
agent-137 requested a review from a team as a code owner December 4, 2026 00:11
@agent-137 agent-137 added priority:must-have Must be done. Applied by the inbox-route classifier or a human. release:0.8.0 Targeted for the 0.8.0 release. Pair with a priority label. labels Dec 4, 2026
@coderabbitai
coderabbitai Bot commented Dec 4, 2026 •
Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Specs and box records now preserve project Box Types and their built-in roots. The daemon rejects creation when a spec’s root differs from the creating verb’s root. Box reports expose roots, and session and task type-noun filters include boxes built on the requested type.

Changes: Project Box Types and type-root matching

Layer / File(s) Summary
Store project types and roots
crates/mfile/src/spec.rs, crates/minimal/src/task.rs
Specs capture project types and built-in roots, serialize and restore the root, and use it for implied entrypoint selection. Task specs retain the expanded entry type. Tests cover project and built-in types, serialization, and task entrypoint inference.
Create records from specs
crates/boxes/src/lib.rs, crates/minimald/src/box_manager.rs, crates/minimald/src/box_actor/tests.rs, crates/minimald/src/rpc.rs, docs/specs/29-spec-box-local-first/29-spec-box-local-first.md
Record creation uses the spec’s type when available and falls back to the creating verb’s type. Creation rejects specs whose built-in root differs from the creating verb’s root. Tests cover admission refusals and project-type launch, resume, and restart.
Expose roots in box reports
crates/minimald-rpc/src/lib.rs, crates/minimald-rpc/src/tests.rs, crates/minimald/src/box_manager.rs, crates/minimald/src/box_manager/tests.rs
Listing entries carry type_root. Listing, show, prune-preview, and reap paths resolve or pass the root through to their results.
Match type nouns by root
crates/minimal/src/cmd/boxes/*, crates/minimal/src/cmd/session.rs, crates/minimal/src/tests.rs, docs/reference/cli-min.md, docs/specs/28-spec-box-cli/28-spec-box-cli.md
Address resolution, attach, and typed listings match entries by their type or built-in root. Tests and documentation cover the expanded filtering scope.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Spec as Received spec
  participant BoxManager
  participant Record
  participant Listing as Box listing
  participant Commands as Type-noun commands
  Spec->>BoxManager: supplies box type and type root
  BoxManager->>Record: records spec type or verb fallback
  BoxManager->>Listing: includes type_root
  Listing->>Commands: provides entries for noun matching
Loading

Possibly related issues

  • gominimal/minimal#2236 — This PR implements project Box Type recording and type-root filtering described as part of the parent BOX epic.
  • gominimal/minimal#3997 — This PR addresses recording the project type and its root, deriving the record type from the spec, and matching type nouns by built-in root.

Possibly related PRs

  • gominimal/minimal#3998 — Both PRs use resolved built-in roots for project Box Types. This PR stores the root in specs and uses it for listings and type-noun matching.

Suggested reviewers: norrietaylor, mitodrummer, bryan-minimal

Merge Risk: Minimal · up to b92e4

This change records project Box Types and their built-in roots, and makes session and task type nouns match boxes built on them. No unresolved defects were identified, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title follows the Conventional Commit form fix(minimald): ... and names two changes that appear in the changeset: recording a box's project type from its spec (box_manager.rs, mfile spec.rs, tas…
Description check Passed The description follows the template's main sections: Summary (Why and What changes), Testing (Verification with commands and results), and a Checklist. The title guidance is satisfied by the title it…
Linked Issues check Passed Linked issue #3997 has three coding requirements. The current head addresses each one, based on the supplied summaries and the prior assessment. Stack status: the stack lists #4008 (current review) an…
Out of Scope Changes check Passed Each changed area maps to #3997 or supports it:
- crates/mfile/src/spec.rs: type_root, root(), take_entry_type, and implied-entrypoint choice by root. Stores the type and root in the spec.
- `…
Full details: Title check

Explanation

The title follows the Conventional Commit form fix(minimald): ... and names two changes that appear in the changeset: recording a box's project type from its spec (box_manager.rs, mfile spec.rs, task.rs) and matching type nouns by built-in root (is_of_type_noun in minimald-rpc, session.rs, address.rs, attach.rs). It is concise, lower-case, and has no trailing period. It does not mention the admission refusal for mismatched roots or the spec/doc updates, but those are secondary to the main change.

Full details: Description check

Explanation

The description follows the template's main sections: Summary (Why and What changes), Testing (Verification with commands and results), and a Checklist. The title guidance is satisfied by the title itself. The description does not tick the checklist items, and it does not state whether the BREAKING CHANGE: footer applies. The author lists docs updates (cli-min.md, spec 28, spec 29), which covers the first checklist item. The Testing section lists commands and pass counts but does not paste the raw output, which the template asks for. It links the issue with Closes #3997 and notes the stacking on #4005. The description is substantially complete. Remaining gaps: checklist boxes are unticked, the breaking-change status is not stated, and the test output is summarized rather than pasted.

Full details: Linked Issues check

Explanation

Linked issue #3997 has three coding requirements. The current head addresses each one, based on the supplied summaries and the prior assessment. Stack status: the stack lists #4008 (current review) and #4033 (uncertain). #4033 is not needed for the #3997 objectives. #4005 is no longer listed as a stack member, and the merge base is now 85572cb. This changes only the base, not the #3997 requirements.

  1. Store the project type and its root in the spec [#3997]: Addressed by #400 8000 8. mfile::spec::BoxSpec adds type_root and reads and writes a top-level [type] root. take_entry_type(expanded) sets box.type to the project type and type.root to its built-in root. for_session_entry and put_task_spec both call it. Built-in session and task specs write no [type] table. Test: spec_names_project_box_type_and_root (author-reported passing).

  2. Daemon takes the record type from the spec [#3997]: Addressed by #4008. record_box_type() in box_manager.rs uses the received spec's type. With no spec, or a spec that names no type, it uses the creating verb's type. Test: create_records_the_project_type_its_spec_names (author-reported passing), covering netsess, ci, plain session, and spec-less task.

  3. Type nouns match by root, with the root in BoxListingEntry [#3997]: Addressed by #4008. BoxListingEntry.type_root is serde-defaulted. is_of_type_noun matches the exact type or the root. Callers: typed_records, resolve_box_over, and AttachVerb::visible. min box list --type stays exact. Tests: typed_records_cover_types_built_on_the_noun and type_nouns_cover_project_types_built_on_them (author-reported passing).

The issue asks whether type nouns mean the exact type or the built-in root. The PR cites an owner ruling (2026-12-03) for root matching, and specs 28 (BCLI-030, BCLI-032) and 29 (BOX-001 T0) record it. This assessment relies on that cited ruling. The ruling text was not inspected.

Not verified here: test results are author-reported. just e2e and just test-vm were not run.

Full details: Out of Scope Changes check

Explanation

Each changed area maps to #3997 or supports it:

  • crates/mfile/src/spec.rs: type_root, root(), take_entry_type, and implied-entrypoint choice by root. Stores the type and root in the spec.
  • crates/minimald/src/box_manager.rs: record_box_type, listed_type_root, and ListedTraits::type_root. Stamps the record from the spec and fills listing roots.
  • crates/minimald/src/box_manager.rs: create admission refuses a spec whose type root differs from the creating verb's root (exit 3, no record). This is new since the prior review and is not in the PR description. It is closely tied to choosing the record type from the spec. Spec 29 BOX-001 documents it, and the rpc.rs test covers it. The author should confirm the refusal is intended.
  • crates/minimald-rpc/src/lib.rs: BoxListingEntry.type_root and is_of_type_noun.
  • crates/minimal/src/cmd/session.rs, attach.rs, address.rs: type-noun callers use is_of_type_noun.
  • crates/minimal/src/task.rs, crates/minimal/src/tests.rs: put_task_spec calls take_entry_type. Tests cover the ci and task path.
  • Fixtures that set type_root: None: mechanical updates for the new field.
  • crates/minimald/src/box_actor/tests.rs: launch, resume, and restart for project-typed boxes from the stored spec. Supports the stored-spec behavior.
  • Docs in cli-min.md, spec 28, and spec 29: describe the changed behavior.

No change was found that is unrelated to #3997.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Vale (3.24.0)

{
"Line": 13,
"Path": ".vale.ini",
"Text": "Style 'ste' isn't on the StylesPath (/styles). If it's a package, run vale sync.",
"Code": "E201",
"Span": 23
}

A rabbit checks the type and root,
Then watches boxes take their route.
A session list can find its kin,
A task list welcomes rooted-in.
The spec keeps names in tidy view,
And hops along with roots set true.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f20e706f-5cd4-4524-b1f7-de96be6b72d4
Commits

Reviewing files that changed from the base of the PR and between 67e3343 and b92e463.

Files selected for processing: 5

  • crates/mfile/src/spec.rs
  • crates/minimal/src/cmd/boxes/list.rs
  • crates/minimal/src/tests.rs
  • docs/reference/cli-min.md
  • docs/specs/28-spec-box-cli/28-spec-box-cli.md

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review.

@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@github-actions
github-actions Bot commented Dec 4, 2026 •
Copy link
Copy Markdown
Contributor

Spec lint

docs/specs/28-spec-box-cli/28-spec-box-cli.md — 10 finding(s)

docs/specs/28-spec-box-cli/28-spec-box-cli.md:243: P004 BCLI-077 names test 'box_spec_renders_merged_vars_once_with_layer', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:257: P004 BCLI-085 names test 'box_spec_json_names_principal_per_value', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:269: P004 BCLI-078 names test 'expansion_refusals_exit3_on_spec_and_create_verbs', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:353: P004 BCLI-075 names test 'create_verbs_no_loadouts_empties_loadouts_layer', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:366: P004 BCLI-076 names test 'create_verbs_no_hooks_stores_no_hooks', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:405: P004 BCLI-069 names test 'create_verbs_send_name_flag_as_requested_name', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:422: P004 BCLI-070 names test 'create_derived_name_held_takes_number', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:427: P004 BCLI-079 names test 'create_sends_box_name_as_requested_name', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:432: P004 BCLI-080 names test 'create_without_name_sends_no_requested_name', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:737: P004 BCLI-049 names test 'host_stop_stops_boxes_then_daemon_and_vm', which was not found in the repository

docs/specs/29-spec-box-local-first/29-spec-box-local-first.md — 15 finding(s)

docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:81: P004 BOX-004 names test 'name_belongs_to_one_box_on_host_until_reaped_or_renamed', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:100: P004 BOX-212 names test 'derived_name_taken_takes_smallest_free_number_never_refused', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:123: P004 BOX-218 names test 'concurrent_creations_never_share_a_name', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:131: P004 BOX-219 names test 'create_failure_before_run_leaves_no_box_and_frees_name', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:135: P004 BOX-221 names test 'numbered_creation_returns_name_not_taken_and_reason', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:150: P004 BOX-217 names test 'name_comparison_ignores_case', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:157: P004 BOX-223 names test 'upgrade_keeps_legacy_names_including_default', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:161: P004 BOX-005 names test 'unqualified_name_resolves_to_the_box_that_has_it', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:169: P004 BOX-007 names test 'written_name_not_label_reserved_or_id_form_exit3', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:413: P004 BOX-229 names test 'expanded_spec_entry_names_its_entry', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:435: P004 BOX-224 names test 'singular_entry_table_exit3_names_plural', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:619: P004 BOX-182 names test 'loadout_file_ask_without_terminal_denied', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:645: P004 BOX-238 names test 'expansion_reports_principal_per_value_outside_spec_bytes', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:654: P004 BOX-225 names test 'allow_dns_hosts_rule_for_sibling_without_that_name_warns', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:659: P004 BOX-226 names test 'expansion_reports_name_and_project_name_provenance', which was not found in the repository

Advisory. None of this blocks the merge; the review decides.

Advisory, and never a merge gate. Linter: gominimal/foundry@8acb0663, spec format: How Minimal Writes Specs.

@minimal-foundry
minimal-foundry Bot commented Dec 4, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at b92e463d5307.

Nothing to do.

Clobber: none seen in the diff.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Dec 4, 2026
mitodrummer and others added 2 commits December 4, 2026 00:19
…s packages

Review of #4005:

- The refusal of a network key that a task box does not apply now reads
  the layers the entry expands from: its own table, [defaults.<type>]
  and each project type's defaults in its chain. [defaults.task] is no
  layer of a ci entry. [defaults] stays out, as #3671 tracks.
- A task-rooted type's defaults.packages reach the box: the lists sent
  with the entry come from an expansion with the type chain's layers.
- A [boxes.default] task entry with no action is refused as a task,
  exit 3, not as the implicit session's terminal, exit 2.
- cli-min.md says which network keys a task box applies, and that the
  others refuse the run. BCLI-090 gains sub-bullets for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the stacked diff against fix/3996-start-task-root-box-type.

Stored-record compatibility holds:

  • Record gains no field.
  • BoxListingEntry::type_root is serde-defaulted and skipped when empty, and the struct is not deny_unknown_fields, so an older client still decodes a listing.
  • A record with no root matches by exact type, as before. typed_records_cover_types_built_on_the_noun pins this.
  • A stored spec with no [type] table reads as before.

Type-noun matching by root agrees with BCLI-030/032 as amended, and with the BOX-059/071/160 root semantics. Admission still refuses a spec with no built-in root before record_box_type runs.

One medium finding: no test covers the restart and resume of a project-typed box from its stored spec (inline).

One low finding (inline), plus a stale comment outside the diff: the rc-task-as-session case in crates/minimald/src/box_manager/tests.rs still says "The session verb files the box as session whatever box.type says". Since this PR the record takes the spec's type. The case is still refused, because the second root check in root_constraint_refusal runs against the verb's root, so only the comment is wrong.


Generated by Claude Code

Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread crates/minimald/src/box_manager.rs Resolved
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

minimal-arch[bot]
minimal-arch Bot previously requested changes Dec 4, 2026
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: CONDITIONS · 1 condition · the full ruling

The merge of #4005 does not touch the lines that C1 names, so C1 is still open. Section Type nouns (architecture.md L482) filters each type noun to boxes of that type. BCLI-030 and the new BOX-001 sub-bullet widen the nouns to types by root, and cite only the owner ruling on #3997. Name the gominimal/arch issue that amends L482 in both comments. Add one sentence to the spec 28 rationale that marks the conflict. Do not change the code.

Outside the diff

  • docs/specs/28-spec-box-cli/28-spec-box-cli.md:788: C1 · Add one sentence to this paragraph. It says that the Type nouns paragraph (L482) filters the nouns to boxes of that type, and that the named gominimal/arch issue corrects it. Follow the gominimal/arch#148 pattern.

Ruled at 6b4766c against gominimal/arch@c73026f5ba2b by claude-opus-5-5.

@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Dec 4, 2026
mitodrummer and others added 3 commits December 4, 2026 01:21
…e root

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
…tored spec

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
…ne preview

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@agent-137
Copy link
Copy Markdown
Member Author

@coderabbitai review

@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS · the full ruling

This head only merges the base branch, which brings in main and #4002. The PR's own change is the same as at bc5105d3, which was a PASS. The merge keeps every refusal in admission_refusal. The record still takes its type from the spec before the stored spec gets infrastructure_cas. BoxSpec keeps type_root beside trusted_cas. The ruling stands, and no condition is open.

Ruled at 5444713 against gominimal/arch@5cfb8febb353 by claude-opus-5-5.

@agent-137
Copy link
Copy Markdown
Member Author

/review

@agent-137
Copy link
Copy Markdown
Member Author

@coderabbitai review

@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Dec 4, 2026
@coderabbitai
coderabbitai Bot commented Dec 4, 2026 •
Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

mitodrummer and others added 2 commits December 4, 2026 07:05
Review of #4005, round 5:

- A task type's inherited patch, the task spelling of patches, is
  refused too. The remedy for patch and patches names the entry's own
  patch table instead of a move, since the shapes differ.
- A more specific mode in a legacy spelling, such as no-net, clears an
  inherited ingress as none does.
- The removed-profile warning names the table that declares the task.
- minimal-dot-toml.md documents the ingress exception. BCLI-090 says the
  network sent is the one the layers and the command line resolve.
- session-e2e.sh tears down the project task Box Type seed and boxes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@agent-137
Copy link
Copy Markdown
Member Author

@coderabbitai review

@agent-137
Copy link
Copy Markdown
Member Author

/review

@coderabbitai
coderabbitai Bot commented Dec 4, 2026 •
Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Dec 4, 2026
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS · the full ruling

This head merges #4005's commit 89c5aca4 into the branch, with no conflict resolution. The ledger already ruled that commit PASS. This PR's own diff did not change. The record and stored spec still name the project type and its root. The type nouns still match by root. The change conforms.

Ruled at 67e3343 against gominimal/arch@5cfb8febb353 by claude-opus-5-5.

@agent-137
Copy link
Copy Markdown
Member Author

/review

@agent-137
Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai
coderabbitai Bot commented Dec 4, 2026 •
Copy link
Copy Markdown
Contributor
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review at 67e3343d. No medium or high findings remain, so I approve. One earlier low is still open and does not block.

Earlier findings:

  • Medium (VerbRootRefusal reached min without its exit code): fixed in 3010d73. admission_refusal now downcasts VerbRootRefusal and returns its exit code, so the BOX-160 arm in rpc.rs replies with exit_code: Some(3). create_refuses_a_spec_rooted_at_another_verbs_type now asserts admission_refusal(&err) == Some(3) for each case. The new verb_root_refusal_reply_carries_exit_code in rpc.rs sends a ci-rooted-at-task spec on the session verb over the wire. It pins the text, exit_code == Some(3), code/hint as None, and that no box is listed. Task-verb creates go through the same CreateSession arm, so they are covered by the same branch.
  • Low (stale rc-task-as-session comment): still unfixed. crates/minimald/src/box_manager/tests.rs line 7853 still says "The session verb files the box as session whatever box.type says". Since this PR, the record takes the spec's type, and verb_root_refusal refuses this case anyway. The line is outside the diff. Non-blocking.
  • High (show_returns_record_state_identity_and_live_execs), the earlier medium on restart/resume, the reap/prune root low, and the stale root_constraint_refusal doc: fixed in earlier rounds. They are unchanged here.

The other commits since the last review are merges of fix/3996-start-task-root-box-type, which carry #4005 round-5 fixes and #4002/#4028 from main. Against the base, they change nothing in this PR's own diff beyond the base's own TrustedCaRefusal arm in admission_refusal, and that arm sits correctly beside the new VerbRootRefusal arm.


Generated by Claude Code

Base automatically changed from fix/3996-start-task-root-box-type to main December 4, 2026 16:08
…ct-box-type

# Conflicts:
#	crates/minimal/src/task.rs
#	docs/specs/28-spec-box-cli/28-spec-box-cli.md
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS · the full ruling

This head merges main, which now carries #4005, into the branch. The conflict resolution keeps this branch's side in task.rs and spec 28. The merge adds one line, type_root: None, to the stopped-host rows in stopped_host_boxes(). Those rows already have no type, so the line changes no result. Apart from that line, the PR's own patch is the same as the patch at 67e3343d, which passed on the same arch. The ruling stays PASS.

Ruled at b92e463 against gominimal/arch@5cfb8febb353 by claude-opus-5-5.

@norrietaylor
norrietaylor merged commit f027394 into main Dec 4, 2026
41 of 42 checks passed
@norrietaylor
norrietaylor deleted the fix/3997-record-project-box-type branch December 4, 2026 16:28
agent-137 pushed a commit that referenced this pull request Dec 4, 2026
Rebuilt on main after #4005 and #4008 squash-merged: this PR's own
change over its old stack base, applied unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g
norrietaylor pushed a commit that referenced this pull request Dec 4, 2026
…#4033)

* fix(minimal): start an entry of a project Box Type by its built-in root

An entry whose type is a `[box_types]` type could not start: `min box
start` refused it as an unsupported type, and `min session start` refused
it as an entry whose session root the client cannot tell. So a type's
`defaults.network` (BOX-233) reached `min box spec <entry>` but no box.

`mfile::entry::read_entries` now resolves each entry's built-in root
through the file's `[box_types]` (BOX-059) and keeps it on `BoxEntry`. The
start picks and plans by that root, as the architecture's type nouns
narrow by root: a session-rooted entry starts through `min box start` and
`min session start` on the session path, and counts as a session entry
for a bare start and for the egress pick (closes the #3140 refusal for a
type that resolves). A task-rooted `[boxes]` entry reaches the #3213
refusal, which now names its type. Any other root, an unresolved type and
a missing type are refused with exit 2, naming the roots that start.

Spec 28 gains BCLI-089. The CLI and minimal.toml references say which
entries start. The session e2e gains `project_box_type_network` (N176).

Refs #3990, #3140, #3197, #3213.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimal): refuse an entry whose type does not resolve with its box type error, exit 3

Arch condition C1 on #3998: a type that does not resolve (a cycle, an
unknown `extends`, an undeclared type) and a missing `type` are invalid
configuration, exit 3 (architecture.md Box Types and exit codes).

- `mfile::box_types::EntryRoots` reads each `[box_types.<name>]` on its own,
  so a broken type fails only the entries whose chain reaches it. A valid
  type beside it keeps its root. `BoxEntry::type_error` keeps the reason.
- The start refuses an entry with no root with that `BoxTypeError` as
  `ProjectFileInvalid` (exit 3), for a typed entry and when the pick must
  count the entries. `SessionEntryUndecided::TypeUnresolved` is gone.
  `UnsupportedType` (exit 2) is left for the agent, service, build and
  container-build roots only.
- Spec 28 BCLI-089 gains the exit-3 sub-bullet. The CLI
10BC8
 and minimal.toml
  references say exit 3, and drop the obsolete row that refused a named
  session entry other than `default`.
- The e2e case checks that the box runs a command and has curl before it
  probes, fails on any probe failure but a resolve failure or a timeout,
  and reports an unverified enforcement as incomplete, not OK.

Refs #3990, #3998.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(mfile): print a box type error's names with control characters escaped

The start of an entry whose type does not resolve now refuses with the
BoxTypeError itself. Its names come from minimal.toml, so a control
character in one is printed as its escape and cannot rewrite the refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimal): refuse every project box type entry while a box type is broken

Arch clarified C1 on #3998 (architecture.md line 1502): a `[box_types]`
with a broken type is invalid as a whole. Every entry of a type that is
not built in, a valid type's entry included, is refused with the file's
first `BoxTypeError` and exit 3, as `BoxTypes::from_file` refuses them in
the loadout gate and the type layers. An entry of a built-in type still
starts.

`EntryRoots` now wraps `BoxTypes::from_file`. The start test refuses
`web` beside a broken `loop` with the `loop` error for both verbs, and
starts the built-in session and task entries beside it. Spec 28 BCLI-089,
the CLI reference and the minimal.toml reference say the same.

Refs #3990, #3998.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(mfile): escape invisible format characters in a box type error

The type error escaped only control characters, so a bidi override or a
zero-width character in a type name still printed raw. The rule min box
audit uses for the same threat moves to boxes::terminal, and both use it.
The docs say a built-in entry still starts when the start names it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* docs: say a session or task entry still starts beside a broken box type

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimal): run a [boxes] entry whose type extends task

An entry of a project Box Type that extends task could not run:
min box start reached the #3213 refusal and min task run said
"unknown task", because only [tasks] held tasks. [tasks.<name>] is sugar
for type = "task" (BOX-046), so such an entry lives in [boxes].

mfile now reads each [boxes.<name>] entry whose type's built-in root is
task as a task, beside File::tasks, so the client, mctx and the box
host all find it. A task entry with no action, as min init --type task
writes it, leaves the file loading; its run refuses it with exit 3.
The run and the start look the entry up by root, so the box takes the
type's defaults.network (BOX-233). A broken [box_types] refuses the run
with its first error, exit 3. The #3213 refusal is gone.

Spec 28 gains BCLI-090. Docs and an e2e case follow.

Closes #3996. Closes #3213.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimald): record a box's project type, and match type nouns by root

A box started from an entry of a project Box Type now records that type
(`netsess`, `ci`) in its record and its stored spec, with the built-in
root in the spec's `type.root` (BOX-001, BOX-059, BOX-071). The daemon
stamps the record's type from the received spec, else the creating
verb's type, and reports each listed box's root.

Per the owner ruling of 2026-12-03 (#3997), the type
nouns cover the types built on them: `min session list|attach|logs|
stop|rm` and `min task list|logs|stop|rm` match a box by its type or its
built-in root. Spec 29 BOX-001 and spec 28 BCLI-030/032 are amended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimal): refuse a task type's unapplied network keys and send its packages

Review of #4005:

- The refusal of a network key that a task box does not apply now reads
  the layers the entry expands from: its own table, [defaults.<type>]
  and each project type's defaults in its chain. [defaults.task] is no
  layer of a ci entry. [defaults] stays out, as #3671 tracks.
- A task-rooted type's defaults.packages reach the box: the lists sent
  with the entry come from an expansion with the type chain's layers.
- A [boxes.default] task entry with no action is refused as a task,
  exit 3, not as the implicit session's terminal, exit 2.
- cli-min.md says which network keys a task box applies, and that the
  others refuse the run. BCLI-090 gains sub-bullets for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* docs(specs): name gominimal/arch#217 where the type nouns widen to the root

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* test(minimald): resume and restart a box of a project type from its stored spec

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimald): report a project type's root in the reap reply and prune preview

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimal): refuse a [defaults] network key a task drops; open a task type's loadouts

Review of #4005, round 2:

- [defaults] is a layer of every entry (architecture.md line 1408), so
  the refusal of a network key that a task box does not apply now reads
  it too, for every task entry. A session-only key belongs in
  [defaults.session]. An ingress that a more specific mode = "none"
  clears is not refused (gominimal/arch#188).
- task_loadout_mode finds the task entry by its root, not its type's
  name, so a ci entry takes the loadout_mode of its own table and of its
  type's defaults instead of the sealed task default.
- BCLI-090 and the CLI and minimal.toml references say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* test(minimald): expect a shown session box to report its built-in root

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimald): refuse a create whose spec is rooted at another verb's type

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* docs(specs): refuse a create whose spec type is rooted at another verb's type

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimal): let --network none clear a task's inherited ingress

Review of #4005, round 3:

- The refusal of a network key that a task box does not apply takes the
  run's --network flag. --network none clears the ingress of every
  layer (BCLI-024), so that ingress no longer refuses the run. The test
  puts the [defaults] ingress back and checks the run passes without it.
- A run of an entry whose type does not resolve checks the type before
  the terminal, so [boxes.default] of such a type exits 3, not 2.
- BCLI-090's refusal gains the ingress exception, verified for the
  mode = "none" layer and the flag. A stale test comment is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimal): render a task type's entry on the task path in min box spec

min box spec picked the task path by the entry's type name, so a ci
entry, which extends task, rendered on the session path: a network its
run never gives the box, no refusal of an unapplied key, and --ingress
accepted. It now picks the path by the entry's built-in root, as the
run and the start do, and so does the check for a credentialed grant.
box_entry sends env_vars and patches only for a non-task root, so a ci
entry is treated as a [tasks] entry there too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimal): clear a task type's network in min box spec --network none

min box spec of a task-rooted entry kept the egress and ingress its layers
set beside mode none, where min task run --network none clears them. The
spec's task path now clears them the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimald): give the client exit 3 when a create's spec is rooted at another verb's type

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* fix(minimal): refuse env_vars and patches a task type's defaults set

A task box takes its env_vars and patches from its own entry table,
which the box host reads when the task runs. The expansion is not sent
for a task-rooted entry, since the host would then apply the entry's
own values twice. So a ci type's defaults.env_vars or patches were
dropped in silence. The run, the start and min box spec now refuse them
with exit 3, naming the table and the entry to set them in.
[defaults] and [defaults.task] stay the gap of #3266. The box_entry
comments, cli-min.md and BCLI-090 say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

* docs: document [sessions.<name>] entries and [box_types.<name>] types

- minimal-dot-toml.md gains a [sessions.<name>] section beside
  [tasks.*], with an example and the keys a session applies, and a
  [box_types.<name>] section: extends, defaults, constraints,
  description, how an entry names a type, and what each root starts with.
- A short guide, docs/guide/box-types.md, walks through defining a type
  and running an entry of it.
- cli-min.md's box spec section says a spec is rendered from
  minimal.toml each time and not saved.
- min type list prints on stderr how to define a type when the project
  has none.

Fixes #4020
Fixes #4022

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* docs: name the keys a session does not apply, and say a box keeps its spec

arch-review conditions on e1bb4d4: the sessions section names the box
keys a session accepts but does not apply, linking #4035; the guide and
the box spec section say only the render is unsaved, while a box keeps
the spec its creation stored; the agent and service roots link #3197.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* docs: link the issue that applies or refuses the keys a session ignores

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* fix(min): the type list hint holds outside a project too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* docs: a session applies exec_enabled and refuses the keys it does not apply

Matches #4037 (fixes #4036).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* docs: restore the session key text until #4037 merges

This reverts commit a160b21: arch-review C1 on #4033. The sessions
section describes the tree at this head, and #4037 is not in it yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* docs: say only loadout_mode constraints are checked on entries; test the type list hint's streams

Norrie's review of #4033. This release checks a project type's
constraints against an entry only for loadout_mode (check_constraints
has no product caller, #3295), so the guide and the reference say so,
and the example constrains loadout_mode instead of a network mode. The
reference lists every type load error, with no count. cmd_type_list_in
takes a stderr writer, and a test pins that the hint is on stderr alone,
and absent with -o or with a project type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* docs: state only how the software works, with no issue numbers

Karl's rule for the user docs: state true facts about how the software
works, with no 'not yet' or issue-number copy, and no mention of keys
with no implementation. The session table lists exec_enabled, which the
release applies (#4037). The paragraph of accepted-but-unapplied keys
goes. Constraints are documented as the loadout_mode limit they are, and
the task-root env_vars/patches rule and the roots that do not start are
stated as plain facts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* docs: name only session and task as Box Types

Karl's rule: session and task are the Box Types users have. The built-in
list names those two, extends names session, task or another type of
the project, and the line about roots that do not start goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* docs: a task-rooted type that sets env_vars or patches in defaults is refused with exit 3

arch-review C3: the code refuses such a type (refuse_task_type_env),
with exit 3 naming the key and the table. It does not drop the values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

* docs: document [sessions.<name>] entries and [box_types.<name>] types

Rebuilt on main after #4005 and #4008 squash-merged: this PR's own
change over its old stack base, applied unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

---------

Co-authored-by: Karl Godard <karl@minimal.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:must-have Must be done. Applied by the inbox-route classifier or a human. release:0.8.0 Targeted for the 0.8.0 release. Pair with a priority label. review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A box started from a project Box Type records session, not its type

3 participants

0