Repository navigation
feat(serve): optional --bind <addr> to pin the runtime listener - #25861
xuanchangfeng wants to merge 7 commits into
Conversation
Thread an explicit orca serve --bind value through ServeOptions into the existing pinnedBindHost option; absent flag keeps current behavior. Reuse resolveOrcadBindHost validation and reject a non-wildcard --bind combined with --mobile-pairing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ccd82c39-95ac-4444-9ec8-ff7cd8b80766
📒 Files selected for processing (7)
docs/reference/headless-linux-server.mdsrc/cli/specs/serve.tssrc/main/startup/main-process-runtime-launch.tssrc/main/startup/serve-mode-argv.tssrc/main/startup/serve-options.test.tssrc/main/startup/serve-options.tssrc/shared/serve-option-validation.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c1bac909-9d74-4efe-9fa6-58f392284696
📒 Files selected for processing (4)
src/cli/handlers/core.tssrc/cli/index-serve-command.test.tssrc/cli/runtime/launch.test.tssrc/cli/runtime/launch.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Hi @nwparker, I saw your recent work on This is my first contribution to Orca, opened on October 6. It adds an optional I've updated the PR against Local validation: 10 focused suites, 151 passed / 4 skipped; CLI typecheck, changed-file lint (including the React Doctor config), formatting and whitespace checks passed. The full suite/build were not run locally; the PR description records the resource limits and checks run. The seven CI workflow runs are awaiting maintainer approval; could someone with permission approve them when convenient? I appreciate that review time is limited. Thank you for your time, and I'm happy to make further changes. |
Retain both bind validation and upstream speech recognizer discovery in the serve launcher. Focused verification: 155 passed, 4 macOS-only skipped; CLI native typecheck and changed-file lint/format passed. No dependency downloads.
ELI5
An operator running
orca servebehind an SSH port-forward or tunnel can keep the listener on loopback with--bind 127.0.0.1. Leaving out the flag preserves the existing behavior.What Changed
--bind <addr>to the CLI and direct Electron serve parser. Accept literal IP addresses, withlocalhostmapped to127.0.0.1.shared/runtime-bind-address.ts; keep orcad's existing exports for its current callers. CLI flag parsing follows the existing port-flag pattern.orcad-serve-argv.tsto forward the pin to both Electron and orcad.--mobile-pairing, whose listener widening would fail. Keep--pairing-addressindependent for SSH-forward and tunnel endpoints.Why
The runtime already implements
pinnedBindHostand refuses to widen a pinned listener. This exposes that mechanism throughorca serve, without adding a separate binding policy or changing defaults.Linked Issue
Fixes #25837
Visual Proof
N/A: CLI arguments and startup behavior only.
Testing
Updated against
main@885cd6ff4in52d1f17ccon 2026-10-22. Resolved one import conflict by retaining both bind validation and upstream speech recognizer discovery; no new feature behavior was added in this synchronization.@orca/process-hostpackage build: passed.node config/scripts/run-typecheck-projects-in-parallel.mjs --compiler=native --project=config/tsconfig.tc.cli.json, passed.oxlint --threads=2, React Doctor lint, andoxfmt --check, passed.git diff origin/main --check: passed.No dependencies were downloaded or installed for the 2026-10-22 update. Local tools were previously restored offline from the previously verified
main@98b4139e0dependency snapshot, with install scripts disabled. The TypeScript, Vitest, oxlint and oxfmt version requirements are unchanged. The latest upstream manifests and lockfile are unchanged in this PR. CI must still validate the current lockfile and upstream's default Bun typecheck path.orca serve --bindlaunch testedAI Disclosure
Original implementation assisted by the pi coding agent (DeepSeek V4.1 Flash), with planning and review assistance from Claude. Upstream synchronization, conflict resolution, shared validation cleanup and local verification were assisted by OpenAI Codex. The author owns the submission.
Review
The update follows upstream's runtime selection, shared argv construction, service supervision, profile pinning and process-host spawning. Existing orcad address-resolution exports remain compatible. There is no protocol or persisted-data change.
Agent skill upstream boundary
Notes
Full tests, full lint, desktop/mobile builds and a real server smoke test were not run locally. A previous full run exhausted the VM, so validation ran sequentially with one test worker and reduced memory/thread budgets.
The merge commit skipped the default staged-file hook because it would process the upstream merge's unrelated files. The corresponding lint/format checks were run on this PR's actual diff instead. No hook configuration was changed.
Checklist
Author
X (Twitter) handle: N/A