Skip to content

[codex] Clean deprecated launcher payloads on updater startup#4524

Open
PerishCode wants to merge 17 commits into
mainfrom
codex/runtime-recovery-installer-sidecar-uninstall
Open

[codex] Clean deprecated launcher payloads on updater startup#4524
PerishCode wants to merge 17 commits into
mainfrom
codex/runtime-recovery-installer-sidecar-uninstall

Conversation

@PerishCode

Copy link
Copy Markdown
Contributor

Why

Manual Windows beta overwrite validation showed that the installer correctly rewrote launcher runtime.json and emitted launcher state/cleanup.json, but the next packaged updater cold start only consumed the updater release-cache cleanup descriptor. Deprecated launcher payload directories under launcher/channels/<channel>/namespaces/<namespace>/versions could 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

  • UI — new page / dialog / panel / menu item / setting / empty state in apps/web or apps/desktop (including Electron menu bar)
  • Keyboard shortcut — new or changed
  • CLI / env var — new od subcommand or flag, new tools-dev / tools-pack / tools-pr flag, or new OD_* env var
  • API / contract — new /api/* endpoint, new SSE event, or changed shape in packages/contracts
  • Extension point — new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys — added new translation keys (see TRANSLATIONS.md for the locale workflow)
  • New top-level dependency — adding any new entry to the root package.json (dependencies or devDependencies); workspace-package package.json files are out of scope. Include a paragraph on what we get vs. what bytes we ship (see CONTRIBUTING.md → Code style)
  • Default behavior change — changes what existing users experience without opting in (default model, default setting, file/SQLite schema, auto-network on startup, auto-install)
  • None — internal refactor, docs, tests, or translation update only

Screenshots

No UI surface changed.

Bug fix verification

  • Test path that reproduces the bug: apps/desktop/tests/main/updater.test.ts
  • Did the test go red on main and green on this branch? Not run on main; the branch test covers the missing cold-start launcher cleanup consumption directly.
  • Additional verification: completed a local Windows packaged end-to-end flow with tools-serve serving a real beta.3 installer artifact. Installed beta.2, downloaded beta.3 through updater IPC, completed installer overwrite, confirmed launcher cleanup.json marked beta.2 deprecated before restart, then confirmed beta.3 cold start removed versions/0.11.1-beta.2, rewrote it to cleanup-removed, and logged launcher-lifecycle removed=1 retained=1 total=2.

Validation

  • pnpm --filter @open-design/launcher-proto typecheck
  • pnpm --filter @open-design/launcher-proto test
  • pnpm --filter @open-design/launcher-proto build
  • pnpm --filter @open-design/desktop test -- tests/main/updater.test.ts
  • pnpm --filter @open-design/desktop typecheck
  • pnpm guard
  • pnpm typecheck
  • Local tools-serve/tools-pack Windows E2E:
    • 0.11.1-beta.2 NSIS install under release-beta-win
    • tools-serve start updater --channel beta --version 0.11.1-beta.3 --platform win --artifact-path <beta3 installer>
    • updater download/checksum via tools-pack win inspect --update-action download
    • beta.3 installer overwrite
    • beta.3 cold-start launcher cleanup verification

Notes

During local E2E setup, the first cold NSIS build hit the internal 300s nsis:payload-base-7z timeout. 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.

@PerishCode PerishCode requested a review from a team as a code owner June 18, 2026 11:01
@lefarcen lefarcen requested a review from mrcfps June 18, 2026 11:04
@lefarcen lefarcen added size/XXL PR changes 1500+ lines risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps type/bugfix Bug fix skip-validation Maintainer override: bot will not auto-add needs-validation on this PR. labels Jun 18, 2026
@mrcfps

mrcfps commented Jun 18, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps size/XXL PR changes 1500+ lines skip-validation Maintainer override: bot will not auto-add needs-validation on this PR. type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants