e2e: repro stale launchd registration slow-boot#1297
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 13eca55 | Commit Preview URL Branch Preview URL |
Jul 04 2026, 05:35 AM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 13eca55 | Jul 04 2026, 05:35 AM |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
c433090 to
13eca55
Compare
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.
Summary
Adds a macOS-only desktop-packaged e2e repro for the stale launchd registration slow boot.
The scenario creates the broken state in an isolated fake HOME by writing
Library/LaunchAgents/sh.executor.daemon.plistwithout bootstrapping it. It also snapshots the realgui/<uid>/sh.executor.daemonstate, boots the label out for the stale case, and restores the snapshot infinally.Bug Story
State: the LaunchAgent plist exists on disk, but launchd does not have
sh.executor.daemonloaded.Cause: packaged desktop boot checks
service status; the launchd backend reportsRegistered: yesfrom plist existence alone. Desktop then runslaunchctl kickstart -k gui/<uid>/sh.executor.daemon, which fails because launchd cannot find the label. Current boot logs the failure but still waits throughwaitForSupervisedAttach(15_000)before falling back to managed-spawn.Measured on this run:
What This Pins
launchctl kickstart failed (exit 113)andCould not find service "sh.executor.daemon".This intentionally pins current broken behavior. When the fix lands, the stale
>= 14sassertions should be inverted so stale launchd registration fast-fails to managed-spawn, close to the clean control.Recording
Committed because it is small:
e2e/recordings/stale-launchd-slow-boot.mp4The recording shows a blank timed wait through 15s, then the packaged app appearing at managed sidecar readiness.
Verification
cd e2e && E2E_DESKTOP_SKIP_BUILD=1 E2E_RECORD=1 bunx vitest run --project desktop-packaged desktop-packaged/stale-launchd-registration.test.tsbun run typecheckbun run format:checkbunx oxlint -c .oxlintrc.jsonc e2e/desktop-packaged/stale-launchd-registration.test.ts --deny-warningsLaunchd state before and after was identical:
launchctl print gui/501/sh.executor.daemonreturnedCould not find service "sh.executor.daemon" in domain for user gui: 501.Stack