Skip to content

THROWAWAY — do not merge: internal WSL mover build - #35308

Closed
nwparker wants to merge 1 commit into
mainfrom
nwparker/DO-NOT-MERGE-wsl-mover-internal-build-37
Closed

nwparker wants to merge 1 commit into
mainfrom
nwparker/DO-NOT-MERGE-wsl-mover-internal-build-37

Conversation

@nwparker

@nwparker nwparker commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​29 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​28

Throwaway build PR for an internal test install (main 8866280 plus the internal-build guard and unpacked-app upload). It will be closed without merging once the build artifacts are downloaded.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR affects the Windows package workflow and packaged Windows startup.

The uninstall helper must be exempted from the profile guard before this build is used for installs that need WSL cleanup.

Findings

  1. P1 Uninstall cleanup is blocked ▶

Summary

This throwaway build adds a Windows profile guard and uploads the unpacked Windows app.

  • Packaged Windows launches need a separate profile to start.
  • The Windows build now publishes an unpacked app for download.

Reviews (1) · Last reviewed commit: "DO NOT MERGE: internal build guard (Wind..." · Reviewed by Greptile

Comment thread src/main/index.ts
Comment on lines +111 to +116
if (internalBuildProfileMissing) {
dialog.showErrorBox(
'Orca internal build',
'Start this build with launch-orca-wsl-mover-internal.cmd (or its Desktop shortcut) so it uses its own profile.'
)
app.exit(1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Uninstall cleanup is blocked

When a default profile has recorded WSL holders, NSIS launches Orca.exe --orca-uninstall-release-wsl-holders without --user-data-dir. The new guard shows the launcher error and exits before runWslHolderUninstallPreflight() can run. Uninstall waits for the dialog, and the recorded WSL holders stay running.

Run the uninstall preflight before the new guard.

Knowledge Base Used: Desktop application platform

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The Windows packaging workflow removes the preflight dependency from package_windows and uploads dist/win-unpacked as the orca-win-unpacked artifact for five days. Packaged Windows startup now requires --user-data-dir or ORCA_E2E_USER_DATA_DIR. If neither is present, the app displays an error and exits with code 1. The existing WSL holder-uninstall and main-process preflight checks run only when the startup guard passes.

Priority: Low

Merge Risk: Low · up to 51ee0

The packaged build can start without the required isolated profile when given an empty user-data-dir argument; validate the value before merging.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Description check Warning The description has the orca-pr-loc block and a short note. It says this is a throwaway build for an internal test install and that it will be closed without merging. It is missing most required templ… Fill in the template sections. Describe the before and after behavior of the packaged Windows startup check and the new orca-win-unpacked artifact upload. Explain the mechanism and why the guard is needed. Add a Linked Issue or state that t…
Title check Inconclusive The title says the PR is a throwaway, do-not-merge build for an internal WSL mover. It names no real code change. The changeset adds a packaged-Windows check for --user-data-dir and uploads dist/win-u… Replace the title with a short, specific summary of the main change. For example: "Require --user-data-dir on packaged Windows builds and upload unpacked app artifact." If the PR is only a throwaway test build, keep the do-not-merge note in…
Passed Passed checks: 3 passed
Check name Status Explanation
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The description has the orca-pr-loc block and a short note. It says this is a throwaway build for an internal test install and that it will be closed without merging. It is missing most required template sections: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, AI Disclosure (if applicable), Review, the agent skill upstream boundary checkbox, Notes, and the checklist. It also does not describe the --user-data-dir guard or the artifact upload in terms of user-visible behavior.

Resolution

Fill in the template sections. Describe the before and after behavior of the packaged Windows startup check and the new orca-win-unpacked artifact upload. Explain the mechanism and why the guard is needed. Add a Linked Issue or state that the PR is a throwaway with no issue. Mark Visual Proof as N/A with a reason, or attach before and after evidence. In Testing, list the platforms tested and the steps. Complete the checklist and the agent skill upstream boundary checkbox.

Full details: Title check

Explanation

The title says the PR is a throwaway, do-not-merge build for an internal WSL mover. It names no real code change. The changeset adds a packaged-Windows check for --user-data-dir and uploads dist/win-unpacked as an artifact. The title is vague about the technical change, and it signals that the PR is not meant to merge. It is not wholly off-topic, since it describes the internal build purpose.

Resolution

Replace the title with a short, specific summary of the main change. For example: "Require --user-data-dir on packaged Windows builds and upload unpacked app artifact." If the PR is only a throwaway test build, keep the do-not-merge note in the description or a draft state instead of the title.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b7c3aabe-d9b3-4c15-a566-f24c7081baf4
Commits

Reviewing files that changed from the base of the PR and between 8866280 and 51ee0c6.

Files selected for processing: 2
  • .github/workflows/pr.yml
  • src/main/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Comment thread src/main/index.ts
const internalBuildProfileMissing =
process.platform === 'win32' &&
app.isPackaged &&
!app.commandLine.hasSwitch('user-data-dir') &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor · Data Integrity & Integration · Quick win

Supported by static analysis

Script executed:

set -o pipefail
printf '%s\n' '--- diff ---'
git diff --no-ext-diff --unified=40 88662806c0e47d8bdde5ef44e03418aeb71b22c0 51ee0c676c15098a7f92b6cfb1528240a962b029 -- src/main/index.ts
printf '%s\n' '--- index guard context ---'
nl -ba src/main/index.ts | sed -n '70,135p'
printf '%s\n' '--- switch/environment references ---'
rg -n -F --glob '!node_modules/**' -e 'user-data-dir' -e 'ORCA_E2E_USER_DATA_DIR' .
printf '%s\n' '--- package electron declaration ---'
rg -n -F -e '"electron"' -e "'electron'" package.json pnpm-lock.yaml yarn.lock package-lock.json 2>/dev/null || true

Repository: stablyai/orca

Length of output: 25911


Script executed:

set -o pipefail
printf '%s\n' '--- internal launcher names and WSL mover references ---'
rg -n -i --glob '!node_modules/**' -e 'launch-orca-wsl-mover' -e 'wsl.?mover' -e 'internal build' -e 'userDataPath' -e 'user-data-dir=' config src .github package.json tests | sed -n '1,260p'
printf '%s\n' '--- switch consumer ---'
nl -ba src/main/startup/windows-app-data-path.ts | sed -n '1,130p'
printf '%s\n' '--- startup configuration references ---'
rg -n -F -e 'configureProcess' -e 'windowsAppDataPath' -e 'setPath' src/main/index.ts src/main/startup src/main | sed -n '1,220p'
printf '%s\n' '--- direct startup path context ---'
nl -ba src/main/index.ts | sed -n '1,75p'

Repository: stablyai/orca

Length of output: 41469


Script executed:

set -o pipefail
printf '%s\n' '--- exact startup callers ---'
rg -n -F -e 'ensureWindowsAppDataPath' -e 'configureProcess(' -e 'configureProcess' src config tests | sed -n '1,180p'
printf '%s\n' '--- startup entry files ---'
rg -n -F -e 'from "./index"' -e "from './index'" -e 'src/main/index' -e 'main/index' package.json electron.vite.config.* config src 2>/dev/null | sed -n '1,160p'

Repository: stablyai/orca

Length of output: 12555


Validate the user-data-dir switch value.

hasSwitch('user-data-dir') accepts a present switch with an empty value. A direct packaged Windows launch with --user-data-dir= can therefore bypass the profile guard. Check the trimmed switch value instead.

This supports the blank-value case. The available source does not establish that every non-empty malformed path is invalid.

Proposed fix
--- "a/src/main/index.ts"
+++ "b/src/main/index.ts"
@@ -106,7 +106,7 @@
 const internalBuildProfileMissing =
   process.platform === 'win32' &&
   app.isPackaged &&
-  !app.commandLine.hasSwitch('user-data-dir') &&
+  !app.commandLine.getSwitchValue('user-data-dir').trim() &&
   !process.env.ORCA_E2E_USER_DATA_DIR
 if (internalBuildProfileMissing) {
   dialog.showErrorBox(
Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
!app.commandLine.hasSwitch('user-data-dir') &&
!app.commandLine.getSwitchValue('user-data-dir').trim() &&

@nwparker nwparker closed this Oct 28, 2026
@nwparker
nwparker deleted the nwparker/DO-NOT-MERGE-wsl-mover-internal-build-37 branch October 28, 2026 20:47
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