Skip to content

Windows 4/5: packaging, standalone runtime, and updates - #1009

Merged
arul28 merged 15 commits into
codex/windows-desktop-syncfrom
codex/windows-packaging-updates
Aug 3, 2026
Merged

Windows 4/5: packaging, standalone runtime, and updates#1009
arul28 merged 15 commits into
codex/windows-desktop-syncfrom
codex/windows-packaging-updates

Conversation

@arul28

@arul28 arul28 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Stack position

Windows 4/5 · parent: #1008 · downstream: #1010

This is layer 4 of stack #1011. No layer merges independently; PR #1010 is the cumulative full-system head.

Based on the Windows implementation by @nsxdavid in #999.

Responsibilities

  • Per-user NSIS Stable/Beta install, repair, reinstall, uninstall, PATH, deep links, associations, and startup registration.
  • Standalone ade-win32-x64 CLI/brain/runtime artifact, native dependencies, checksums, and PowerShell installer/updater.
  • Windows remote-runtime bootstrap and Windows-aware ade brain lifecycle/doctor/update.
  • Canonical Authenticode configuration and signed update artifacts without changing macOS/iOS releases.
  • Clean-image installed-product tests.

Exclusions

Public Windows release and website flags remain disabled. Signing proof and publication gates are completed cumulatively in #1010.

Validation

Draft checkpoint: direct-parent desktop and ADE CLI typechecks pass. Focused worker contracts are green; coordinator import, installed NSIS proof, two-version update proof, and signing verification are pending.

Evidence and provenance

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Aug 3, 2026 9:56pm

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e1580180-ee00-4260-bb2b-74c4c6399865

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@arul28 arul28 changed the title codex/windows packaging updates Windows 4/5: packaging, standalone runtime, and updates Aug 1, 2026
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from 8cb0bf0 to c4f935e Compare August 2, 2026 02:55
@arul28
arul28 marked this pull request as ready for review August 2, 2026 02:55
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from 9de88ae to ecd30ad Compare August 2, 2026 02:55
@arul28

arul28 commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@CodeRabbit review. @greptile-apps review.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

@arul28: I will review pull request #1009 in its stack context.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from c4f935e to 936722b Compare August 2, 2026 03:05
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from ecd30ad to d4d6c68 Compare August 2, 2026 03:06
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from 936722b to 34cbcdd Compare August 2, 2026 03:14
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from d4d6c68 to 763067f Compare August 2, 2026 03:14
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from 34cbcdd to a3e370e Compare August 2, 2026 06:06
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from 763067f to cfa91b8 Compare August 2, 2026 06:06
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from a3e370e to f2eabb4 Compare August 2, 2026 07:34
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from cfa91b8 to 76cc8c3 Compare August 2, 2026 07:34
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from f2eabb4 to 2d24eb1 Compare August 2, 2026 17:51
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from 76cc8c3 to 6940838 Compare August 2, 2026 17:51
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from 2d24eb1 to 7ee4417 Compare August 2, 2026 17:59
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from 6940838 to 37cb390 Compare August 2, 2026 17:59
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from 7ee4417 to ecbfd45 Compare August 2, 2026 18:45
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch 2 times, most recently from dcb7fc5 to a8c5c3f Compare August 2, 2026 18:54
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from 4a4789a to 9370628 Compare August 2, 2026 21:08
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from a8c5c3f to 0637a09 Compare August 2, 2026 21:08
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from ad22566 to e1cfd3b Compare August 2, 2026 23:21
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from ccc81c8 to bbb5062 Compare August 2, 2026 23:55
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch 3 times, most recently from 7076f4b to 525cf41 Compare August 3, 2026 02:18
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from de72b94 to 19da3b5 Compare August 3, 2026 03:05
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from 525cf41 to 8733290 Compare August 3, 2026 03:05
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from 19da3b5 to 36d9a39 Compare August 3, 2026 03:09
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from 8733290 to 9174aa5 Compare August 3, 2026 03:09
@arul28
arul28 force-pushed the codex/windows-desktop-sync branch from 36d9a39 to f7575bf Compare August 3, 2026 03:11
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from 9174aa5 to 376db78 Compare August 3, 2026 03:11
nsxdavid and others added 11 commits August 3, 2026 05:09
Keep PR 1 independently buildable while preserving the cumulative #999 release configuration in its owning layer.

