8000 fix(minimald): exit 3 for a task refused on the exec-channel run by bryan-minimal · Pull Request #4011 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimald): exit 3 for a task refused on the exec-channel run - #4011

Open
bryan-minimal wants to merge 1 commit into
mainfrom
fix/602-exec-exit-code
Open

bryan-minimal wants to merge 1 commit into
mainfrom
fix/602-exec-exit-code

Conversation

@bryan-minimal
Copy link
Copy Markdown
Member

A follow-up to #3956. Norrie's approval there noted that docs/reference/tasks.md says a refused task exits 3, which was confirmed for the task-box path but not for the older exec-channel path. On that path it exited 1.

Why it was 1

On the exec-channel path (TaskExec, used by min session run and by a min from before task boxes), declared_task returned the refusal of a patch entry outside ~/ as a plain io::Error. The bridge ends every exec whose stream yields an error with 1 (bridge_until_end, the "failed to spawn" arm). min session run passes the channel's status through, so the user saw exit 1. The task-box path already exits 3 through relay_refusal_exit(..., EXIT_CONFIG).

The change

  • exec/bridge.rs: RefusedWith { exit, message }, an error that carries its own exit status inside the io::Error, and spawn_failure_exit, which reads that status back. Any other spawn failure still exits 1, and the stderr line is unchanged.
  • exec/process.rs: declared_task wraps the patch refusal as RefusedWith with EXIT_CONFIG (3), as BCLI-010 requires for a configuration refusal.
  • env.rs: EXIT_CONFIG is now pub(crate).
  • exec/tests.rs: an_exec_task_run_refused_for_a_patch_outside_home_ends_with_3 runs the refusal from declared_task through bridge. It asserts exit 3 and the refusal text on stderr, and checks that a plain error still exits 1.

docs/reference/tasks.md already says exit 3, and with this change that holds on both paths.

🤖 Generated with Claude Code

A task refused for a patch entry outside ~/ exited 1 on the exec-channel
run (min session run, or a min from before task boxes), where the
task-box path exits 3 for the same refusal, as the tasks reference says.
The refusal now carries its exit status in the error the run's stream
yields, and the bridge ends the exec with it. Any other spawn failure
still ends with 1. A test pins exit 3 and the refusal on stderr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai
coderabbitai Bot commented Dec 4, 2026
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 4 billable files and costs up to $1.00.

  • 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 18 seconds 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: 8f3f372d-b33a-42fd-b6b4-4390452b3f07
Commits

Reviewing files that changed from the base of the PR and between 472a6a7 and d4a1040.

Files selected for processing: 4

  • crates/minimald/src/env.rs
  • crates/minimald/src/exec/bridge.rs
  • crates/minimald/src/exec/process.rs
  • crates/minimald/src/exec/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 d4a104005673.

Nothing to do.

Clobber: none seen.

@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

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

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0