Skip to content

fix(storage): keep cached settings unchanged when saving fails - #2580

Merged
jonathanKingston merged 1 commit into
mainfrom
codex/saved-settings-cache
Sep 9, 2026
Merged

jonathanKingston merged 1 commit into
mainfrom
codex/saved-settings-cache

Conversation

@jonathanKingston

Copy link
Copy Markdown
Collaborator

A failed settings write currently updates the in-memory cache before persistence succeeds. After a disk-full or permission error, reads return a value that will disappear on restart.

Publish the cached snapshot only after the backing write succeeds. Regression coverage checks an existing key, a new key, and a successful retry; cloning semantics remain unchanged.

Validation: pnpm run check. The regression fails on current main and passes with this fix. Pure persistence logic; no DOM or layout changes.

github-actions Bot added a commit that referenced this pull request Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🖥️ PR preview

@jonathanKingston
jonathanKingston merged commit 4d7ff0d into main Sep 9, 2026
17 of 18 checks passed
@jonathanKingston
jonathanKingston deleted the codex/saved-settings-cache branch September 9, 2026 00:28
github-actions Bot added a commit that referenced this pull request Sep 9, 2026

This branch had an error being deployed

1 failed deployment
github-pages — 9153206a Deployed Sep 8, 2026 by github-actions[bot] via deploy #112
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