Co-authored-by: David Whatley <nsxdavid@gmail.com>

Based-on: nsxdavid/ADE#999
Restore the cumulative #999 release repository contract at its packaging layer.

Co-authored-by: David Whatley <nsxdavid@gmail.com>

Based-on: nsxdavid/ADE#999
Co-authored-by: David Whatley <nsxdavid@gmail.com>

Based-on: nsxdavid/ADE#999
Co-authored-by: David Whatley <nsxdavid@gmail.com>

Based-on: nsxdavid/ADE#999
Add Windows 10/11 x64 platform detection, encoded PowerShell control, verified SFTP artifact installation, channel-aware runtime launch, discovery support, packaging coverage, and focused regression tests.

Co-authored-by: David Whatley <nsxdavid@gmail.com>

Based-on: nsxdavid/ADE#999
(cherry picked from commit f1158a24ab56ada7a405adf54cf5a3c1f295e6a0)
…ntry

Channel builds derived the installer file name from ${productName}, so Beta
produced "ADE Beta-<ver>-win-x64.exe". electron-builder writes that name to
disk but rewrites latest.yml's url/path to a space-free "safe" name
("ADE-Beta-...") because its own GitHub publisher uploads under that name.
release-core.yml does not use that publisher: it uploads the on-disk file with
`gh release upload`, where GitHub normalizes the asset name again. A Beta
publish would therefore ship a feed pointing at a file that never existed, and
electron-updater would 404. Stable was unaffected only because "ADE" happens to
be GitHub-safe already.

Pin the artifact name to a space-free per-channel base so the built file,
latest.yml, and the published asset are byte-identical on every channel, and
fail validation if the name ever stops being GitHub-safe. The Stable installer
pattern and the workflow globs now require a digit after "ADE-" so they select
the Stable installer regardless of whether a Beta installer sits beside it.

Product name, install directory, and executable name are unchanged; only the
distributable file name moves.

Based-on: nsxdavid/ADE#999
(cherry picked from commit 16f24f5fafaf2eb88f64f3e22caf7499184d2eca)
The installed-product smoke asserts that each channel registers exactly one
HKCU uninstall entry whose DisplayName is the product name and whose
DisplayVersion carries the version. electron-builder defaults
nsis.uninstallDisplayName to "${productName} ${version}", and package.json
never set it, so the Stable install registered DisplayName "ADE 1.0.0-beta.1"
and the smoke's `DisplayName -eq "ADE"` filter matched nothing. That step had
never executed before this batch - every earlier package-win run failed at the
preceding Beta build - so the contract was written but never met.

Windows expects DisplayName to identify the product and DisplayVersion to
carry the version, and Stable/Beta side-by-side installs are only tellable
apart when each channel owns one DisplayName that does not move every release.
Pin uninstallDisplayName to ${productName} and fail preflight validation if it
ever drifts back to the electron-builder default.

Based-on: nsxdavid/ADE#999
(cherry picked from commit 862c41d87b6ca932cc9e382c981ee41b3914b9f6)
opencode-ai's postinstall probes IsProcessorFeaturePresent(40) and picks
opencode-windows-x64-baseline on x64 CPUs without AVX2, but the packaged
app never saw that decision: asarUnpack shipped only the AVX2
opencode-windows-x64 package and OPENCODE_PLATFORM_PACKAGES mapped
win32/x64 to it unconditionally. A packaged build on a non-AVX2 x64
machine therefore resolved the AVX2 binary and died with an illegal
instruction and no diagnostic. darwin-arm64 has no baseline variant, so
the reference platform never showed it.

