Repository navigation
fix(desktop): open the launch grace window once the supervisor has spawned the app - #195
Merged
Merged
Conversation
4 tasks done
…awned the app With a containment scope the process group leader is the Node supervisor, so a grace window measured from its own start counted Node startup and the cgroup join against the app. On a loaded host the group could outlive the 300 ms window before the app had run, and an app that exits at once was reported as launched. Wait until a second group member is visible, or the group has already died, before the window opens; without a supervisor the leader is the app itself and nothing changes. The env-dump fixture in the isolation test now writes atomically so the assertion cannot read a half-written file. Closes #191
ElbertePlinio
force-pushed
the
fix/191-launch-grace
branch
from
September 22, 2026 22:50
9d31794 to
a7afc1b
Compare
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #191
With a containment scope the process group leader is the Node supervisor, so the 300 ms launch grace window was measured from the supervisor's own start and counted Node startup plus the cgroup join against the app. On a loaded host the group could outlive the window before the app had run, and an app that exits at once was reported as launched.
launchAppnow waits, only under containment, until a second group member is visible or the group has already died, bounded by 10 s, before the grace window opens. Expiry is a failed launch that runs the existing cleanup and stops the supervisor's group; it is never assumed to be fine. Without a supervisor the leader is the app itself and nothing changes.The env-dump fixture in
isolation.test.tswrites to a.partfile and renames it, so the runtime-dir assertion cannot read a half-written file. Escapee containment, no-loose-process assertions and test timeouts are unchanged.Decision on the first checklist item: the window is measured from the observed spawn in the launcher rather than by having fixtures signal readiness, because the false-launch was a product defect, not just a test-timing problem.
Verification
apps.test.tsdelays the supervisor's own startup by 1 s with a builtin (no extra group member) and requires the exits-at-once app to still be rejected. It fails on the unmodified launcher ("promise resolved instead of rejecting") and passes with the fix.isolation.test.tsandscreenshot-wait-live.test.tsunloaded: 12/12 on cgroup and on marker (PICKFORGE_CONTAINMENT=marker).desktopWaitchangedwithtimeoutafter the zenity window had already been found, which is the 5 s screenshot-change budget under extreme load and not the grace window; tracked in screenshot-wait-live pixel-change wait times out under heavy CPU load #193.