Skip to content

chatmux-relay: reject empty option values - #11113

Merged
lawrencecchen merged 3 commits into
mainfrom
feat-tui-cli-error-audit
Aug 28, 2026
Merged

lawrencecchen merged 3 commits into
mainfrom
feat-tui-cli-error-audit

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Reject empty values for value-taking CLI flags before they reach config or pairing flows. This matches clap non-empty value validation guidance and preserves privacy-safe diagnostics. Regression test is in the first commit; fix is in the second.


Summary by cubic

Rejects empty values for value-taking CLI flags in chatmux-relay so they fail with a requires a value error instead of being accepted, matching clap's non-empty value validation and keeping diagnostics privacy-safe.

Written for commit ba9a558. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved command-line validation to reject empty values for backend, root access, enrollment file, and configuration options.
    • Displays a usage error when these options are provided without a valid value.

@vercel

vercel Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux166 Ready Ready Preview Aug 28, 2026 1:28pm
cmux41 Ready Ready Preview Aug 28, 2026 1:28pm

@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6a663596-ac94-4d52-8b25-6cc9f7980567

📥 Commits

Reviewing files that changed from the base of the PR and between 73f3fdc and ba9a558.

📒 Files selected for processing (1)
  • cmux-tui/crates/chatmux-relay/src/cli.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The CLI now treats empty strings as missing values for value flags. The test suite covers an empty --config value.

Changes

CLI value validation

Layer / File(s) Summary
Reject empty flag values
cmux-tui/crates/chatmux-relay/src/cli.rs
Value-flag parsing rejects empty values. Tests verify that --config "" returns a “requires a value” error.

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

Merge Risk: ⚪ Minimal · up to ba9a5

This localized CLI validation change rejects empty option values before they enter configuration or pairing flows, preserving the intended error behavior without introducing an actionable merge-blocking risk.

