Repository navigation
fix(minimald): record a box's project type, and match type nouns by root - #4008
Conversation
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
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
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
/arch-review |
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
|
Approved: no findings at Nothing to do. Clobber: none seen in the diff. |
…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
…e' into fix/3997-record-project-box-type
There was a problem hiding this comment.
Reviewed the stacked diff against fix/3996-start-task-root-box-type.
Stored-record compatibility holds:
Recordgains no field.BoxListingEntry::type_rootis serde-defaulted and skipped when empty, and the struct is notdeny_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_nounpins 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
|
/arch-review |
There was a problem hiding this comment.
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.
…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
|
/arch-review |
|
@coderabbitai review |
|
/arch-review |
There was a problem hiding this comment.
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.
|
/review |
|
@coderabbitai review |
Action not completed
|
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
…e' into fix/3997-record-project-box-type
|
/arch-review |
|
@coderabbitai review |
|
/review |
Action not completed
|
There was a problem hiding this comment.
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.
|
/review |
|
@coderabbitai review |
Action performed
|
There was a problem hiding this comment.
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 (
VerbRootRefusalreachedminwithout its exit code): fixed in 3010d73.admission_refusalnow downcastsVerbRootRefusaland returns its exit code, so the BOX-160 arm inrpc.rsreplies withexit_code: Some(3).create_refuses_a_spec_rooted_at_another_verbs_typenow assertsadmission_refusal(&err) == Some(3)for each case. The newverb_root_refusal_reply_carries_exit_codeinrpc.rssends aci-rooted-at-taskspec on the session verb over the wire. It pins the text,exit_code == Some(3),code/hintasNone, and that no box is listed. Task-verb creates go through the sameCreateSessionarm, so they are covered by the same branch. - Low (stale
rc-task-as-sessioncomment): still unfixed.crates/minimald/src/box_manager/tests.rsline 7853 still says "The session verb files the box assessionwhateverbox.typesays". Since this PR, the record takes the spec's type, andverb_root_refusalrefuses 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 staleroot_constraint_refusaldoc: 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
…ct-box-type # Conflicts: # crates/minimal/src/task.rs # docs/specs/28-spec-box-cli/28-spec-box-cli.md
|
/arch-review |
There was a problem hiding this comment.
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.
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
…#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>
Why
A box started from an entry of a project Box Type, such as
netsess(extendssession) orci(extendstask), recordedsessionortask, 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/logsandmin task list/stop/rm/logsinclude boxes whose type extendssessionortask. So recording the real type hides nothing from the type nouns.Closes #3997
What changes
type.root(spec 29 BOX-071 and BOX-160), and the daemon already reads it at admission (spec_type_rootandTypeFacts::of_spec).mfile::spec::BoxSpecnow writes and reads a top-level[type] root(type_root). For a project type,take_entry_type(expanded)setsbox.typeto the type andtype.rootto its built-in root.for_session_entryand the task path (put_task_spec) both use it. A built-in type writes no[type]table, so the stored bytes of a plainsessionortaskbox are unchanged.Entrypoint::implieddecides by the root.record_box_type()inbox_manager.rstakes the record's type from the received spec, replacing the match on the creating verb.BoxListingEntryhas a newtype_rootfield, serde-defaulted and skipped when empty. The daemon fills it from the stored spec (listed_type_root), with no newRecordfield.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 typedstop,rmandlogs);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.type_root, from an older daemon, matches by exact type as before. A stored spec with no[type]table reads as before.session. Both cite the ruling, and no new ids were needed.cli-min.mdcoverssession 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, includingspec_names_project_box_type_and_root.just test-one … -p minimald --lib(create, listing, upgrade, admission, root): 115 passed, includingcreate_records_the_project_type_its_spec_names. That test coversnetsessandcirecording and storing their type, plainsession, a spec-less task create gettingtask, 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, anagent-rooted type, and a record with no type.type_nouns_cover_project_types_built_on_them: on the harness daemon,min session listlists anetsessbox,min session attachfinds it and refuses acibox,min task listlists thecibox, and the typed stop/rm/logs resolve and refuse as expected.task_type_entry_run_takes_its_type_network, which now also checks the storedciand roottask.just test-one listing -p minimald-rpc: 1 passed.just fmt-check, the workspacejust clippyandjust clippy-strictare clean. spec-lint reports nothing on the touched lines.just e2eandjust test-vm. Vale is not installed.🤖 Generated with Claude Code
https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
Summary by CodeRabbit