Skip to content

Fix missing return in restoreCLIArgument (main compile break) - #9334

Merged
azooz2003-bit merged 1 commit into
mainfrom
feat-fix-restore-cli-arg-return
Aug 1, 2026
Merged

azooz2003-bit merged 1 commit into
mainfrom
feat-fix-restore-cli-arg-return

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Aug 1, 2026 •

Copy link
Copy Markdown
Collaborator

#9265 (5bf9595) added restoreCLIArgument, a multi-statement method returning String? whose final expression has no explicit return. Swift only allows implicit return in single-expression bodies, so every target compiling SurfaceResumeCommandCanonicalizer+PortableAgentExecutable.swift fails; with ci.yml dispatch-only, the break landed silently and now fails every merge-gate run (first seen in https://github.com/manaflow-ai/cmux/actions/runs/30680626823, blocking #9329).

One line: add the return. Behavior is what #9265 intended; no test needed beyond compilation, which every gate run exercises.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fix Swift compile break by adding a missing explicit return in restoreCLIArgument. Builds now succeed for all targets and CI is unblocked; behavior is unchanged.

Written for commit 8994dd9. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Restored command-line arguments now preserve and return their canonical raw values, improving consistency when resuming agent operations.

5bf9595 (#9265) left the final expression of a multi-statement String?
method without an explicit return; every target compiling this file fails,
which currently blocks all merge-gate runs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 1, 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: d08d5370-b6d6-4486-9b4a-2f221bb62064

📥 Commits

Reviewing files that changed from the base of the PR and between 6e2edb1 and 8994dd9.

📒 Files selected for processing (1)
  • Sources/SurfaceResumeCommandCanonicalizer+PortableAgentExecutable.swift

📝 Walkthrough

Walkthrough

restoreCLIArgument now returns the canonical raw value from AgentRestoreCLIArgument after validation.

Changes

Restore argument canonicalization

Layer / File(s) Summary
Return the canonical restore value
Sources/SurfaceResumeCommandCanonicalizer+PortableAgentExecutable.swift
restoreCLIArgument returns the validated argument’s canonical rawValue.

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

Suggested reviewers: austinywang

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the missing return that fixes the main Swift compilation failure.
Description check ✅ Passed The description explains what changed, why it changed, and how compilation was verified; the demo video is not relevant to this compile-only fix.
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 The diff only adds an explicit return to existing private restoreCLIArgument; it introduces no actors, Sendable types, protocols, models, or UI/background access.
Cmux Swift Blocking Runtime ✅ Passed The production Swift diff changes only an enum-value expression to an explicit return; it introduces no semaphore, wait, sleep, delayed dispatch, polling, sync, or lock.
Cmux Browser Automation Off-Main ✅ Passed PASS: The diff changes only restoreCLIArgument in a resume-command file by adding return; it changes no browser socket automation routing or worker policy.
Cmux Expensive Synchronous Load ✅ Passed The diff changes only one expression in restoreCLIArgument by adding return; it adds no synchronous agent-history load or interactive-path data access.
Cmux Cache Substitution Correctness ✅ Passed The diff only adds an explicit return; it does not replace an authoritative read with a cached value. The method still validates supplied snapshot fields via AgentRestoreCLIArgument.
Cmux No Hacky Sleeps ✅ Passed The diff changes only a Swift source file and adds an explicit return; it introduces no TypeScript, JavaScript, shell, or build/runtime sleep or timer logic.
Cmux Algorithmic Complexity ✅ Passed The diff only adds an explicit return to restoreCLIArgument; it introduces no collection scans, sorting, filtering, joins, or algorithmic work.
Cmux Swift Concurrency ✅ Passed The commit changes only one Swift line: it adds return to restoreCLIArgument; it introduces no legacy concurrency pattern.
Cmux Swift @Concurrent ✅ Passed The diff only adds return to synchronous restoreCLIArgument; it introduces no async, nonisolated, @concurrent, actor isolation, or async call-site changes.
Cmux Swift Package Boundaries ✅ Passed The diff changes one existing app-target method by adding return; it introduces no feature logic or material expansion, so it does not violate the package-boundary rule.
Cmux Swiftpm Lockfiles ✅ Passed The commit changes only a Swift source return statement; it does not modify Package.swift, Package.resolved, .gitignore, workflows, dependencies, or Xcode package references.
Cmux Swift Logging ✅ Passed The parent-to-HEAD diff only adds an explicit return in restoreCLIArgument; it adds or changes no logging, stdout, stderr, or sensitive-data diagnostics.
Cmux User-Facing Error Privacy ✅ Passed The only production change adds an explicit Swift return; it introduces or changes no user-facing error, alert, command output, or recovery text.
Cmux Full Internationalization ✅ Passed The commit changes only one Swift return statement; it adds no user-facing text, localization key, catalog entry, web message, or locale-dependent data.
Cmux Swiftui State Layout ✅ Passed The diff changes only a return statement in a non-UI canonicalizer; it adds no SwiftUI state, layout measurement, lazy-row store reference, or render-time mutation.
Cmux Architecture Rethink ✅ Passed The diff adds only an explicit return in restoreCLIArgument; it introduces no timing, state ownership, wiring, lifecycle, or synchronization changes.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The diff only adds an explicit return in restoreCLIArgument; it adds or materially changes no NSWindow, NSPanel, Window, or WindowGroup code.
Cmux Source Artifacts ✅ Passed The only changed path is the intentional Swift source file Sources/SurfaceResumeCommandCanonicalizer+PortableAgentExecutable.swift; no artifact path or generated output enters the diff.
Cmux No Test Or Debug Seam In Production Source ✅ Passed The PR changes only one production Swift line: it adds an explicit return to restoreCLIArgument; it adds no test/debug guard, seam, accessor, or visibility change.
Cmux No Ambient Global State ✅ Passed The PR changes only line 78 inside the existing private static method; it adds an explicit return and introduces no global function, mutable global, namespace type, or singleton.
✨ 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-fix-restore-cli-arg-return

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.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Re-trigger cubic

azooz2003-bit added a commit that referenced this pull request Aug 1, 2026
…n fix PR 9334)

origin/main 5bf9595 (#9265) landed a compile error with CI paused.
Same one-line fix as #9334 so the
change dedupes when that PR merges.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@azooz2003-bit
azooz2003-bit merged commit 6846070 into main Aug 1, 2026
7 checks passed
@azooz2003-bit
azooz2003-bit deleted the feat-fix-restore-cli-arg-return branch August 1, 2026 04:52
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