Skip to content

fix(minimald): improve logic for scaffolding session minimal.toml - #780

Merged
twitchyliquid64 merged 1 commit into
mainfrom
tom/attach
Jul 16, 2026
Merged

fix(minimald): improve logic for scaffolding session minimal.toml#780
twitchyliquid64 merged 1 commit into
mainfrom
tom/attach

Conversation

@twitchyliquid64

@twitchyliquid64 twitchyliquid64 commented Jul 16, 2026

Copy link
Copy Markdown
Member
  • Use the standard logic for finding a minimal.toml
  • Use min init logic for creating a default minimal.toml

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The temporary mctx scaffolding module and re-export were removed. Missing MFILE handling now uses mfile detection and initializes the project through op::InitProject, writing its generated TOML plan.

Changes

MFILE initialization

Layer / File(s) Summary
Initialize missing MFILE files
crates/minimald/src/session.rs, crates/mctx/src/lib.rs
Session startup distinguishes usable, missing, and errored MFILE states; missing files are generated through project initialization, while the obsolete scaffolding export is removed.

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

Possibly related PRs

  • gominimal/minimal#773: Revamps the TOML generated by InitProject, which this change now uses for initialization.

Suggested reviewers: norrietaylor

Poem

I’m a small rabbit hopping through code,
Finding missing MFILEs along the road.
InitProject plants the TOML seed,
Old scaffolds rest among the weeds.
A tidy workspace is all I need!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 accurately reflects the main change: refining minimal.toml scaffolding logic in minimald.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@twitchyliquid64
twitchyliquid64 enabled auto-merge (squash) July 16, 2026 01:42

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/minimald/src/session.rs`:
- Around line 893-902: Update the missing-file initialization branch in the
session method using mfile::File::from_dir and op::InitProject so plan.toml_path
is created with an exclusive no-replace write rather than std::fs::write. Treat
an AlreadyExists error as Ok(()) and propagate other filesystem errors,
preserving the generated plan content when no concurrent upload exists.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 74571909-1494-4abf-bb37-31ade258ff7d

📥 Commits

Reviewing files that changed from the base of the PR and between ca23aeb and 98f857c.

📒 Files selected for processing (3)
  • crates/mctx/src/lib.rs
  • crates/mctx/src/scaffold.rs
  • crates/minimald/src/session.rs
💤 Files with no reviewable changes (2)
  • crates/mctx/src/scaffold.rs
  • crates/mctx/src/lib.rs

Comment thread crates/minimald/src/session.rs
@twitchyliquid64
twitchyliquid64 merged commit eb1f818 into main Jul 16, 2026
28 checks passed
@twitchyliquid64
twitchyliquid64 deleted the tom/attach branch July 16, 2026 01:57
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.

2 participants