Repository navigation
fix(desktop): package agent-shutdown.mjs so the app starts - #118
Merged
Merged
Conversation
v0.0.68 crashed at launch with ERR_MODULE_NOT_FOUND: server-manager.mjs imports scripts/desktop/agent-shutdown.mjs (the agent shutdown sweep), but build.files lists the shipped scripts/desktop files by name and this one was never added, so app.asar did not contain it. - Add it to build.files. - package-config test: every file reachable from the main entry through relative imports is covered by build.files. - Bundle audit: walk the same import graph inside the built app.asar and fail the packaging run on any missing file. Gate: G0 green; unsigned build:desktop:mac passes the audit, and the packaged scripts/desktop modules import from app.asar under the app's own Electron binary (ELECTRON_RUN_AS_NODE). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An OpenCode server that died during startup was reported on "exit", which can fire before its last stderr chunk is read, so the error sometimes lost the reason (macOS CI flaked on this test twice). Report once the pipes close, bounded by 250 ms in case a grandchild holds them open. Gate: G0 green (367 test files); the OpenCode server suite passed 6 runs in a row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
v0.0.68 crashes at launch with
ERR_MODULE_NOT_FOUND: …/app.asar/scripts/desktop/agent-shutdown.mjs imported from …/server-manager.mjs.Cause: the agent shutdown sweep (P10) added
scripts/desktop/agent-shutdown.mjs, whichserver-manager.mjsimports. Butbuild.fileslists the shippedscripts/desktopfiles by name, and this one was never added, soapp.asardidn't contain it. No automated gate launched the packaged app, so it slipped through.Fix:
build.files.mainthrough relative imports is covered bybuild.files.app.asarand fail the packaging run on any missing file. Confirmed it reportsagent-shutdown.mjs (imported from scripts/desktop/server-manager.mjs)when the file is absent.v0.0.68 is marked as a pre-release, and v0.0.66 is "Latest" again, so auto-update no longer offers the broken build. This ships as v0.0.69.
Test plan
build:desktop:macwith the bundle audit passing.scripts/desktopmodule imports fromapp.asarunder the app's own Electron binary (ELECTRON_RUN_AS_NODE)./(200).🤖 Generated with Claude Code