[codex] restore appearance after failed Windows startup - #357
Merged
Conversation
Fei-Away
marked this pull request as ready for review
August 12, 2026 00:08
This was referenced Aug 12, 2026
Merged
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.
What changed
preparingtocommittedonly after the operation is complete.Before / Applied / Currentcomparison. Already-restored values are accepted, newer user edits win, and malformed or internally inconsistent journals fail closed with evidence retained.preserved-renderedoutcomes. A result-token child with visible-but-inconclusive rendering closes only its exact matching CDP session, restores appearance, and reopens ordinary Codex before the parent rolls files back.Root cause
Windows startup writes Codex appearance keys before the official app has exposed a verified CDP endpoint and rendered the selected background. A caught failure could therefore leave colors applied with no background renderer. The previous marker/config ordering also had a hard-stop window, while one-click apply could force-kill a slow child using the lock timeout as its entire runtime budget or roll files back after the child intentionally retained a rendered session.
The new durable journal precedes both appearance writes, and recovery restores only values still owned by that exact attempt. It does not replace the whole historical
config.toml.User impact
Caught and interrupted Windows starts no longer leave deterministic partial appearance state. Newer config and marker edits are preserved. If Dream Skin cannot prove that Codex was closed or recovery completed safely, it preserves the candidate theme and exact prior snapshot instead of creating a mixed file/session state.
This does not restore an upstream-disabled CDP endpoint. Official Store Codex
26.803.5235.0still has field evidence in #235 of Verify rejection and a finalNO_LISTENER. This PR fixes the deterministic residue and diagnostics around that failure; it does not claim every report in #352/#354 is resolved without the reporter's exact Codex version and Verify output.Validation
CODEX_DREAM_SKIN_SKIP_DOCTOR=1 bash macos/tests/run-tests.sh: exit 0, including signed-runtime and runtime-state integrationgit diff --check: passFull-Xcode SwiftPM/XCTest and installed signed-app Doctor are explicit local host skips. Native Windows PowerShell 5.1/7 and Setup.exe are required from CI on exact head
6103a9a09ee274a2d820ef26738f8acee05b7026; the older green run does not validate this head.Related to #235, #352, and #354.