Prevent self-upgrades from nesting the managed payload - #99
Merged
Conversation
woud420
force-pushed
the
codex/eng-204-stable-upgrade-layout
branch
from
July 20, 2026 00:02
7d6277c to
0dbaf43
Compare
woud420
marked this pull request as ready for review
July 20, 2026 00:09
Preserve the logical launcher path, repair existing nested onedir payloads, and stage bundle swaps with rollback. Add repeated-upgrade and failure regressions and document the stable repair behavior. Refs ENG-204
woud420
force-pushed
the
codex/eng-204-stable-upgrade-layout
branch
from
July 20, 2026 00:16
0dbaf43 to
3b28339
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.
Primary changes
kickstartinvocation path so self-upgrade can recover the public launcher directory and configured app root without resolving away the launcher symlink.<app_root>/current/kickstartlayout stable across subsequent upgrades.Reviewer walkthrough
src/utils/installer.py:current_entrypoint_path()preserves logical invocation spelling whilecurrent_binary_path()remains the resolved install source;_replace_bundle()stages and rolls back replacement.src/utils/updater.py: layout discovery reads only the launcher's first symlink hop and recognizes wrapper-launched managed payloads without changing legacy single-file handling.tests/unit/utils/test_updater.py: the production helper composition covers absolute and relative launchers, starts from an already-nested layout, and performs two complete upgrades against a real release archive.tests/unit/utils/test_installer.py: entrypoint spelling, staging failure, and activation rollback cases protect the repaired layout.docs/operations/install-binaries.mdstates the same stable-root and repair contract.Correctness and invariants
currentpayload and remove the accidental nested tree.UpgradeResult, and telemetry outcome categories are unchanged.Testing and QA
.kickstart/currentlayer.CI=true make check— passed Ruff, mypy, type/import/template audits, and all 792 tests.poetry run ruff format --check src/utils/installer.py src/utils/updater.py tests/unit/utils/test_installer.py tests/unit/utils/test_updater.py— passed.git diff --check— passed.origin/master(0 1), with705e8e9(the squash merge of PR Add default-on CLI telemetry and lifecycle events #97) as the commit's direct parent.0dbaf43; the rewrite changed ancestry only.3b28339across coverage, lint/typecheck, Python 3.12–3.14 on Linux and macOS, website, and integration/eval smoke tests; the manual package job was skipped by design.Risk / Rollout
master; this PR is now restacked directly on that squash commit and exposes only the ENG-204 change.Resolves ENG-204