8000 fix(minimal,op): min init writes [defaults.task] and [defaults.session], and a fresh project reads by minimal-foundry[bot] · Pull Request #3392 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimal,op): min init writes [defaults.task] and [defaults.session], and a fresh project reads - #3392

Merged
norrietaylor merged 3 commits into
mainfrom
agent/3381-min-init-writes-defaults-task-and-defaults-sessi
Nov 13, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
agent/3381-min-init-writes-defaults-task-and-defaults-sessi

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

Defect

Fixes #3381

Task marker
### D3112 — min init writes [defaults.task] and [defaults.session], and a fresh project reads with no legacy hint
  kind: task
  size: S
  est: 25 code, 45 tests
  executor: agent
  defect: bug
  epic: 2236
  layers:
    - op:
      - crates/op/src/project/init.rs: generate_mfile writes [defaults.task] state_key and [defaults.session] packages in place of [defaults] state_key and [session], and its tests assert the entry layout
      test: cargo test -p op generate_mfile_writes_entry_layout_with_no_legacy_tables
    - cli:
      - crates/minimal/src/cmd/project.rs: to_entry_shape keeps a [defaults.task] and [defaults.session] input as is, and the LEGACY_SCAFFOLD test input and doc comments match the new initializer output
      - crates/minimal/src/tests.rs: GENERATED in init_scaffolds_entry_shape_loads_and_starts_with_its_packages uses the new init output, and the test asserts that the load gives no legacy hint
      test: cargo test -p minimal init_scaffolds_entry_shape_loads_and_starts_with_its_packages
    - docs:
      - docs/guide/setup.md: the min init example shows [defaults.task] and [defaults.session], and the paragraph about the older spellings that init writes is removed
      test: cargo test -p op generate_mfile
  proof: In a new project, min init writes a minimal.toml with [defaults.task] and [defaults.session] and no top-level [session], and min reads that file with no legacy hint.

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

line exit tail
cargo test -p op generate_mfile_writes_entry_layout_with_no_legacy_tables 0 running 1 test test project::init::tests::generate_mfile_writes_entry_layout_with_no_legacy_tables ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 53 filtered out; finished in 0.00s warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in tas
cargo test -p minimal init_scaffolds_entry_shape_loads_and_starts_with_its_packages 0 ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 954 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 34 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 15
cargo test -p op generate_mfile 0 running 3 tests test project::init::tests::generate_mfile_falls_back_to_upstream_with_session ... ok test project::init::tests::generate_mfile_renders_git_origin_and_matched_stack ... ok test project::init::tests::generate_mfile_writes_entry_layout_with_no_legacy_tables ... ok test result: ok. 3 p

Verify

min task run agent-verify exited 100, so this PR is a draft.

 {
                "parent_span_id": "be9f9d638c5a5fe0",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "66b34a8d93c1e342",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "66b34a8d93c1e342",
                "queued_behind": "0",
                "span_id": "42278c31a73dd11e",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "be9f9d638c5a5fe0",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "c690a805fa2f330e",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "c690a805fa2f330e",
                "queued_behind": "0",
                "span_id": "4c8d787f76609139",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "c690a805fa2f330e",
                "queued_behind": "0",
                "span_id": "308707cfe929a21f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "308707cfe929a21f",
                "span_id": "07b1bc66e11f8b7b",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "308707cfe929a21f",
                "queued_behind": "0",
                "span_id": "a46b17ad0097fe1a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  63.148s] 1169 tests run: 1168 passed, 1 failed, 2 skipped
        FAIL [   2.821s] (1169/1169) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

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.
@coderabbitai
coderabbitai Bot commented Nov 13, 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: 9d4a474e-5265-4961-9527-9b518681181e

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

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

Approved: no findings at bbf7a3defa8f.

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.

@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 · 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.

@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 — 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 Nov 13, 2026
@norrietaylor norrietaylor 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 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.

@norrietaylor
norrietaylor added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 0450986 Nov 13, 2026
40 checks passed
@norrietaylor
norrietaylor deleted the agent/3381-min-init-writes-defaults-task-and-defaults-sessi branch November 13, 2026 16:14
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.

D3112 — min init writes [defaults.task] and [defaults.session], and a fresh project reads with no legacy hint

1 participant

0