8000 T17 — Read the legacy tables for one release with a hint by minimal-foundry[bot] · Pull Request #3105 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T17 — Read the legacy tables for one release with a hint - #3105

Merged
agent-137 merged 9 commits into
mainfrom
agent/2411-read-the-legacy-tables-for-one-release-with-a-hi
Nov 7, 2026
Merged

agent-137 merged 9 commits into
mainfrom
agent/2411-read-the-legacy-tables-for-one-release-with-a-hi

Conversation

@minimal-foundry
@minimal-foundry minimal-foundry Bot commented Nov 6, 2026 •
Copy link
Copy Markdown
Contributor

T17 — Read the legacy tables for one release with a hint

slice: S4
kind: task
covers: BOX-049, BOX-050, BOX-051, BOX-052, BOX-054
size: L
est: 440 code, 420 tests
executor: agent
difficulty: routine
model: standard
diagnostics: one hint per legacy table read
observability: none: parsing emits only hints
layers:
- legacy:
- crates/mfile/src/legacy.rs (new): legacy tables, hint until 0.8.0
- crates/mfile/src/lib.rs: mod line
- crates/mfile/src/tasks.rs: interactive task refused
test: cargo nextest run -p mfile flat_per_ent 8000 ry_keys_and_legacy_keys_keep_meaning
test: cargo nextest run -p mfile legacy_session_table_reads_as_defaults_session_with_hint
test: cargo nextest run -p mfile legacy_tables_exit3_after_grace_release
test: cargo nextest run -p mfile legacy_defaults_task_keys_with_hint
test: cargo nextest run -p mfile legacy_params_reads_as_args_with_hint
test: cargo nextest run -p mfile interactive_task_exit3_names_session
- fixtures:
- crates/mctx/testdata/fakerepo/minimal.toml: no interactive
- crates/mctx/testdata/fake-ancestor/minimal.toml: no interactive
test: cargo nextest run -p mctx mfile_search_strategy_override
- docs:
- docs/reference/minimal-dot-toml.md: entry tables and legacy release
- docs/guide/dev-shell.md: entry tables
- docs/guide/setup.md: entry tables
- docs/guide/packages.md: entry tables
- docs/guide/agents.md: entry tables
produces: none
consumes:
- crates/mfile/src/expand.rs
proof: A [session]-only project still starts, with a hint.
depends on:
- blocked by #2410

Proof

A project whose minimal.toml has only a [session] table still loads: File::from_toml_bytes reads it into the session contribution. Each read prints one line on stderr: "hint: Rename [session] to [defaults.session] in minimal.toml. Release 0.9.0 and later refuse [session]." The new spelling [defaults.session] also loads the same contribution on this release.

Notes from the agent: Files outside the layers: crates/mfile/src/error.rs gets two exit-3 variants, Error::LegacyTable and Error::InteractiveTask. Error is defined there, so this was the only place for them. crates/mfile/Cargo.toml and Cargo.lock add the workspace version crate, so the parser knows the release it runs as. lib.rs changes more than the mod line: File::parse calls legacy::settle and prints each hint, and File::validate calls Task::refuse_interactive.

Grace window: this tree builds as 0.8.0-dev (workspace package.version = 0.8.0). So the one release that reads the legacy tables is 0.8, and 0.9.0 is the first release that refuses them. Its pre-releases (0.9.0-dev.*) refuse too. legacy::REFUSING_RELEASE = (0, 9, 0). I read the task's 'hint until 0.8.0' as 'through 0.8'. If the plan meant that 0.8.0 itself refuses, change that constant and the pinned texts.

The production File keeps the old field layout. To make the hint's advice work on this release, legacy::settle also reads [defaults.session] into File::session, [defaults.task] state_key and profile into File::defaults, and [args] into File::params. legacy::canonicalize does the same rewrite on a raw document for the entry expansion. Nothing in production calls it yet.

Follow-ups outside the layers: min init (crates/op/src/project/init.rs) still writes [session] and [defaults] state_key, and min add (crates/mctx/src/lib.rs AddDepMode::SessionPackages) still writes [session]. So a new project prints hints from its first read. When a file has both [session] and [defaults.session], lists union, so the packages that min add …[truncated]

Tests

