Repository navigation
fix(minimal,op): min init writes [defaults.task] and [defaults.session], and a fresh project reads - #3392
Conversation
The generated minimal.toml used the legacy [defaults] state_key and top-level [session], so a fresh project read with a legacy hint.
The test input now matches the initializer output, [defaults.task] and [defaults.session], and to_entry_shape keeps those tables as they are.
The example now has [defaults.task], [defaults.session] and [boxes.dev], and the paragraph about the older spellings that init wrote is removed.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Verdict APPROVE, posted as a comment: the App cannot revie 8000 w its own pull request; the check and the label carry it. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. min init now writes [defaults.task] and [defaults.session], as the minimal.toml layout section (architecture.md lines 1204–1205) gives them. to_entry_shape keeps that input and adds [boxes.dev], and it still converts the legacy tables for older files. The new tests check the real initializer output and the absence of a legacy hint. Run just lint-prose docs/guide/setup.md and get the unrelated otel_cli failure green before you take the PR out of draft.
Ruled at bbf7a3d against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
There was a problem hiding this comment.
Reviewed against D3112 at bbf7a3de. generate_mfile writes [defaults.task] state_key and [defaults.session] packages in place of the legacy [defaults] state_key and [session]. generate_mfile_writes_entry_layout_with_no_legacy_tables asserts no top-level [session], no plain key under [defaults], and that the file loads. init_scaffolds_entry_shape_loads_and_starts_with_its_packages runs the new output through to_entry_shape and mfile::legacy::canonicalize and asserts no legacy hint. The setup guide example now matches what init writes, [boxes.dev] included.
Defect
Fixes #3381
crates/op/src/project/init.rscrates/minimal/src/cmd/project.rscrates/minimal/src/tests.rsdocs/guide/setup.mdTask marker
Proof
In a new project, min init now writes a minimal.toml with [defaults.task] state_key and [defaults.session] packages, plus [boxes.dev], and no top-level [session]. The file has none of the legacy tables, so min reads it with no legacy hint. The setup guide shows this output.
Notes from the agent: The op crate has no toml dependency, and its Cargo.toml is outside the layers. So the op test checks the layout with toml_edit and loads the file through mfile::File::from_toml_bytes. The CLI test checks for no legacy hint with mfile::legacy::canonicalize on the written file, because the hint itself goes to stderr. to_entry_shape needed no code change: a [defaults.task] and [defaults.session] input already passes through it unchanged. Only its doc comments changed, and it still converts the legacy shape. The LEGACY_SCAFFOLD test constant is renamed to INIT_SCAFFOLD, because it is no longer legacy. The other init_tests use it only as a valid project file, and all 10 pass. The docs example also shows [boxes.dev], because min init writes it. just lint-prose was not run: vale is not installed on this box.
Tests
cargo test -p op generate_mfile_writes_entry_layout_with_no_legacy_tablescargo test -p minimal init_scaffolds_entry_shape_loads_and_starts_with_its_packagescargo test -p op generate_mfileVerify
min task run agent-verifyexited 100, so this PR is a draft.