8000 fix(min): a headless min box rm refusal lists the work it would delete by agent-137 · Pull Request #4046 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(min): a headless min box rm refusal lists the work it would delete - #4046

Open
agent-137 wants to merge 1 commit into
mainfrom
fix/rm-names-unpushed-commits
Open

agent-137 wants to merge 1 commit into
mainfrom
fix/rm-names-unpushed-commits

Conversation

@agent-137
Copy link
Copy Markdown
Member

Off a terminal, min box rm of a stopped git-project box whose only risk is an unpushed commit, such as one on a detached HEAD, is refused correctly, but the refusal says only "has changed files". No file changed, and the reason, the commit, is not named. Found in pc's full run on 0.8.0-dev.818 (N191).

Why

The daemon reports the commit correctly (unpushed_commits, which counts HEAD as well, so a detached HEAD's commit is included), and the interactive prompt lists it. But the headless refusal, RmRefusalCause::ChangedFiles, dropped the at-risk lines and always printed "has changed files".

What changes

RmRefusalCause::ChangedFiles now carries the at-risk lines that the prompt shows, and the refusal prints them between its first sentence and the --force step. When every line is an unpushed-commit line, the first sentence names the commits instead of files. The commit line's ending is now one constant, NOT_PUSHED, shared by the line and the check.

Messages

With files at risk (the first sentence and the --force sentence are unchanged, so scripts/session-e2e.sh's grep for "has changed files" still holds):

web has changed files, so it was not removed. Removing it deletes them.
1 file with uncommitted changes:
  notes.txt
Run min box rm web --force to remove it anyway.

With only an unpushed commit:

web has commits not pushed to any remote, so it was not removed. Removing it deletes them.
1 commit not pushed to any remote
Run min box rm web --force to remove it anyway.

box_rm_without_force_gates_changed_files pins both. No spec quotes the old text. Spec 28's BCLI-004 sub-requirement states the condition, not the wording.

Verification

  • minimal: 1379/1379. clippy -D warnings and fmt are clean.
  • Mutation check NOT completed: with the headline forced to "changed files", the test binary could not link in this sandbox (ld terminated with signal 9 [Killed], memory pressure on the shared host). The unmutated build links and passes. The new assertion compares the exact first sentence, so it fails under that mutation by construction, but I have not observed it fail.

🤖 Generated with Claude Code

https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

Off a terminal, `min box rm` of a box with work at risk said only "has
changed files", even when the only risk was a commit no remote has, such
as one on a detached HEAD. The refusal now lists the lines the prompt
shows, and when only unpushed commits are at risk, its first sentence
names them instead of files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g
@agent-137
agent-137 requested a review from a team as a code owner December 4, 2026 12:15
@agent-137 agent-137 added the release:0.8.0 Targeted for the 0.8.0 release. Pair with a priority label. label Dec 4, 2026
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@coderabbitai
coderabbitai Bot commented Dec 4, 2026
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 36 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

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: Essentials
  • Run ID: e77e6eed-a8eb-466b-b64f-a31425c3abe4
Commits

Reviewing files that changed from the base of the PR and between 2848127 and 163a539.

Files selected for processing: 2

  • crates/minimal/src/cmd/boxes/lifecycle.rs
  • crates/minimal/src/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@minimal-foundry
minimal-foundry Bot commented Dec 4, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at 163a5396ea08.

Nothing to do.

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. The headless min box rm refusal still exits 2 and names --force, as architecture.md line 344 and the exit-code table at line 375 require. The gate decision does not change. Only the refusal text now lists the at-risk lines and names unpushed commits when they are the only risk. Line 345 says that text output is not stable, so the new wording breaks no contract.

Ruled at 163a539 against gominimal/arch@5cfb8febb353 by claude-opus-5-5.

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

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 Dec 4, 2026
@mitodrummer mitodrummer added the priority:should-have Should be done. Applied by the inbox-route classifier or a human. label Dec 4, 2026
@norrietaylor norrietaylor added the backport release/0.8.x Backport this PR to release/0.8.x label Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release/0.8.x Backport this PR to release/0.8.x priority:should-have Should be done. Applied by the inbox-route classifier or a human. release:0.8.0 Targeted for the 0.8.0 release. Pair with a priority label. review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0