Skip to content

Test build: launcher for Windows (do not merge) - #64

Merged
andersalm merged 20 commits into
test/launcher-mac-dmgfrom
test/launcher-windows
Nov 8, 2026
Merged

andersalm merged 20 commits into
test/launcher-mac-dmgfrom
test/launcher-windows

Conversation

@andersalm

Copy link
Copy Markdown
Collaborator

Why

Anders needs a Windows app that stays in the background, takes updates, starts and stops the service, and hosts Home. This is a test branch made at his request on 7 Nov. Sasha reviews it later. Do not merge it.

The Install button failed after Set up. Set up imports the Linux environment and returns while that environment is stopped. Install then gave the first command 20 seconds. The first boot takes about 23 seconds.

What changed

  • Install waits up to 3 minutes for the first command in the Linux environment, then runs the 20 second tool check.
  • The tests call the Install function with a distro that Set up has already imported.

Scope

  • The change covers Windows Install after Set up.
  • This lane does not change the Mac launcher. The branch includes the current Mac test branch.
  • The release pin stays the pin from that Mac branch.

Tradeoffs

Every Windows Install runs true first, with a limit of 3 minutes. A running environment returns when that command finishes. The tool check stays at 20 seconds.

Blast Radius

A person who clicks Install on Windows waits until the Linux environment answers. If it never answers, Install fails with the same setup message after up to 3 minutes. Mac and Linux do not use this path.

Verification

  • The two Install tests failed before the wait moved. The first command was the tool check at 20000 ms. They passed after the move. The first command is true at 180000 ms.
  • npm test on this branch passed 239 tests, failed 0, and skipped 3. HOME was an empty directory, so this Mac did not start the installed runtime.

Made with Cursor

andersalm and others added 7 commits November 7, 2026 20:54
Set up imports the distro and returns while it is stopped. The next
Install click is the first command into that distro. These tests fail
while that command is still the 20 second tool check.

Co-authored-by: Cursor <cursoragent@cursor.com>
The 3 minute wait ran only when Install itself imported the distro.
Set up imports first, so Install saw a listed distro and used the
20 second tool check for the first boot. CI run 42237456986 failed
20.3 seconds after that click.

Co-authored-by: Cursor <cursoragent@cursor.com>
The wait, the 20 second tool check, and the test already show the order.
A second copy of that fact in a comment is not needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
The Windows Install job reached Open my computer and /healthz.
It did not click Open Home, Stop, Start, or the update check.

Co-authored-by: Cursor <cursoragent@cursor.com>
Runtime 2.0.0 does not write update-check.json.
The Mac branch derives that record from the signed head.
Windows now writes the same record inside the distro.

Co-authored-by: Cursor <cursoragent@cursor.com>
@andersalm andersalm closed this Nov 8, 2026
@andersalm andersalm reopened this Nov 8, 2026
andersalm and others added 10 commits November 7, 2026 22:06
elastos gateway never enters the update controller, so System update inside Home cannot run on Windows. Start home --browser, signal the proved controller on Stop, and start Home again after Update and Undo.

Co-authored-by: Cursor <cursoragent@cursor.com>
A valid Runtime update-check.json wins, including offered=false.
The signed fallback is written only under ~/.elastos-launcher.
Windows Update and Undo do not start Home after a failed Stop or a later Stop.

Co-authored-by: Cursor <cursoragent@cursor.com>
The launcher still reads the Runtime update-check.json.
That read stops at 16384 bytes, refuses a symlink, and does not follow the final name.

Co-authored-by: Cursor <cursoragent@cursor.com>
Runtime 2.0.0 does not write update-check.json.
The Windows check stores that result under ~/.elastos-launcher.
The end-to-end test reads that file when the Runtime file is absent.

Co-authored-by: Cursor <cursoragent@cursor.com>
The end-to-end page cannot load Node modules.
The test reads ~/.elastos-launcher/update-check.json from the isolated home, the same place the launcher writes it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stop signaled the process group and fell back to the host pid. The in-distro helper now opens a pidfd, checks the controller identity, and reuses that pidfd.

Co-authored-by: Cursor <cursoragent@cursor.com>
A second Stop adopts a new controller and leaves the first helper, its channel directory, and its pidfd alive. The adopted session takes the helper command the test already runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
dispose drops the helper on a terminal Stop failure and before a new controller replaces it. TERM and KILL still share one pidfd. The helper already exits when its channel closes or after 60 seconds with no command.

Co-authored-by: Cursor <cursoragent@cursor.com>
/proc/net is a symlink on Linux. A Home this launcher started looks foreign when that read comes back empty.

Co-authored-by: Cursor <cursoragent@cursor.com>
The facts walker refuses the /proc/net symlink, so the socket table was empty and the launcher treated its own Home as another program.

Co-authored-by: Cursor <cursoragent@cursor.com>
andersalm and others added 3 commits November 8, 2026 07:23
The helper used to exit after 60 idle seconds and close that pidfd before the KILL.

Co-authored-by: Cursor <cursoragent@cursor.com>
…orwarder

The distro socket table does not name the Windows process that answers localhost. A slow Stop must also keep the helper until the command channel closes.

Co-authored-by: Cursor <cursoragent@cursor.com>
The listen-table proof left Open with no Home URL.
Restore the distro socket check and the synchronous open path.
The stop helper still exits when its command channel closes.
A late KILL keeps the original pidfd.

Co-authored-by: Cursor <cursoragent@cursor.com>
@andersalm
andersalm merged commit c098b49 into test/launcher-mac-dmg Nov 8, 2026
10 checks passed
@andersalm

Copy link
Copy Markdown
Collaborator Author

Combined into test/launcher-mac-dmg at c098b49; see draft #63.

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