Skip to content

Recover damaged settings and save them atomically - #20

Merged
DevanMetz merged 3 commits into
mainfrom
codex/config-robust
Oct 28, 2026
Merged

DevanMetz merged 3 commits into
mainfrom
codex/config-robust

Conversation

@DevanMetz

@DevanMetz DevanMetz commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Settings recover from corrupt files with defaults, a byte-for-byte backup, and a diagnostic. Invalid values are clamped while zero limits retain their unlimited meaning.

Saves use synced, private files with unique temporary names so stale files or directories cannot block saving on Windows or Linux. Existing settings and backups are replaced without deleting them first; failed saves clean up their temporary files. Updated the saved-settings parity notes.

Validation: cargo build; cargo clippy --all-targets -- -D warnings; cargo test (110 passed, 4 existing display tests ignored); cargo fmt --check; cargo check --target x86_64-pc-windows-gnu. PR CI passes on Linux, macOS, and Windows, including stale-directory and repeated settings/backup replacement tests.

Limit: backup failures preserve the original settings and report the failure.

@DevanMetz
DevanMetz merged commit 3ecc858 into main Oct 28, 2026
3 checks passed
@DevanMetz
DevanMetz deleted the codex/config-robust branch October 28, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant