Repository navigation
fix(minimald): exit 3 for a task refused on the exec-channel run - #4011
Open
bryan-minimal wants to merge 1 commit into
Open
bryan-minimal wants to merge 1 commit into
bryan-minimal wants to merge 1 commit into
Conversation
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>
Contributor
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
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. View limit details
|
Contributor
|
Approved: no findings at Nothing to do. Clobber: none seen. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A follow-up to #3956. Norrie's approval there noted that
docs/reference/tasks.mdsays 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 bymin session runand by aminfrom before task boxes),declared_taskreturned the refusal of a patch entry outside~/as a plainio::Error. The bridge ends every exec whose stream yields an error with 1 (bridge_until_end, the "failed to spawn" arm).min session runpasses the channel's status through, so the user saw exit 1. The task-box path already exits 3 throughrelay_refusal_exit(..., EXIT_CONFIG).The change
exec/bridge.rs:RefusedWith { exit, message }, an error that carries its own exit status inside theio::Error, andspawn_failure_exit, which reads that status back. Any other spawn failure still exits 1, and the stderr line is unchanged.exec/process.rs:declared_taskwraps the patch refusal asRefusedWithwithEXIT_CONFIG(3), as BCLI-010 requires for a configuration refusal.env.rs:EXIT_CONFIGis nowpub(crate).exec/tests.rs:an_exec_task_run_refused_for_a_patch_outside_home_ends_with_3runs the refusal fromdeclared_taskthroughbridge. It asserts exit 3 and the refusal text on stderr, and checks that a plain error still exits 1.docs/reference/tasks.mdalready says exit 3, and with this change that holds on both paths.🤖 Generated with Claude Code