Ship the baseline build alone rather than both. The two Windows x64
binaries are byte-for-byte the same size (141,507,976 bytes at 1.15.5),
and the baseline build shows no measurable cost for how ADE drives
OpenCode - it runs it as a local HTTP server, where boot time and
request latency are the same within noise - so replacing the AVX2 build
costs nothing in installer size and nothing in throughput, while making
every x64 CPU able to execute what it resolves.

Add a preflight guard so a future edit cannot reintroduce the AVX2-only
package and silently reopen the crash path.

Based-on: nsxdavid/ADE#999
Nothing in the installer ever touched the firewall, so every packaged
first run raised the Windows "allow this app" prompt: the brain binds
the sync host on 0.0.0.0 across 8787-8999 by design so phones on the
same wifi can reach it, and advertises itself over mDNS on UDP 5353.
Both listeners run inside the packaged Electron executable.

Add windows-firewall-rules.ps1 and call it from customInstall and
customUnInstall. It creates two inbound allow rules scoped to that one
executable, to the sync port range and mDNS only, and to the private and
domain profiles - public networks are left out so being reachable on an
untrusted network stays a decision the user makes at the Windows prompt.
The rules carry a channel plus install-path identity in their name and
are deleted before being added, so reinstalling over an existing install
replaces them instead of stacking duplicates, and the uninstaller can
recompute and remove exactly what it created.

The rules are best effort by necessity, not by choice. Windows has no
per-user firewall rule store; every write needs Administrator, and this
installer is deliberately per-user and non-elevating. When the script
runs unelevated it makes no change and says so in the installer log
rather than firing a netsh command that fails invisibly, so the prompt a
user then sees has a recorded explanation behind it. Removing the prompt
for the common unelevated install needs an in-app elevation step at the
point the user turns sync on; that is a follow-up.

Based-on: nsxdavid/ADE#999
@arul28
arul28 force-pushed the codex/windows-packaging-updates branch from 376db78 to 7ab0197 Compare August 3, 2026 09:14
arul28 and others added 2 commits August 3, 2026 13:36
f861f70 pointed OPENCODE_PLATFORM_PACKAGES and asarUnpack at
opencode-windows-x64-baseline, but two other places still decided what a
Windows package actually contains, and neither moved:

- afterPack's ensureOpenCodeRuntimePackages materializes the on-target
  OpenCode package into app.asar.unpacked from a hardcoded per-platform
  list, and win32 still named opencode-windows-x64. pruneUnneededRuntimePayload
  deletes every opencode-* directory first, so the baseline package the
  resolver looks for was removed and never restored, and the install shim
  at opencode-ai/bin/opencode.exe is pruned right after. The packaged app
  had no OpenCode binary on any candidate path at all.
- dropping opencode-windows-x64 from asarUnpack does not stop electron-builder
  from copying it; it only moves it inside app.asar. The AVX2 build therefore
  shipped twice - 141,508,115 bytes embedded in app.asar where an exe can
  never be spawned, plus another 141,508,115 bytes re-copied into
  app.asar.unpacked by afterPack - while nothing resolved either copy.

Materialize the baseline package on win32 and exclude the AVX2 package from
build.files outright, which is the only lever that keeps it out of the
archive. Net effect for the Windows x64 installer: one 141,508,124-byte
baseline binary on the path the resolver actually probes, and 141,508,106
fewer bytes of unreachable payload.

Extend the preflight guard to require the build.files exclusion, flip the
packaged-artifact hygiene checks to require baseline and reject the AVX2
package, and add an app.asar index check so a future edit that drops a
native OpenCode package from asarUnpack without excluding it cannot quietly
bury 141 MB inside the archive again. Cover both resolver outcomes in
openCodeBinaryManager tests.

Based-on: nsxdavid/ADE#999
@arul28
arul28 merged commit b1f315b into codex/windows-desktop-sync Aug 3, 2026
37 checks passed
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.

3 participants