Skip to content

Fix missing return in restoreCLIArgument breaking nightly Release build - #9343

Merged
austinywang merged 1 commit into
mainfrom
fix-nightly-missing-return-restore-cli-arg
Aug 1, 2026
Merged

austinywang merged 1 commit into
mainfrom
fix-nightly-missing-return-restore-cli-arg

Conversation

@austinywang

@austinywang austinywang commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Nightly builds have been failing since #9265 merged: build-nightly-app dies with

Sources/SurfaceResumeCommandCanonicalizer+PortableAgentExecutable.swift:78:9: error: missing return in static method expected to return 'String?'

restoreCLIArgument has a multi-statement body (guard + expression), so Swift's implicit return does not apply; the final AgentRestoreCLIArgument(rawValue:)?.rawValue expression needs an explicit return. One-line fix, no behavior change beyond restoring the intended return value.

Verified against nightly run 30683617062 (first run to reach a runner after repointing MACOS_RUNNER_26_NIGHTLY_BUILD from the dead blacksmith-12vcpu-macos-26 pool to warp-macos-26-arm64-6x).

🤖 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 nightly Release build failure by adding an explicit return in restoreCLIArgument. Restores the intended String? return and unblocks nightly builds.

Written for commit 7b85035. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved consistency when restoring command-line arguments by preserving their canonical raw values.

@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: 680e33c9-708c-472c-9812-3e7645b60125

📥 Commits

Reviewing files that changed from the base of the PR and between cdb35d7 and 7b85035.

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

📝 Walkthrough

Walkthrough

The restore CLI argument canonicalizer now returns the matched AgentRestoreCLIArgument case’s canonical rawValue. Other behavior remains unchanged.

Changes

Restore argument canonicalization

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

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

Possibly related PRs

🚥 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 and its impact on the nightly Release build.
Description check ✅ Passed The description explains what changed, why it changed, and how the fix was verified; template checklist items are omitted.
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 production diff only adds return to restoreCLIArgument; it adds no actor, Sendable, async, UI-store, or MainActor-related declaration or access.
Cmux Swift Blocking Runtime ✅ Passed The HEAD diff changes only one production Swift line, adding an explicit return; it introduces no semaphore, wait, sleep, delayed dispatch, polling, sync, or lock primitive.
Cmux Browser Automation Off-Main ✅ Passed The HEAD diff changes only restoreCLIArgument in Sources/SurfaceResumeCommandCanonicalizer+PortableAgentExecutable.swift; no browser socket command, routing, WebKit/AppKit access, or policy tests c...
Cmux Expensive Synchronous Load ✅ Passed The only production change adds return before an existing enum conversion expression; it adds no agent-history load, parsing, directory scan, syscall loop, or interactive-path work.
Cmux Cache Substitution Correctness ✅ Passed The diff only adds an explicit return to restoreCLIArgument; it does not replace an authoritative read with a cache or change persistence, history, undo, or snapshot behavior.
Cmux No Hacky Sleeps ✅ Passed The only diff adds an explicit return in a Swift source file; it introduces no TypeScript, JavaScript, shell, build/runtime script, or sleep/delay code.
Cmux Algorithmic Complexity ✅ Passed The diff changes one Swift expression to an explicit return in restoreCLIArgument; it adds no collection scan, nesting, sorting, filtering, join, or algorithmic path.
Cmux Swift Concurrency ✅ Passed The one-line diff only adds an explicit return to restoreCLIArgument; it introduces no Dispatch, Combine, completion-handler, or fire-and-forget Task pattern.
Cmux Swift @Concurrent ✅ Passed The diff only adds an explicit return to synchronous restoreCLIArgument; it introduces no async, nonisolated, @concurrent, actor isolation, or UI-heavy call-site change.
Cmux Swift Package Boundaries ✅ Passed The diff is one explicit return in an existing private helper; it introduces no feature logic or package-boundary expansion.
Cmux Swiftpm Lockfiles ✅ Passed The commit changes only the Swift source file; it has no Package.swift, Package.resolved, .gitignore, Xcode project, workspace, workflow, or dependency changes.
Cmux Swift Logging ✅ Passed The diff only adds an explicit return to restoreCLIArgument; it adds no print, Logger, file, stdout, or sensitive-data logging.
Cmux User-Facing Error Privacy ✅ Passed The sole production diff adds an explicit return in restoreCLIArgument; it adds or changes no user-facing error, alert, command output, or recovery text.
Cmux Full Internationalization ✅ Passed The PR only adds an explicit return to existing CLI-token handling; it adds no user-facing text, localization keys, catalogs, or web messages.
Cmux Swiftui State Layout ✅ Passed The diff only adds an explicit return in a non-SwiftUI helper; it introduces no ObservableObject, GeometryReader, lazy-row store reference, or render-time state mutation.
Cmux Architecture Rethink ✅ Passed The commit changes one existing Swift helper line by adding an explicit return; it adds no timing, state, lifecycle, locking, observer, or duplicate wiring path.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The PR only adds an explicit return in restoreCLIArgument; it introduces or changes no NSWindow, NSPanel, NSWindowController, WindowGroup, or close-shortcut code.
Cmux Source Artifacts ✅ Passed The only changed path is the tracked Swift source file, and the diff adds one explicit return; no artifact, cache, log, or scratch path was added.
Cmux No Test Or Debug Seam In Production Source ✅ Passed The complete PR diff changes only one production Swift line: it adds an explicit return and introduces no test/debug guard, seam member, or visibility widening.
Cmux No Ambient Global State ✅ Passed The commit changes only an existing private static method by adding an explicit return; it adds 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 fix-nightly-missing-return-restore-cli-arg

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

@austinywang
austinywang merged commit 51a95f8 into main Aug 1, 2026
7 checks passed
@austinywang
austinywang deleted the fix-nightly-missing-return-restore-cli-arg branch August 1, 2026 04:39
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