Skip to content

fix(mfile): refuse a minimal.toml that still spells the stack table [harness] - #2162

Merged
norrietaylor merged 1 commit into
mainfrom
inbox-patch/fix/harness-table-hard-error-6c37a2e36c358382
Oct 11, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
inbox-patch/fix/harness-table-hard-error-6c37a2e36c358382

Conversation

@gominimal-aw-bot

@gominimal-aw-bot gominimal-aw-bot Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABWX-XDw

A minimal.toml spelling the stack table [harness] — the pre-v0.5.0 name — only warned as an unknown field and loaded with no stack, so the missing toolchain surfaced much later as error: linker 'cc' not found from a build inside the session. File::validate now refuses the table at load, so every disk load fails before any session is built, with a message naming the rename to [stack] (informed by #192, which retired the spelling). Both disk loaders (from_dir, from_dir_recursive) run validate; File::from_toml_bytes does not. The misplaced_top_level_key hint is folded into the error and the reference doc now says the load fails instead of warning.

Verification

  • cargo fmt --all --check --locked — clean
  • cargo clippy --workspace --all-targets --locked -- -D warnings — clean
  • cargo test --locked -p mfile — 69 passed, 0 failed (incl. rewritten harness_table_no_longer_parses, which now expects the load error)
  • Reproduced on a temp project: min task run build went from warning + daemon spawn to error: found a broken minimal.toml while resolving tasks: [harness]is no longer accepted: it sets no stack, so its toolchain would be missing. Rename the table to[stack].

Breaking change

BREAKING CHANGE: a minimal.toml with a top-level harness key no longer loads. On main it loaded with a warning and no stack. Rename the table to [stack]. This applies to every layer's file, so an upstream layer that still carries the table fails the load too.

Summary by CodeRabbit

  • Bug Fixes
    • Configurations using the former [harness] section now fail to load with guidance to rename it to [stack], instead of continuing without a stack.
  • Documentation
    • Updated the configuration reference to describe the load error and rename guidance.

…[harness]

`[harness]` stopped parsing in v0.5.0 and landed in `extra` as a
warning, setting no stack: the toolchain its name promised was silently
absent, and the gap only surfaced much later, as a bare `error: linker
'cc' not found` from a build inside the session.

`File::validate` now refuses the table at load, so every disk load --
both layouts, and every parent found by `from_dir_recursive` -- fails
before any session is built, with a message naming the rename to
`[stack]`. The `misplaced_top_level_key` arm that pointed the warning
at `[stack]` is gone: the error now carries that advice, before
`warn_unknown_fields` runs. The reference doc says the load fails
instead of warning.

BREAKING CHANGE: a minimal.toml that still spells the stack table
`[harness]` fails to load; the table must be renamed to `[stack]`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 11, 2026 00:51
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 11, 2026
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: c729081b-ae1c-4b64-8476-ba54adccb493





📥 Commits

Reviewing files that changed from the base of the PR and between 357ed42 and 4655932.






📒 Files selected for processing (3)
  • crates/mfile/src/error.rs
  • crates/mfile/src/lib.rs
  • docs/reference/minimal-dot-toml.md





Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.







📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The loader now rejects files that use the legacy top-level [harness] table and returns an error with [stack] rename guidance. Tests and reference documentation reflect this behavior.

Changes

Legacy harness table handling

Layer / File(s) Summary
Validation and error reporting
crates/mfile/src/error.rs, crates/mfile/src/lib.rs, docs/reference/minimal-dot-toml.md
File::validate returns Error::HarnessTable when top-level extra contains harness. The error directs users to rename the table to [stack]. The test and reference documentation now describe the load failure.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: norrietaylor












Merge Risk: ⚪ Minimal · up to 46559

The legacy table is rejected before supported disk-loaded files reach session composition. The parsing-only byte API remains distinct, so no merge-blocking regression is established.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the primary change: rejecting legacy [harness] stack-table spelling in minimal.toml files.
Description check Passed The description provides a clear summary, testing evidence, breaking-change details, and documentation impact. It uses a Verification heading instead of Testing and omits the Checklist section, but th…

Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. (1 skipped: 1 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR






🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR









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

A rabbit reads the table with care,
Finds [harness] where [stack] should be there.
The loader gives guidance, clear and bright,
Tests confirm the change is right.
Then hops off through the moonlit night.

Comment @coderabbitai help to get the list of available commands.

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 11, 2026
@norrietaylor

Copy link
Copy Markdown
Member

/review

@minimal-foundry

minimal-foundry Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Approved: no findings at 4655932c16a6.

Nothing to do.

Clobber: none: git log on lib.rs/error.rs shows the head commit supersedes a19539d (which introduced the warn-on-harness behavior), not a revert.

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

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 11, 2026
@norrietaylor norrietaylor changed the title fix: fix(mfile)!: refuse a minimal.toml that still spells the stack table [harness] fix(mfile)!: refuse a minimal.toml that still spells the stack table [harness] Oct 11, 2026
@norrietaylor norrietaylor changed the title fix(mfile)!: refuse a minimal.toml that still spells the stack table [harness] fix(mfile): refuse a minimal.toml that still spells the stack table [harness] Oct 11, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit bb8fa22 Oct 11, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/harness-table-hard-error-6c37a2e36c358382 branch October 11, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant