Skip to content

feat!(mip,minimald): turn down build/test/shell shorthands, move pkg cmds under subcmd - #976

Merged
twitchyliquid64 merged 1 commit into
mainfrom
tom/completions
Jul 27, 2026
Merged

feat!(mip,minimald): turn down build/test/shell shorthands, move pkg cmds under subcmd#976
twitchyliquid64 merged 1 commit into
mainfrom
tom/completions

Conversation

@twitchyliquid64

@twitchyliquid64 twitchyliquid64 commented Jul 27, 2026

Copy link
Copy Markdown
Member
  • mip:

    • Remove mip build/test/shell shorthands for running a task of that name
    • Move mip pkg/package to mip pkg/package build
    • Move mip dep to mip pkg/package dep
    • Move mip upload-cache to mip pkg/package upload-cache
    • (science mode) Move mip patched-build to mip pkg/package patched-build
    • (science mode) Move mip plan to mip pkg/package build-plan
  • Session min helper:

    • Move min build to min package build
    • Move min patched-pkg to min package patched-build
  • Legacy min helper:

    • Same as above, except package build errors as we don't have an implementation in mip

Note

Move mip package commands under mip package subcommand and remove top-level build/test/shell shorthands

  • Removes top-level mip commands shell, build, test, plan, upload-cache, patched-build, and dep; equivalent operations are now under mip run … or mip package ….
  • Introduces mip package (alias pkg) with subcommands: build, dep, and hidden build-plan, patched-build, upload-cache.
  • Renames internal command modules and structs (e.g. cmd_plan.rscmd_pkg_build_plan.rs, PlanArgsPkgBuildPlanArgs) to match the new subcommand structure.
  • Updates shell helper scripts in mctx and minimald to replace min build, min test, and min patched-pkg with min package build and min package patched-build.
  • Risk: Breaking change — any scripts or workflows calling removed top-level commands will fail.

Macroscope summarized 58a8793.

Summary by CodeRabbit

  • New Features

    • Added a mip package command with subcommands for build, build plans, dependency inspection, patched builds, and cache uploads.
    • Introduced package, pkg, and packages aliases and updated command dispatch accordingly.
    • Added min package routing, including min package patched-build <name> and rejecting unsupported min package invocations.
  • Documentation

    • Updated CLI reference/help text to reflect the new mip package ... structure and removed guidance for prior top-level build, test, shell, and dep commands.
    • Refreshed stack/build examples to use mip run build terminology.

@twitchyliquid64 twitchyliquid64 changed the title feat!(mip,minimald): turn down build/test/shell shorthands, move build to package subcmd feat!(mip,minimald): turn down build/test/shell shorthands, move pkg cmds under subcmd Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR groups package operations under nested package/pkg subcommands, renames related Rust CLI argument types and handlers, updates shell helper dispatch, removes former top-level command variants, and revises CLI documentation.

Changes

Package CLI hierarchy

Layer / File(s) Summary
Shell package dispatch
crates/mctx/src/min_helper.sh, crates/minimald/src/env_min_helper.sh
Adds `min package
Package command contracts and handlers
crates/mip/src/cmd_pkg*.rs
Introduces PkgCmd and renames package build, plan, dependency, patched-build, and upload-cache argument types and handlers.
Top-level wiring and reference updates
crates/mip/src/main.rs, docs/reference/cli-mip.md, docs/concepts/stacks.md, docs/reference/stack-specs.md
Nests package commands under package, removes former top-level variants, updates dispatch, and documents the revised command forms.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

  • gominimal/inbox#271: Covers related package subcommand naming, dispatch, and documentation changes.

Possibly related PRs

Suggested reviewers: msample, norrietaylor

Poem

A rabbit hops through package gates,
Build and plan now share new states.
Patched builds follow close behind,
Dependency paths are neatly aligned.
“Hop hop!” says Bun, “the CLI is refined!”

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning It describes the changes, but it omits the required Summary, Testing, and Checklist sections from the template. Reformat the PR body to include ## Summary, ## Testing with evidence, and ## Checklist, including BREAKING CHANGE status if needed.
✅ Passed checks (3 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 It accurately summarizes the main breaking change: moving package commands under a package subcommand and removing shorthands.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@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: 4

🧹 Nitpick comments (1)
crates/minimald/src/env_min_helper.sh (1)

111-126: 🎯 Functional Correctness | 🔵 Trivial

Run the daemon integration coverage for this dispatch change. just test-vm covers the VM/helper path, and just ci is the pre-PR gate.

🤖 Prompt for 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.

In `@crates/minimald/src/env_min_helper.sh` around lines 111 - 126, Run the daemon
integration coverage for the min_package dispatch change by executing just
test-vm, then run the full pre-PR gate with just ci and address any failures.

Source: Coding guidelines

🤖 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/mctx/src/min_helper.sh`:
- Around line 125-127: Update the unknown-subcommand branch of min_helper.sh to
advertise the actually supported patched-build subcommand instead of build. Keep
the existing error output and return behavior unchanged.

