8000 fix(mfile): refuse minimal.toml keys this release does not support yet, and a pty_enabled the root excludes by minimal-backporter[bot] · Pull Request #4081 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

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
release/0.8.xfrom
backport/4067-to-release/0.8.x
Open

minimal-backporter[bot] wants to merge 1 commit into
release/0.8.xfrom
backport/4067-to-release/0.8.x

Conversation

@minimal-backporter
Copy link
Copy Markdown
Contributor

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.

…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)
@coderabbitai
coderabbitai Bot commented Dec 5, 2026
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot 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.

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: Advanced
  • Run ID: 4593f371-e82b-4f5f-a8bc-d738c83a65e6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Spec lint

docs/specs/29-spec-box-local-first/29-spec-box-local-first.md — 19 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:420: 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:442: 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:641: P004 BOX-242 names test 'uses_merges_as_a_whole_network_key', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:702: 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:737: 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:742: P004 BOX-226 names test 'expansion_reports_name_and_project_name_provenance', which was not found in the repository
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:754: R004 BOX-239 is reused; it was already defined on line 589. IDs are the join key and are never reused
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:762: R004 BOX-240 is reused; it was already defined on line 600. IDs are the join key and are never reused
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:775: R004 BOX-241 is reused; it was already defined on line 617. IDs are the join key and are never reused
docs/specs/29-spec-box-local-first/29-spec-box-local-first.md:782: R004 BOX-242 is reused; it was already defined on line 639. IDs are the join key and are never reused

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

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

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

Approved: no findings at d4214240d419.

Nothing to do.

Clobber: none seen: HEAD is the cherry-pick on top of the base.

@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 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0