[codex] Fix Codex 26.527 installer patching#392
Open
flatmoonsociety wants to merge 1 commit into
Open
Conversation
4d6e220 to
4cce088
Compare
4cce088 to
a654226
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
Fixes Codex++ repair/install failures on current Codex Desktop builds that changed the macOS framework layout and contain a large unpacked asar file set. Also updates watcher-mode repair so it applies the disk patch before prompting for a restart.
Root Cause
Codex 26.527 uses
Codex Framework.frameworkwith a versionedVersions/Currentlayout instead of the oldElectron Framework.framework/Versions/A/Electron Frameworkpath. The installer still hardcoded the old framework path, so fuse/status/repair operations could fail with ENOENT.After resolving the framework path, current Codex asars can also exceed the glob pattern length used to preserve unpacked files. The prior repack logic generated one giant brace glob for every unpacked path, which can fail with
pattern is too long.Watcher-mode repair had a separate usability issue: when Codex was running, it could block on the pre-patch quit prompt and leave the bundle unpatched until the user responded.
Changes
app.asarso same-process verification reads the rewritten archive.Validation
npm ci --workspaces --include-workspace-root --ignore-scriptsnode --import tsx --test packages/installer/test/asar-cleanup.test.ts packages/installer/test/platform.test.tsnode --import tsx --test packages/installer/test/tweak-commands.test.ts packages/installer/test/asar-cleanup.test.ts packages/installer/test/platform.test.tsnpm run buildnpm test(121 tests passing)npm run audit(0 vulnerabilities)