Skip to content

fix(cli): unwrap Result from shell_quote_join call in route_check#100

Merged
fohte merged 1 commit intomainfrom
fohte/fix-route-type-mismatch
Feb 25, 2026
Merged

fix(cli): unwrap Result from shell_quote_join call in route_check#100
fohte merged 1 commit intomainfrom
fohte/fix-route-type-mismatch

Conversation

@fohte
Copy link
Owner

@fohte fohte commented Feb 25, 2026

Why

  • shell_quote_join return type was changed to Result<String, QuoteError>, but the call site in route_check was not updated to unwrap it, causing a type mismatch compile error in the if/else branches
    • CI (Test workflow) on the main branch was failing, blocking all PR merges

What

  • Add the ? operator to the shell_quote_join call to properly unwrap the Result

Open with Devin

`shell_quote_join` was changed to return `Result<String, QuoteError>`
in the shlex migration, but the call site in `route_check` was not
updated. The if/else branches had incompatible types (`String` vs
`Result<String, QuoteError>`), causing a compile error that blocked CI.

Add `?` operator to unwrap the Result, which is safe because
`route_check` already returns `anyhow::Result`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @fohte, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical compilation error that arose after a change in the shell_quote_join function's return type. The route_check function was not correctly handling the new Result type, leading to build failures. The change ensures that the application correctly processes the output of shell_quote_join, restoring the build process and allowing further development.

Highlights

  • Compilation Fix: Resolved a compilation error in the route_check function caused by a type mismatch. The shell_quote_join function's return type was changed to Result<String, QuoteError>, but the call site was not updated to handle the Result.
  • Error Handling: Implemented proper error handling for the shell_quote_join call by adding the ? operator, unwrapping the Result and propagating any potential QuoteError.
  • CI Unblocked: This fix unblocks the CI (Test workflow) on the main branch, which was previously failing and preventing pull request merges.
Changelog
  • schema/runok.schema.json
    • Added a new JSON schema for the runok configuration, defining its structure including rules, defaults, definitions, and sandbox policies.
  • src/cli/route.rs
    • Modified the shell_quote_join call to use the ? operator, correctly unwrapping its Result return type and resolving a compilation error.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.85%. Comparing base (3f5e6cf) to head (6748fc9).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
+ Coverage   89.82%   89.85%   +0.02%     
==========================================
  Files          29       29              
  Lines        6142     6160      +18     
==========================================
+ Hits         5517     5535      +18     
  Misses        625      625              
Flag Coverage Δ
Linux 89.69% <100.00%> (+0.03%) ⬆️
macOS 91.83% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates error handling for the shell_quote_join function in src/cli/route.rs and adds a new JSON schema file. The changes have been reviewed and no issues were found.

@fohte fohte merged commit 730633e into main Feb 25, 2026
6 checks passed
@fohte fohte deleted the fohte/fix-route-type-mismatch branch February 25, 2026 01:23
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@fohte-bot fohte-bot bot mentioned this pull request Feb 25, 2026
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