Windows 4/5: packaging, standalone runtime, and updates - #1009
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
8cb0bf0 to
c4f935e
Compare
9de88ae to
ecd30ad
Compare
|
@CodeRabbit review. @greptile-apps review. |
|
✅ Action performedReview finished.
|
c4f935e to
936722b
Compare
ecd30ad to
d4d6c68
Compare
936722b to
34cbcdd
Compare
d4d6c68 to
763067f
Compare
34cbcdd to
a3e370e
Compare
763067f to
cfa91b8
Compare
a3e370e to
f2eabb4
Compare
cfa91b8 to
76cc8c3
Compare
f2eabb4 to
2d24eb1
Compare
76cc8c3 to
6940838
Compare
2d24eb1 to
7ee4417
Compare
6940838 to
37cb390
Compare
7ee4417 to
ecbfd45
Compare
dcb7fc5 to
a8c5c3f
Compare
4a4789a to
9370628
Compare
a8c5c3f to
0637a09
Compare
ad22566 to
e1cfd3b
Compare
ccc81c8 to
bbb5062
Compare
7076f4b to
525cf41
Compare
de72b94 to
19da3b5
Compare
525cf41 to
8733290
Compare
19da3b5 to
36d9a39
Compare
8733290 to
9174aa5
Compare
36d9a39 to
f7575bf
Compare
9174aa5 to
376db78
Compare
Based-on: nsxdavid/ADE#999
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
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
376db78 to
7ab0197
Compare
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
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
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