Skip to content

fix(cli): preserve multiline arguments on Windows - #8374

Merged
OrcaWin merged 3 commits into
mainfrom
nwparker/bug-orchestration-send-body-silently-stores-only
Jul 12, 2026
Merged

OrcaWin merged 3 commits into
mainfrom
nwparker/bug-orchestration-send-body-silently-stores-only

Conversation

@nwparker

@nwparker nwparker commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #8369

ELI5

The old Windows launcher treated each newline like the end of the command, so a multi-paragraph message arrived with only its first line. This replaces that launcher with one that carries the whole message as a single argument. If someone explicitly uses the old .cmd path for orchestration messages, Orca now stops with a clear instruction instead of pretending the truncated message was sent.

Summary

  • ship a native orca.exe launcher so PowerShell and Git Bash pass multiline arguments without cmd.exe reparsing %*
  • make packaged CLI registration and smoke paths prefer the native launcher while retaining orca.cmd as a compatibility shim
  • fail clearly when the legacy batch shim is used for orchestration message bodies instead of silently truncating them
  • build the launcher in every Windows packaging path and cover the PowerShell multiline flow with a Windows-only end-to-end test

Verification

  • pnpm typecheck
  • 109 targeted CLI/packaging tests passed (plus the Windows-only launcher test, skipped on macOS)
  • 170 orchestration/runtime/package-contract tests passed
  • targeted oxlint, oxfmt, and git diff --check passed

@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a native C# Windows CLI launcher and Node-based build flow, including compiler discovery and argument/environment handling tests. Integrates launcher compilation into Windows rebuilds and packages the resulting orca.exe. Updates Windows command routing, installer paths, runtime shim resolution, packaged CLI smoke tests, and batch compatibility behavior. Adds coverage for multiline orchestration payload handling and updates Windows workflow test and cache inputs.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

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.
Description check ⚠️ Warning The description omits required template sections like Screenshots, Testing checklist, AI Review Report, Security Audit, and Notes. Add the missing headings and fill them out, including screenshot status, test checklist, AI review and security summaries, and any platform-specific notes.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR preserves multiline input via a native Windows launcher, adds a clear legacy-shim failure path, and includes the Windows-only test for #8369.
Out of Scope Changes check ✅ Passed All changes support the Windows CLI launcher fix, packaging, tests, or related comments; no unrelated scope appears introduced.
Title check ✅ Passed The title clearly matches the main change: preserving multiline CLI arguments on Windows.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@nwparker
nwparker force-pushed the nwparker/bug-orchestration-send-body-silently-stores-only branch from 220012f to 7f930d1 Compare July 12, 2026 08:59
@OrcaWin
OrcaWin merged commit ee82d66 into main Jul 12, 2026
7 checks passed
nwparker added a commit that referenced this pull request Sep 30, 2026
)

* docs(security): add the antivirus clearance path for future releases

Every AV false positive here has been handled one vendor and one shipped
version at a time. Document the programs that clear future releases instead --
signer and product enrollment rather than per-build sample submission -- and add
a script that reports an RC's current detection state by hash, so a verdict is
found before users meet it in an issue report.

Hash lookup only by default; --upload transmits the artifact and stays manual.

* fix(windows): replace the managed CLI launcher with a native one

resources\bin\orca.exe was a csc-compiled MSIL assembly: a small, freshly
compiled .NET image in a user-writable directory that mutates environment
variables and proxies a child process. That is the shape .NET dropper
heuristics are trained on, and every verdict against it named the family --
MSILHeracles from two vendors, Wacatac!ml from a third. Signing the file does
not change its shape, so signing never cleared it.

Rebuild it in Rust. Same resolution, same environment contract, same argv
passthrough that keeps newline-bearing orchestration bodies intact (#8374), and
the child still inherits our environment block rather than an explicit map, so
a block carrying both PATH and Path survives (#12046). The PE now carries
publisher, version, icon and an asInvoker manifest from build.rs.

Refs #23383

* ci(windows): install the Rust toolchain before building the CLI launcher

The hosted runners happen to ship cargo, but a real Windows dev box does not --
verified on our own Windows QA host, where cargo and rustc were both absent.
Relying on the image means a future image change fails deep inside
electron-builder's native hook instead of at an obvious step.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix(cli): preserve multiline Windows arguments

* test(cli): run Windows launcher regression in CI

* fix(cli): support Windows Framework C# compiler
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.

[Bug]: orchestration send --body silently stores only the first line of multiline input

2 participants