Skip to content

fix: report accepted forms when an exec request is rejected - #1143

Merged
norrietaylor merged 1 commit into
mainfrom
inbox-patch/inbox-patch-exec-reject-usage-2d2c2bbc7fd884db
Jul 31, 2026
Merged

fix: report accepted forms when an exec request is rejected#1143
norrietaylor merged 1 commit into
mainfrom
inbox-patch/inbox-patch-exec-reject-usage-2d2c2bbc7fd884db

Conversation

@gominimal-aw-bot

@gominimal-aw-bot gominimal-aw-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABKmg9rg

Running a command through min session attach -c that the session daemon does not service — any command with no min prefix, or min followed by an unrecognised subcommand — was refused with a bare SSH channel_failure. The client saw only exec request failed on channel 0 (exit 255), naming neither the rejected command nor the forms the daemon accepts, so the user had to read the daemon source to find out.

The daemon now accepts the channel and writes a diagnostic to the SSH stderr stream — naming the rejected command and listing min run <task>, min package build [args...], and min check [args...] — then exits non-zero. This mirrors the accept-then-report path already used for a bad min check flag (informed by #383). The command is still refused and nothing is spawned, so the daemon's no-arbitrary-exec guarantee is unchanged.

Verification

cargo fmt --all --check — clean, no drift
cargo clippy --workspace --locked -- -D warnings — 0 warnings
cargo build --workspace --locked — ok
cargo test --workspace --locked — ok (minimald lib: 212 passed, 0 failed)

Generated by inbox-patch ·

Note

Report accepted forms on stderr when an SSH exec request is rejected

  • Previously, unsupported SSH exec commands caused an opaque channel failure; now the channel is accepted and a diagnostic is written to stderr naming the rejected command and listing accepted forms, then exits with status 1.
  • Adds reject_unsupported_exec in exec.rs to handle the accepted-channel path: writes the message, flushes, sends EOF, sets exit status, and closes.
  • Behavioral Change: clients that previously received a channel failure now receive exit status 1 with stderr output instead.

Macroscope summarized c2df1e7.

An exec request that is not one of the accepted forms — a command with
no `min ` prefix, or `min <unknown-subcommand>` — was refused with a
bare SSH `channel_failure`. That reaches the client only as "exec
request failed on channel N", naming neither the rejected command nor
what the daemon accepts, so the user has to read the source to find out.

Accept the channel and report the rejection on the stderr stream with a
non-zero exit instead, mirroring the accept-then-report path already
used for a bad `min check` flag. The command is still refused and
nothing is spawned; only the diagnostic reaches the client.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9485c985-8963-4689-9db2-899b1c964266

📥 Commits

Reviewing files that changed from the base of the PR and between d67c46d and c2df1e7.

📒 Files selected for processing (1)
  • crates/minimald/src/exec.rs

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

@norrietaylor
norrietaylor marked this pull request as ready for review July 31, 2026 17:27
@norrietaylor
norrietaylor requested a review from a team as a code owner July 31, 2026 17:27
@norrietaylor
norrietaylor merged commit cf634c1 into main Jul 31, 2026
30 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/inbox-patch-exec-reject-usage-2d2c2bbc7fd884db branch July 31, 2026 20:29
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.

1 participant