[codex] Clean deprecated launcher payloads on updater startup#4524
Open
PerishCode wants to merge 17 commits into
Open
[codex] Clean deprecated launcher payloads on updater startup#4524PerishCode wants to merge 17 commits into
PerishCode wants to merge 17 commits into
Conversation
Contributor
|
@PerishCode I'm holding off on generating review comments for #4524 because this pull request has merge conflicts right now. Please resolve the conflicts with main and push the updated branch. Once that's done, request or wait for the review to run again and I'll take another look. 🔁 Powered by Looper · runner=reviewer · agent=opencode · An autonomous AI dev team for your GitHub repos. |
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.
Why
Manual Windows beta overwrite validation showed that the installer correctly rewrote launcher
runtime.jsonand emitted launcherstate/cleanup.json, but the next packaged updater cold start only consumed the updater release-cache cleanup descriptor. Deprecated launcher payload directories underlauncher/channels/<channel>/namespaces/<namespace>/versionscould therefore remain on disk even after a bound installer package superseded them.This PR closes that lifecycle gap by letting the packaged updater consume the launcher cleanup contract on startup, without adding a new status/API surface.
What users will see
Packaged Windows beta installs that overwrite an older launcher-managed runtime now clean stale launcher payload directories on the next app start. There is no UI change; the observable runtime signal is the existing launcher cleanup file plus a new updater lifecycle log event.
Surface area
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-pack/tools-prflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.json(dependenciesordevDependencies); workspace-packagepackage.jsonfiles are out of scope. Include a paragraph on what we get vs. what bytes we ship (seeCONTRIBUTING.md→ Code style)Screenshots
No UI surface changed.
Bug fix verification
apps/desktop/tests/main/updater.test.tsmainand green on this branch? Not run onmain; the branch test covers the missing cold-start launcher cleanup consumption directly.tools-serveserving a real beta.3 installer artifact. Installed beta.2, downloaded beta.3 through updater IPC, completed installer overwrite, confirmed launchercleanup.jsonmarked beta.2 deprecated before restart, then confirmed beta.3 cold start removedversions/0.11.1-beta.2, rewrote it tocleanup-removed, and loggedlauncher-lifecycle removed=1 retained=1 total=2.Validation
pnpm --filter @open-design/launcher-proto typecheckpnpm --filter @open-design/launcher-proto testpnpm --filter @open-design/launcher-proto buildpnpm --filter @open-design/desktop test -- tests/main/updater.test.tspnpm --filter @open-design/desktop typecheckpnpm guardpnpm typecheck0.11.1-beta.2NSIS install underrelease-beta-wintools-serve start updater --channel beta --version 0.11.1-beta.3 --platform win --artifact-path <beta3 installer>tools-pack win inspect --update-action downloadNotes
During local E2E setup, the first cold NSIS build hit the internal 300s
nsis:payload-base-7ztimeout. A standalone vendor 7z run over the same unpacked tree completed in about 79s, and a same-root rebuild completed successfully. I treated this as a separate build-time perf/budget finding, not part of the launcher cleanup behavior change.