line exit tail
cargo nextest run -p mfile flat_per_entry_keys_and_legacy_keys_keep_meaning 0 Applying loadouts: default Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling version v0.8.0 (/workbench/crates/version) Compiling paths v0.0.1 (/workbench/crates/p
cargo nextest run -p mfile legacy_session_table_reads_as_defaults_session_with_hint 0 Applying loadouts: default Running task runtime-implement-test-1 in box runtime-implement-test-1-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 17.06s ──────────── Nextest run ID
cargo nextest run -p mfile legacy_tables_exit3_after_grace_release 0 Applying loadouts: default Running task runtime-implement-test-2 in box runtime-implement-test-2-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 14.44s ──────────── Nextest run ID
cargo nextest run -p mfile legacy_defaults_task_keys_with_hint 0 Applying loadouts: default Running task runtime-implement-test-3 in box runtime-implement-test-3-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 16.28s ──────────── Nextest run ID
cargo nextest run -p mfile legacy_params_reads_as_args_with_hint 0 Applying loadouts: default Running task runtime-implement-test-4 in box runtime-implement-test-4-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 15.70s ──────────── Nextest run ID
cargo nextest run -p mfile interactive_task_exit3_names_session 0 Applying loadouts: default Running task runtime-implement-test-5 in box runtime-implement-test-5-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 14.48s ──────────── Nextest run ID
cargo nextest run -p mctx mfile_search_strategy_override 0 Applying loadouts: default Running task runtime-implement-test-6 in box runtime-implement-test-6-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling version v0.8.0 (/workbench/crates/version) Compiling paths v0.0.1 (/workbench/crates/p

Verify

min task run agent-verify passed ([tasks.verify]).

Out of scope

These files are outside the task's layers:, so this PR is a draft:

  • crates/mfile/Cargo.toml
  • crates/mfile/src/error.rs

Residuals

Closes #2411

[session] reads as [defaults.session], state_key and profile under
[defaults] read as [defaults.task], and [params] reads as [args]
(BOX-050, BOX-051, BOX-052). Each read prints one hint. From 0.9.0
each legacy table fails with exit 3 and carries the same hint. The
loaded File also reads the new spellings, so the hint's advice works
on this release.

A task that sets interactive = true fails with exit 3 and names the
[sessions.<name>] entry to declare instead (BOX-054).
A task can no longer set interactive = true (BOX-054).
min add still writes [session], so a file can carry it beside
[defaults.session]. The packages it adds now stay.
The reference and the guides write [defaults.session], [defaults.task]
and [args], describe the entry tables, and list the older spellings
that release 0.8 reads with a hint.
@coderabbitai
coderabbitai Bot commented Nov 6, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

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: 286ad891-8f2b-476e-adce-6fbb97861945

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

Use the checkbox below for a quick retry:

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

The default package repository declares interactive tasks. The graph
loads it as a layer and never runs its tasks, so refusing them broke
min init and every session that scaffolds a minimal.toml. The project's
own file keeps the refusal.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a failed check suite, pushed as 6e045f0408e1.

line exit tail
cargo nextest run -p mfile flat_per_entry_keys_and_legacy_keys_keep_meaning 0 Applying loadouts: default Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling version v0.8.0 (/workbench/crates/version) Compiling paths v0.0.1 (/workbench/crates/p
cargo nextest run -p mfile legacy_session_table_reads_as_defaults_session_with_hint 0 Applying loadouts: default Running task runtime-implement-test-1 in box runtime-implement-test-1-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 13.64s ──────────── Nextest run ID
cargo nextest run -p mfile legacy_tables_exit3_after_grace_release 0 Applying loadouts: default Running task runtime-implement-test-2 in box runtime-implement-test-2-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 13.38s ──────────── Nextest run ID
cargo nextest run -p mfile legacy_defaults_task_keys_with_hint 0 Applying loadouts: default Running task runtime-implement-test-3 in box runtime-implement-test-3-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 14.03s ──────────── Nextest run ID
cargo nextest run -p mfile legacy_params_reads_as_args_with_hint 0 Applying loadouts: default Running task runtime-implement-test-4 in box runtime-implement-test-4-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 13.96s ──────────── Nextest run ID
cargo nextest run -p mfile interactive_task_exit3_names_session 0 Applying loadouts: default Running task runtime-implement-test-5 in box runtime-implement-test-5-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 13.74s ──────────── Nextest run ID
cargo nextest run -p mctx mfile_search_strategy_override 0 Applying loadouts: default Running task runtime-implement-test-6 in box runtime-implement-test-6-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling version v0.8.0 (/workbench/crates/version) Compiling paths v0.0.1 (/workbench/crates/p

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/decode/src/lib.rs
  • crates/mfile/Cargo.toml
  • crates/mfile/src/error.rs

Converted to a draft: something above needs a person before review.

A project with only a [session] table, or no minimal.toml at all, starts a session again. The file is read as [defaults.session] and one hint prints for it. The default package repository no longer blocks min init or the session scaffold.

Notes from the agent: Cause of the native-daemon-e2e failure: I reproduced it with scripts/session-e2e.sh skip_scaffold. The hidden cause line was: [tasks.claude] in minimal.toml sets interactive = true. That file is the minimal.toml of the default package repository (github.com/gominimal/pkgs), which declares [tasks.shell], [tasks.claude] and [tasks.opencode] with interactive = true. decode::Layer::new loads every graph layer through File::from_dir, and from_dir ran the new BOX-054 refusal. So min init and every daemon scaffold failed. Fix: a new File::from_dir_for_graph runs every check except the interactive-task refusal. decode::Layer::new uses it, because the graph reads only [upstream], [params] and [stdlib] from a layer and never runs its tasks. The project's own file keeps the refusal through File::from_dir, and interactive_task_exit3_names_session now pins both loads. Out of layers: crates/decode/src/lib.rs (one call site) needed this change. crates/mfile/src/error.rs and Cargo.toml were touched in round 0 too. Follow-up: gominimal/pkgs will need [sessions.*] entries in place of its interactive tasks before an interactive task in a project file can be the only spelling. On this box, the skip_scaffold proof still fails after activation, at min session exec, with 'Minimal cannot read the box's process namespace'. That is a limit of this sandbox, not of the change. CI is the record for that step. test-kvm and ci-linux-kvm-success failed with '/dev/kvm not present on this runner'. That is a runner fault, and no code change addresses it. I did not run just clippy-strict.

@agent-137
agent-137 marked this pull request as ready for review November 6, 2026 23:21
@agent-137
agent-137 requested a review from a team as a code owner November 6, 2026 23:21
@agent-137
Copy link
Copy Markdown
Member

/review

@minimal-foundry
minimal-foundry Bot commented Nov 6, 2026 •
Copy link
Copy Markdown
Contributor Author

Reviewed: 1 finding, none blocking at b6e5378308ee.

Address the comments on the diff.

Clobber: none seen.

Not on the diff:

  • medium crates/mfile/src/lib.rs:1025-1028 — MEDIUM · correctness · confidence 0.55 · in File::parse parse runs legacy::settle for every load, including from_dir_for_graph. That loader exists because the user cannot edit an upstream layer. The interactive check skips such layers, but the legacy check does not. The graph reads a layer's [params] (see decode/src/lib.rs). So an upstream package repo with [params] prints a h… (same line as correctness's medium finding)

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

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 2 findings, 1 inline.

Panel: 1 of 3 personas ran (correctness); did not complete: security, supply-chain.

Comment thread crates/mfile/src/lib.rs Resolved
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on the runtime's review findings: the coder changed nothing. Revise round 2: no change. The one thread is outside the task layers. The finding is correct as of this branch: crates/op/src/project/init.rs:199-203 writes [defaults] state_key and [session], and crates/mctx/src/lib.rs:1399-1408 (min add, AddDepMode::SessionPackages) inserts a top-level session table. Both files are outside this task's layers. A follow-up task must change those two writers to [defaults.task] state_key and [defaults.session] before the 0.9.0 refusal ships, and update their tests and any init fixtures. I ran no tests this round because no file changed.

Review threads the coder judged:

  • 👎 invalid — crates/mfile/src/lib.rs:1028: The premise holds, but the fix is outside this task's layers. It needs crates/op/src/project/init.rs (min init writes [defaults] state_key and [session]) and crates/mctx/src/lib.rs (min add inserts a top-level session table). These writers need their own task before the 0.9.0 refusal ships.

@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_WITH_CONDITIONS · 1 condition · the full ruling

The legacy tables read as their new places for release 0.8, with one hint on each read. From 0.9.0 they exit 3, as BOX-050 to BOX-052 and the minimal.toml layout lines 1172–1175 say. The interactive-task refusal follows line 1184. The PR body names follow-ups without issues: min init and min add still write [session] and [defaults] state_key. Make the issues and link them, as C1 says. The escalation about package repository layers needs a design decision. It does not block this change for project files.

Ruled at 6e045f0 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.

Comment thread crates/mfile/src/lib.rs Resolved
Comment thread crates/decode/src/lib.rs Resolved
@agent-137 agent-137 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 against T17's plan block (BOX-049..052, BOX-054). legacy.rs reads [session], state_key/profile under [defaults], and [params] as their new locations for one release (0.8) with one hint each, and refuses them with exit 3 from 0.9.0 (REFUSING_RELEASE); each hint names the change and the refusing release. An interactive task exits 3 naming the [sessions.*] form. All planned tests are present (legacy.rs:379-615; tasks.rs interactive_task_exit3_names_session). The two out-of-layer files follow from the plan (Error variants live in error.rs; the version dep for the release check). Residuals: #3112, #3113, and gominimal/arch#171 for package-repository layer files.

@agent-137
agent-137 added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 7, 2026
@agent-137
Copy link
Copy Markdown
Member

/revise Merge main into this branch. It conflicts in crates/mfile/src/lib.rs only, after #3106 (T19, adds mod network and network handling) and #3104 (T20 spec layer) merged. Keep both sides: this PR's legacy module, Error::LegacyTable/InteractiveTask wiring and legacy::settle call, and main's network module and its additions. Change nothing else; keep the body's Residuals list (#3112, #3113, gominimal/arch#171).

…egacy-tables-for-one-release-with-a-hi

# Conflicts:
#	crates/mfile/src/lib.rs
@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_WITH_CONDITIONS · 1 condition · the full ruling

The branch is the same as on 6e045f04, and the merge of main is clean. BOX-049 to BOX-054 conform as before. The merge adds crates/mfile/src/network.rs (#3106), which accepts the legacy mode spellings and the flat egress keys for one release. Nothing refuses them after that release. BOX-050's sub-clause and architecture.md lines 917–919 require that refusal. C1 puts them behind legacy::REFUSING_RELEASE. You can merge with C1 open when a filed issue for it is in the PR body.

Ruled at b6e5378 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.

Comment thread crates/mfile/src/legacy.rs Resolved
Comment thread crates/mfile/src/legacy.rs Resolved
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as b6e5378308ee.

Resolved conflicts in: crates/mfile/src/lib.rs

line exit tail
cargo nextest run -p mfile flat_per_entry_keys_and_legacy_keys_keep_meaning 0 Applying loadouts: default Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling version v0.8.0 (/workbench/crates/version) Compiling paths v0.0.1 (/workbench/crates/p
cargo nextest run -p mfile legacy_session_table_reads_as_defaults_session_with_hint 0 Applying loadouts: default Running task runtime-implement-test-1 in box runtime-implement-test-1-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 9.69s ──────────── Nextest run ID
cargo nextest run -p mfile legacy_tables_exit3_after_grace_release 0 Applying loadouts: default Running task runtime-implement-test-2 in box runtime-implement-test-2-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 10.79s ──────────── Nextest run ID
cargo nextest run -p mfile legacy_defaults_task_keys_with_hint 0 Applying loadouts: default Running task runtime-implement-test-3 in box runtime-implement-test-3-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 9.52s ──────────── Nextest run ID
cargo nextest run -p mfile legacy_params_reads_as_args_with_hint 0 Applying loadouts: default Running task runtime-implement-test-4 in box runtime-implement-test-4-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 11.31s ──────────── Nextest run ID
cargo nextest run -p mfile interactive_task_exit3_names_session 0 Applying loadouts: default Running task runtime-implement-test-5 in box runtime-implement-test-5-1... Compiling version v0.8.0 (/workbench/crates/version) Compiling mfile v0.0.1 (/workbench/crates/mfile) Finished 'test' profile [unoptimized] target(s) in 9.38s ──────────── Nextest run ID
cargo nextest run -p mctx mfile_search_strategy_override 0 Applying loadouts: default Running task runtime-implement-test-6 in box runtime-implement-test-6-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling version v0.8.0 (/workbench/crates/version) Compiling paths v0.0.1 (/workbench/crates/p

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/decode/src/lib.rs
  • crates/mfile/Cargo.toml
  • crates/mfile/src/error.rs

Converted to a draft: something above needs a person before review.

A project with only a [session] table still loads and starts. It prints one hint for each legacy table it reads. The branch now also contains main's network module.

Notes from the agent: Revise round 3: merged origin/main. The only conflict was the module list in crates/mfile/src/lib.rs. The resolution keeps both pub mod legacy; and pub mod network;. The Error::LegacyTable and InteractiveTask wiring and the legacy::settle call came through the merge without change. No other edit. The other files in the merge commit come from main. cargo clippy -p mfile --all-targets is clean.

@agent-137
agent-137 marked this pull request as ready for review November 7, 2026 01:34
@agent-137 agent-137 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-reviewed after the base merge. The new head only merges main (#3086, #3106, #3104), resolving crates/mfile/src/lib.rs to keep both this PR's legacy module and main's network module; all lanes are green on it. My earlier review of T17's work stands. Arch's new C1 (legacy network spellings refused past grace) is residual #3120 in the body.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T17 — Read the legacy tables for one release with a hint

1 participant

0