🚥 Pre-merge checks | ✅ 23 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains what changed and why, and it mentions a regression test. However, it does not follow the required template or provide testing details, demo video information, review-trigger c… Add the required Summary and Testing sections. State the test commands and manual verification performed. Complete the Demo Video section or explain why it does not apply. Include the review trigger and update all applicable checklist items…
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (23 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: rejecting empty values for chatmux-relay CLI options.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The diff adds empty-value rejection and a Rust test; it introduces no Swift declarations or actor-isolation…
Cmux Swift Blocking Runtime ✅ Passed PASS — the pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The base-to-HEAD diff contains no Swift files and introduces no Swift blocking or timing primitive. The cu…
Cmux Browser Automation Off-Main ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs. It adds empty-string rejection for CLI values and a regression test. It does not change browser socket automation, `Sour…
Cmux Expensive Synchronous Load ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The diff adds empty-string rejection for CLI values and a regression test. It adds no Swift code, agent-his…
Cmux Cache Substitution Correctness ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, which is Rust. The diff adds an empty-string check to CLI value parsing and a Rust test. It contains no production Swift…
Cmux No Hacky Sleeps ✅ Passed PASS. The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The custom check covers TypeScript, JavaScript, shell, and non-Swift build/runtime scripts. The diff adds n…
Cmux Algorithmic Complexity ✅ Passed PASS. The PR changes only cmux-tui/crates/chatmux-relay/src/cli.rs, which is Rust. The production change adds !value.is_empty() to an existing value predicate and adds one Rust test case. It intro…
Cmux Swift Concurrency ✅ Passed PASS: The pull-request diff against main changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. No Swift path is changed, so the Swift concurrency failure conditions are not applicabl…
Cmux Swift @Concurrent ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The diff adds empty-value rejection for CLI flags and a Rust test. No Swift file, Swift async function, act…
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust CLI parser. The diff adds empty-value rejection and a Rust test; it introduces no production Swift changes and no…
Cmux Swiftpm Lockfiles ✅ Passed PASS: The PR diff against origin/main contains only cmux-tui/crates/chatmux-relay/src/cli.rs (3 insertions and 1 deletion). It changes Rust CLI parsing and a Rust test only. No Package.swift, `Pac…
Cmux Swift Logging ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, which is Rust. The diff adds empty-value validation and a Rust test. It adds no Swift logging or runtime Swift code, so …
Cmux User-Facing Error Privacy ✅ Passed PASS — The production diff only adds an empty-string check to existing value validation and keeps the diagnostic cmux-relay: <public option> requires a value. The output contains no vendor name, int…
Cmux Full Internationalization ✅ Passed PASS. The PR diff only adds an empty-string check and a regression-test argument in cmux-tui/crates/chatmux-relay/src/cli.rs. It does not add or change user-facing text. The missing_value diagnost…
Cmux Swiftui State Layout ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust CLI parser. The diff contains no Swift or SwiftUI changes, so the SwiftUI state-layout failure conditions do not …
Cmux Architecture Rethink ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust CLI parser. The diff adds empty-value rejection and a regression test. It changes no Swift, Objective-C, or Objec…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The full PR diff from merge-base e45af14 changes only cmux-tui/crates/chatmux-relay/src/cli.rs (Rust). It adds empty-value rejection and a Rust test case. It i…
Cmux Source Artifacts ✅ Passed PASS. The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs. The diff adds a deliberate CLI validation change and a regression test. The path is hand-written Rust source, which the …
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The diff contains no Swift files under a production Sources/ path and adds no test or debug seam. The cus…
Cmux No Ambient Global State ✅ Passed PASS: The custom check applies only to production Swift changes. The complete pull-request diff from origin/main to HEAD changes one Rust file, cmux-tui/crates/chatmux-relay/src/cli.rs, and cont…
Full details: Description check

Explanation

The description explains what changed and why, and it mentions a regression test. However, it does not follow the required template or provide testing details, demo video information, review-trigger confirmation, or checklist status.

Resolution

Add the required Summary and Testing sections. State the test commands and manual verification performed. Complete the Demo Video section or explain why it does not apply. Include the review trigger and update all applicable checklist items.

Full details: Cmux Swift Actor Isolation

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The diff adds empty-value rejection and a Rust test; it introduces no Swift declarations or actor-isolation behavior. The Swift actor-isolation check is therefore not applicable.

Full details: Cmux Swift Blocking Runtime

Explanation

PASS — the pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The base-to-HEAD diff contains no Swift files and introduces no Swift blocking or timing primitive. The custom check is therefore inapplicable.

Full details: Cmux Browser Automation Off-Main

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs. It adds empty-string rejection for CLI values and a regression test. It does not change browser socket automation, Sources/TerminalController.swift, or ControlCommandExecutionPolicy.swift, and the patch contains no worker-routing, WebKit, AppKit, or browser.* changes.

Full details: Cmux Expensive Synchronous Load

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The diff adds empty-string rejection for CLI values and a regression test. It adds no Swift code, agent-history loader, synchronous disk/JSON parsing, or interactive-path call site, so the custom Swift check is not applicable.

Full details: Cmux Cache Substitution Correctness

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, which is Rust. The diff adds an empty-string check to CLI value parsing and a Rust test. It contains no production Swift, TypeScript, or JavaScript changes, and it does not substitute a cached value for an authoritative read in a persistence, history, undo, or snapshot path.

Full details: Cmux No Hacky Sleeps

Explanation

PASS. The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The custom check covers TypeScript, JavaScript, shell, and non-Swift build/runtime scripts. The diff adds no sleep, timer, polling, delay, or wait logic.

Full details: Cmux Algorithmic Complexity

Explanation

PASS. The PR changes only cmux-tui/crates/chatmux-relay/src/cli.rs, which is Rust. The production change adds !value.is_empty() to an existing value predicate and adds one Rust test case. It introduces no nested collection scan, repeated rescan, sorting/filtering, join, or slower batch algorithm. The algorithmic-complexity failure conditions are not met.

Full details: Cmux Swift Concurrency

Explanation

PASS: The pull-request diff against main changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. No Swift path is changed, so the Swift concurrency failure conditions are not applicable.

Full details: Cmux Swift `@Concurrent`

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The diff adds empty-value rejection for CLI flags and a Rust test. No Swift file, Swift async function, actor isolation, or @concurrent annotation changes are present, so the Swift-specific failure conditions do not apply.

Full details: Cmux Swift Package Boundaries

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust CLI parser. The diff adds empty-value rejection and a Rust test; it introduces no production Swift changes and no Swift package-boundary violation.

Full details: Cmux Swiftpm Lockfiles

Explanation

PASS: The PR diff against origin/main contains only cmux-tui/crates/chatmux-relay/src/cli.rs (3 insertions and 1 deletion). It changes Rust CLI parsing and a Rust test only. No Package.swift, Package.resolved, .gitignore, workflow, or Xcode project package-reference file changed, so the SwiftPM lockfile conditions do not apply.

Full details: Cmux Swift Logging

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, which is Rust. The diff adds empty-value validation and a Rust test. It adds no Swift logging or runtime Swift code, so .github/review-bot-rules/swift-logging.md is not applicable.

Full details: Cmux User-Facing Error Privacy

Explanation

PASS — The production diff only adds an empty-string check to existing value validation and keeps the diagnostic cmux-relay: &lt;public option&gt; requires a value. The output contains no vendor name, internal provider name, provider-specific flag, raw input, credential, token, or payload. The affected options are generic public relay options (--backend, --allow-root, --enrollment-file, and --config).

Full details: Cmux Full Internationalization

Explanation

PASS. The PR diff only adds an empty-string check and a regression-test argument in cmux-tui/crates/chatmux-relay/src/cli.rs. It does not add or change user-facing text. The missing_value diagnostic already existed before the PR, and the executable continues to print that existing message. No Swift, web, catalog, metadata, or locale files changed. The added test input is explicitly allowed by the rule.

Full details: Cmux Swiftui State Layout

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust CLI parser. The diff contains no Swift or SwiftUI changes, so the SwiftUI state-layout failure conditions do not apply.

Full details: Cmux Architecture Rethink

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust CLI parser. The diff adds empty-value rejection and a regression test. It changes no Swift, Objective-C, or Objective-C++ paths, so the Swift architectural-rethink failure conditions do not apply.

Full details: Cmux Swift Auxiliary Window Close Shortcuts

Explanation

PASS: The full PR diff from merge-base e45af14 changes only cmux-tui/crates/chatmux-relay/src/cli.rs (Rust). It adds empty-value rejection and a Rust test case. It introduces no Swift NSWindow, NSPanel, NSWindowController, Window, or WindowGroup code, so the auxiliary-window close-shortcut rule does not apply. The related CI checker is scripts/lint_auxiliary_window_close_shortcuts.py.

Full details: Cmux Source Artifacts

Explanation

PASS. The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs. The diff adds a deliberate CLI validation change and a regression test. The path is hand-written Rust source, which the rule explicitly allows. No local output, generated artifact, cache, build output, scratch directory, or copied artifact enters the diff.

Full details: Cmux No Test Or Debug Seam In Production Source

Explanation

PASS: The pull request changes only cmux-tui/crates/chatmux-relay/src/cli.rs, a Rust file. The diff contains no Swift files under a production Sources/ path and adds no test or debug seam. The custom check is therefore inapplicable.

Full details: Cmux No Ambient Global State

Explanation

PASS: The custom check applies only to production Swift changes. The complete pull-request diff from origin/main to HEAD changes one Rust file, cmux-tui/crates/chatmux-relay/src/cli.rs, and contains no Swift files or Swift declarations.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-tui-cli-error-audit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@lawrencecchen
lawrencecchen merged commit 495477e into main Aug 28, 2026
41 of 43 checks passed
@lawrencecchen
lawrencecchen deleted the feat-tui-cli-error-audit branch August 28, 2026 12:54
rustybret pushed a commit to rustybret/bmux that referenced this pull request Aug 28, 2026
495477e chatmux-relay: reject empty option values (manaflow-ai#11113)
e45af14 cmux-tui: preserve projection rail pointer routing

This branch was successfully deployed

2 active deployments
Preview – cmux41 — ba9a5581 Deployed Aug 28, 2026 by vercel[bot]
Preview – cmux166 — ba9a5581 Deployed Aug 28, 2026 by vercel[bot]
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