Repository navigation
fix(mfile): refuse minimal.toml keys this release does not support yet, and a pty_enabled the root excludes - #4081
Open
minimal-backporter[bot] wants to merge 1 commit into
Conversation
…t, and a pty_enabled the root excludes (#4067) * fix(mfile): refuse minimal.toml keys that no box applies Owner ruling (#4038): a key with no working implementation is not a box setting. The expansion now refuses, with exit 3, for every box: volumes, loadouts, flat name, box.type, execution.exec, [install], the io mimetype keys, on_oom, restart, file_imports, github_imports, otel, machine, nesting, github_token_mode, profile, and an entry's params or upstream. A key that 0.7 read or a committed minimal.toml sets carries a hint: profile names packages, name names box.name, and the keys of the architecture's example say that nothing replaces them. A [defaults] profile is no longer moved to [defaults.task], so the refusal names the table that set it. The projection fills a GitHub grant's mode from the root's token mode; the BOX-071 field set and the golden digests are unchanged. A stored spec that carries a removed key still reads back, so its box resumes. Also fixes the BoxSpec docs that said minimald reads neither lifetime nor timeout (#4034), and narrows spec 29 BOX-049, BOX-051, BOX-076, BOX-085 and BOX-145 to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * fix(mfile): refuse a pty_enabled that the entry's built-in root excludes pty_enabled stays a box setting, and follows the entry's built-in root (BOX-160): a session always has a terminal and a task never has one. The expansion now refuses, with exit 3, a session-rooted entry that sets pty_enabled = false and a task-rooted entry that sets it to true, flat or under [io], from any layer. The error names the key as the layer wrote it, the layer and the root. The root's own value is accepted. The check runs in the expansion, so min box spec refuses what min box start, min session start and min task run refuse, and the two no longer disagree on the value. Closes #4044 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * fix(mfile): refuse an unapplied key or terminal value in the layer that set it A more specific layer's table replaces a lower layer's whole, so `[defaults.execution] restart` under an entry's own `[execution]` never reached the expanded spec, and the check after the fold missed it. The expansion now checks the refused keys, and an upstream from any layer but the top-level [upstream], in every layer before the fold, naming the layer that set the key. pty_enabled is checked the same way: for each spelling, the last layer that sets it decides, so a later layer's own value still overrides, and a lower [io] pty_enabled that a later [io] table drops is still refused. Spec 29 names the two gaps left open: #4069 (a session entry's task action keys) and #4070 (constraints on keys no entry may set). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * fix(mfile): refuse box.toml keys as not supported yet, and keep them in the schema Owner direction (#4067): the keys the architecture's box.toml specifies and this release does not implement stay legal, and are refused until each ships. They are back in SPEC_KEYS and the section schemas: volumes and box.volumes, nesting, file_imports, github_imports, github_token_mode, otel, machine, on_oom and execution.on_oom, restart and execution.restart, an entry's params, install.raw_packages and the io mimetype keys. One constant, mfile::expand::NOT_SUPPORTED_YET, holds the set, and its doc comment says docs must not describe them as usable. Any layer that sets one fails with exit 3: "<layer> in minimal.toml sets `<key>`, which this release does not support yet. Remove `<key>` to start the box." A key that another key replaces keeps its refusal as not a box setting: profile, flat name, box.type, execution.exec, install.packages, entry loadouts, and upstream outside the top level. install.packages and box.type now name their replacement. The projection is back to main's, so the BOX-071 field set and the golden digests are unchanged. Spec 29 restores BOX-049, BOX-076, BOX-085 and the BOX-071 token-mode bullet, adds one sub-requirement for the not-supported-yet refusal, and rewrites the 2026-12-04 reasoning to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * docs: remove mentions of features this release does not implement Owner direction (#4067): the user docs describe only what main does. - tasks.md, minimal-dot-toml.md: a task does not take env_vars from [defaults] or [defaults.task] (#3266), so drop the merge claim and its examples. - minimal-dot-toml.md: drop [agents.<name>] and [services.<name>] from the entry tables, which no start accepts (BOX-063), and the note on a `uses` secret that is not delivered yet. - cli-min.md: min task run keeps vpn_network_names and does not apply it; drop the issue that tracks a stored-spec rebuild, and the test coverage notes under min net forward. - loadouts.md: subcommands.forward no longer mentions nested sessions. - install.md: 0.8 reads vars and vars_lenient with a hint; only 0.9.0 refuses them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * fix(mfile): take an entry's flat name as the box's written name The architecture's example writes a box's name as a flat `name` in its entry. The expansion now moves it to `box.name`, so a start names the box from it and `min box spec` renders it there. One value in both keys is kept. Two different values fail with exit 3, naming each key and the layer that set it. The flat key leaves the replaced keys, and its hint goes away. In the pty_enabled check, only a true or false value now supersedes a lower one, so a malformed value cannot hide an excluded `false`. The shape check still refuses a malformed value that the fold keeps. Spec 29 adds the flat name to BOX-049 and drops it from the replaced keys, and notes that each not-supported-yet key leaves that list when its feature ships. The reference says when `profile` is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * fix(mfile): name a task's exec as the replacement for execution.exec execution.exec now carries a hint, as BOX-076 requires of a replaced key: "A task entry's command is its `exec` key. Move the value to `exec` in the same table." It names the task entry's key, so it does not promise that a session runs it (#4069). The minimal.toml reference now says what `uses` does with a service's secret: it adds a [secrets] entry under the service's variable, a declared broker or store entry takes its place, and a client_env entry or an env_vars value for that variable fails with exit 3. Spec 29 narrows the stored-spec claim to the keys a stored spec keeps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * docs(specs): link each not-supported-yet key to its owner issue Each key in NOT_SUPPORTED_YET now names the issue whose fix takes it off the list, in spec 29's Non-goals and in the constant's doc comment. The user docs still name none of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * test(mfile): pin that a [defaults] profile is no legacy refusal at 0.9.0 At the refusing release the legacy pass leaves a profile under [defaults] in place, so the expansion's "Profiles were removed" hint is what the user reads, not a legacy refusal that points at [defaults.task]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA --------- Co-authored-by: Karl Godard <karl@minimal.dev> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 8d1df13)
8000
Contributor
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
Contributor
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
Contributor
|
Approved: no findings at Nothing to do. Clobber: none seen: HEAD is the cherry-pick on top of the base. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #4067 to
release/0.8.x.Squash-merge this PR and keep the PR title as the subject. The cherry-picked commit keeps the source subject.