In `@crates/minimald/src/env_min_helper.sh`:
- Around line 122-124: Update the unknown-subcommand error message in the
env_min_helper.sh dispatch case to advertise both accepted subcommands, build
and patched-build, while preserving the existing rejection and return behavior.

In `@docs/reference/cli-mip.md`:
- Around line 116-117: Label both shell command fenced code blocks containing
“mip package build” and “mip package dep” with the bash language identifier,
including the additional block referenced by the review, so all new fences
satisfy MD040.
- Around line 109-112: Extend the package command reference alongside the
existing build and dep entries to document package build-plan and patched-build,
including each command’s syntax, purpose, and science-mode availability. Ensure
the documentation reflects that both commands are now invoked under mip package.

---

Nitpick comments:
In `@crates/minimald/src/env_min_helper.sh`:
- Around line 111-126: Run the daemon integration coverage for the min_package
dispatch change by executing just test-vm, then run the full pre-PR gate with
just ci and address any failures.
🪄 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: 28265ed6-6da6-425c-b643-b72e65a83c2e

📥 Commits

Reviewing files that changed from the base of the PR and between 09660c9 and 29c3b11.

📒 Files selected for processing (8)
  • crates/mctx/src/min_helper.sh
  • crates/minimald/src/env_min_helper.sh
  • crates/mip/src/cmd_pkg.rs
  • crates/mip/src/cmd_pkg_build_plan.rs
  • crates/mip/src/cmd_pkg_dep.rs
  • crates/mip/src/cmd_pkg_patched_build.rs
  • crates/mip/src/main.rs
  • docs/reference/cli-mip.md

Comment thread crates/mctx/src/min_helper.sh
Comment thread crates/minimald/src/env_min_helper.sh
Comment thread docs/reference/cli-mip.md
Comment thread docs/reference/cli-mip.md
@twitchyliquid64
twitchyliquid64 force-pushed the tom/completions branch 3 times, most recently from 5f13212 to 82dbc8a Compare July 27, 2026 17:39
@twitchyliquid64
twitchyliquid64 merged commit 99d5ea5 into main Jul 27, 2026
29 checks passed
@twitchyliquid64
twitchyliquid64 deleted the tom/completions branch July 27, 2026 18:54
norrietaylor added a commit that referenced this pull request Jul 29, 2026
Move activate, attach, destroy, and rename under the session noun, and
stop under a new provider noun, continuing the <noun> <verb> sweep that
#976 started with mip package.

min ls, bare min, and the init/add/update passthroughs stay top-level as
deliberate ergonomic exceptions, commented as such in the source so a
later reader does not "fix" them. Every noun gains a visible
singular/plural alias.

Documents the convention itself in docs/reference/cli.md, so it is not
re-derived from the command tree every time someone adds a command.

BREAKING CHANGE: min activate, min attach, min destroy and min rename
are now min session activate, min session attach, min session destroy
and min session rename. min stop is now min provider stop, with min stop
retained as a shortcut onto the same code path.

