Repository navigation
T17 — Read the legacy tables for one release with a hint - #3105
Conversation
[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.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
…egacy-tables-for-one-release-with-a-hi
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.
…egacy-tables-for-one-release-with-a-hi
|
Round 1 of 10 on a failed check suite, pushed as
Verify Outside the task's
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 |
|
/review |
|
Reviewed: 1 finding, none blocking at Address the comments on the diff. Clobber: none seen. Not on the diff:
|
|
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 Review threads the coder judged:
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
/revise Merge |
…egacy-tables-for-one-release-with-a-hi # Conflicts: # crates/mfile/src/lib.rs
There was a problem hiding this comment.
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.
|
Round 3 of 10 on a /revise note, pushed as Resolved conflicts in:
Verify Outside the task's
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 |
There was a problem hiding this comment.
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.
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
versioncrate, 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, andmin 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 thatmin add…[truncated]Tests
cargo nextest run -p mfile flat_per_entry_keys_and_legacy_keys_keep_meaningcargo nextest run -p mfile legacy_session_table_reads_as_defaults_session_with_hintcargo nextest run -p mfile legacy_tables_exit3_after_grace_releasecargo nextest run -p mfile legacy_defaults_task_keys_with_hintcargo nextest run -p mfile legacy_params_reads_as_args_with_hintcargo nextest run -p mfile interactive_task_exit3_names_sessioncargo nextest run -p mctx mfile_search_strategy_overrideVerify
min task run agent-verifypassed ([tasks.verify]).Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/mfile/Cargo.tomlcrates/mfile/src/error.rsResiduals
crates/op/src/project/init.rsstill writes[defaults] state_keyand[session]; on 0.9.0 such a file exits 3: fix(op): min init writes [defaults.task] and [defaults.session], not the legacy tables #3112.crates/mctx/src/lib.rsAddDepMode::SessionPackagesstill writes[session]; on 0.9.0 such a file exits 3: fix(mctx): adding a session package writes [defaults.session], not [session] #3113.minimal.tomllayers get the legacy grace and the 0.9.0 refusal (they load throughFile::from_dir_for_graph, which runslegacy::settle; in a layer[params]is the package-parameter schema) is a design question: https://github.com/gominimal/arch/issues/171 (arch ruling 1034). Decided before 0.9.0.network::canonicalizemust refuse a legacymodespelling or flat egress key with exit 3 and the same hint, aslegacyrefuses its tables: fix(mfile): refuse legacy network spellings with exit 3 after the grace release #3120 (arch ruling 1037, C1).Closes #2411