You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In-process CLI-form serve skips the CLI's flag validation and cross-flag guards #13006
#12818 lets the packaged binary handle a CLI-form serve launch in-process (<binary> serve --port 6768 …). That path reaches getServeOptions directly instead of going through the orca CLI, so it skips two layers of validation the CLI performs.
Nothing here regresses a valid launch — these are all invalid or typo'd invocations that the CLI rejects and the in-process path silently accepts.
1. Unknown flags are silently ignored
The CLI rejects unknown flags (src/cli/args.ts:304):
Flag --no-pairng is not valid for `orca serve`.
The in-process path passes anything it doesn't recognize straight through (src/main/startup/serve-mode-argv.ts:150), and getServeOptions only looks for the names it knows. So:
--no-pairing is security-shaped, so a typo reading as "accepted" is the same failure mode as #12677 — a flag that looks like it took effect but didn't.
2. Cross-flag guards are CLI-only
src/cli/handlers/core.ts:94-115 rejects these combinations; the in-process path accepts all three:
combination
CLI
in-process
--no-pairing + --mobile-pairing
error
accepted
--recipe-json + --no-pairing
error
accepted
--recipe-json + --mobile-pairing
error
accepted
(--recipe-json without --project-root is already guarded in printServeReady.)
Why it wasn't reachable before
Main's --serve path was previously only ever entered by the CLI, which had already validated. #12818 makes it reachable directly, so the asymmetry now has user-visible consequences.
Suggested fix
Mirror the handlers/core.ts guards into getServeOptions, and warn on (or reject) unrecognized --* tokens once serve mode is active. Rejecting unknown flags outright needs care — Chromium/Electron switches are an open set and legitimately appear in argv — so a targeted check against the known CLI serve flag names, or a warning rather than a hard error, is probably the right shape.
Related: #13004 (the AppImage redirect gate). Fixing that would route more launches back through the CLI, which validates — but it is Linux-only and does not cover Orca.exe serve … or the macOS binary, both of which reach the in-process path.
Activity
nwparker commentedon Sep 27, 2026
Closing as fixed by #17683. In-process CLI-form serve now applies the CLI flag validation and cross-flag guards before startup.