Refs: #1005

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
norrietaylor added a commit that referenced this pull request Jul 29, 2026
Move activate, attach, destroy, and rename under the session noun,
continuing the <noun> <verb> sweep that #976 started with mip package.

min ls, min stop, bare min, and the init/add/update passthroughs stay
top-level as deliberate ergonomic exceptions, commented as such in the
source so a later reader does not "fix" them. stop in particular acts on
the daemon backend rather than any session. Nouns gain a visible
singular/plural alias.

Documents the convention itself in docs/reference/cli.md, so it is not
re-derived from the command tree every time someone adds a command.

BREAKING CHANGE: min activate, min attach, min destroy and min rename
are now min session activate, min session attach, min session destroy
and min session rename.

Refs: #1005

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
norrietaylor added a commit that referenced this pull request Jul 29, 2026
Move activate, attach, destroy, and rename under the session noun,
continuing the <noun> <verb> sweep that #976 started with mip package.

min ls, min stop, bare min, and the init/add/update passthroughs stay
top-level as deliberate ergonomic exceptions, commented as such in the
source so a later reader does not "fix" them. stop in particular acts on
the daemon backend rather than any session. Nouns gain a visible
singular/plural alias.

Documents the convention itself in docs/reference/cli.md, so it is not
re-derived from the command tree every time someone adds a command.

BREAKING CHANGE: min activate, min attach, min destroy and min rename
are now min session activate, min session attach, min session destroy
and min session rename.

Refs: #1005

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
norrietaylor added a commit that referenced this pull request Jul 29, 2026
Move activate, attach, destroy, and rename under the session noun,
continuing the <noun> <verb> sweep that #976 started with mip package.

min ls, min stop, bare min, and the init/add/update passthroughs stay
top-level as deliberate ergonomic exceptions, commented as such in the
source so a later reader does not "fix" them. stop in particular acts on
the daemon backend rather than any session. Nouns gain a visible
singular/plural alias.

Documents the convention itself in docs/reference/cli.md, so it is not
re-derived from the command tree every time someone adds a command.

BREAKING CHANGE: min activate, min attach, min destroy and min rename
are now min session activate, min session attach, min session destroy
and min session rename.

Refs: #1005

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
gominimal-aw-bot Bot added a commit that referenced this pull request Jul 29, 2026
The Commands section of docs/reference/sandbox-operations.md still
documented the pre-#976 helper surface. PR #976 removed the build and
test shorthands and moved building under the package subcommand, but
the reference was never updated to match.

Drop build/test, rename patched-pkg to package patched-build, and add
the real package build command, matching the in-sandbox min helper
banner (crates/minimald/src/env_min_helper.sh).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
norrietaylor pushed a commit that referenced this pull request Jul 29, 2026
…1058)

The Commands section of docs/reference/sandbox-operations.md still
documented the pre-#976 helper surface. PR #976 removed the build and
test shorthands and moved building under the package subcommand, but
the reference was never updated to match.

Drop build/test, rename patched-pkg to package patched-build, and add
the real package build command, matching the in-sandbox min helper
banner (crates/minimald/src/env_min_helper.sh).

Co-authored-by: gominimal-aw-bot[bot] <281738952+gominimal-aw-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
gominimal-aw-bot Bot added a commit that referenced this pull request Jul 29, 2026
Commit 99d5ea5 (#976) turned down the mip build/test/shell
shorthands, but docs/reference/cli.md and docs/guide/building.md
still taught them. Drop the shorthand parenthetical from mip run in
cli.md, and rewrite building.md to use mip run build / mip run test
throughout, matching docs/concepts/stacks.md and cli-mip.md (whose
command list carries no build/test/shell).
twitchyliquid64 pushed a commit that referenced this pull request Jul 29, 2026
Commit 99d5ea5 (#976) turned down the mip build/test/shell
shorthands, but docs/reference/cli.md and docs/guide/building.md
still taught them. Drop the shorthand parenthetical from mip run in
cli.md, and rewrite building.md to use mip run build / mip run test
throughout, matching docs/concepts/stacks.md and cli-mip.md (whose
command list carries no build/test/shell).
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.

3 participants