Skip to content

[worker:doc-drift] correct bare min no-subcommand behavior in CLI reference - #1190

Merged
norrietaylor merged 2 commits into
mainfrom
chore/doc-drift-bare-min-behavior-c1c642e373dd8a09
Aug 12, 2026
Merged

[worker:doc-drift] correct bare min no-subcommand behavior in CLI reference#1190
norrietaylor merged 2 commits into
mainfrom
chore/doc-drift-bare-min-behavior-c1c642e373dd8a09

Conversation

@gominimal-aw-bot

@gominimal-aw-bot gominimal-aw-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Resolves documentation drift in docs/reference/cli-min.md.

Problem

The CLI reference (line 14) stated that running bare min with no subcommand "prints this help and exits." That does not match the implementation (crates/minimal/src/lib.rs, cmd_bare, lines 860-872):

  • In a terminal (stdin and stdout both TTY): bare min routes into a session using the smart-resolution rules of min session attach with no argument (cwd match → attach, only session → attach, ambiguity → picker), and creates one from the current directory and attaches when no sessions exist.
  • Without a terminal: it prints a read-only state report on stderr and exits.
  • min --help is what prints the help text.

Fix

Updated the prose in cli-min.md to describe the actual TTY / non-TTY behavior of bare min, and to point at min --help for the help output. Docs-only change; no source or Cargo.toml touched.

Verification

This is a Markdown-documentation-only change (no .rs or Cargo.toml edits), so no compilation is affected. The host backstop still gates the PR with cargo fmt --all --check, cargo build --workspace --all-targets --locked, cargo clippy --workspace --all-targets --locked -- -D warnings, and cargo test --workspace --all-targets --locked before it opens.

Closes #1187

Generated by Chore-issue worker agent (side-repo-ops operator) ·

Note

Correct bare min no-subcommand behavior in CLI reference docs

Updates cli-min.md to accurately describe what happens when min is run with no subcommand. Previously documented as printing help and exiting; the correct behavior is:

  • When both stdin and stdout are terminals, routes into a session using the same smart-resolution rules as min session attach (cwd match → attach, only session → attach, ambiguity → picker), creating and attaching a new session from cwd if none exist
  • When not attached to a terminal, prints a read-only state report to stderr and exits successfully
  • min --help is now the correct way to print help

Macroscope summarized c4163ef.

Summary by CodeRabbit

  • New Features
    • Running min in an interactive terminal now opens or attaches to a session automatically.
    • If no session exists, one is created and attached.
    • When no terminal is available, min prints a read-only state report instead of displaying help and exiting.

@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner August 10, 2026 16:41
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The CLI reference updates the documented behavior of bare min. Interactive terminals attach to or create a session. Non-interactive execution prints a read-only state report to stderr.

Changes

Bare min documentation

Layer / File(s) Summary
Document bare min execution flow
docs/reference/cli-min.md
The reference documents session attachment or creation for terminal use and read-only state reporting for non-interactive use.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested reviewers: norrietaylor

Poem

A rabbit updates the guide,
Bare min now joins a session inside.
If none exist, one starts anew.
Without a terminal, state reports too.
The old help-only text has died.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The documentation update addresses all coding-related requirements in issue #1187, including TTY, non-TTY, session resolution, and help behavior.
Out of Scope Changes check ✅ Passed The changes are limited to the CLI reference documentation and directly support issue #1187.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and concisely identifies the correction to bare min behavior in the CLI reference.
Description check ✅ Passed The description covers the change, rationale, verification, and linked issue, but it omits the template's explicit Checklist section.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/doc-drift-bare-min-behavior-c1c642e373dd8a09

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: 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 `@docs/reference/cli-min.md`:
- Around line 18-19: Update the read-only state report description in the CLI
documentation to say it “exits successfully” instead of merely “exits,”
documenting the zero exit status while leaving failure behavior unchanged.
🪄 Autofix

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: 5e751398-b2c5-4a22-bc28-45b85744f70f

📥 Commits

Reviewing files that changed from the base of the PR and between 50e2a1a and 953a925.

📒 Files selected for processing (1)
  • docs/reference/cli-min.md

Comment thread docs/reference/cli-min.md Outdated
@gominimal-aw-bot

Copy link
Copy Markdown
Contributor Author

Commit pushed: c4163ef

Generated by Worker iterate agent (side-repo-ops operator)

@norrietaylor
norrietaylor merged commit 536fc29 into main Aug 12, 2026
30 checks passed
@norrietaylor
norrietaylor deleted the chore/doc-drift-bare-min-behavior-c1c642e373dd8a09 branch August 12, 2026 15:53
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.

Documentation drift: bare min behavior incorrectly described

1 participant