Skip to content

[codex] Reject malformed backup restores - #9

Draft
AndreKalberer wants to merge 1 commit into
mainfrom
codex/backup-validation
Draft

AndreKalberer wants to merge 1 commit into
mainfrom
codex/backup-validation

Conversation

@AndreKalberer

Copy link
Copy Markdown
Owner

Malformed JSON backups such as {"favorites":42} or an envelope with state: [] previously normalized to empty defaults and could replace the saved library after restore confirmation. Validate backup structure and entries before normalization so invalid restores preserve favorites, history, progress, and preferences. Valid current exports and partial legacy backups remain supported, including intentionally empty fields and legacy numeric strings.

Add unit regressions and a repeatable desktop smoke test covering rejected malformed restores and successful legacy/current restores through the actual preload bridge, IPC filesystem reader, restore button, and saved state. The test substitutes the native file picker and accepts confirmation automatically using an isolated profile.

Validation: regression demonstrated failing against the original parser; npm run test:consumer passed; combined Windows packaged smoke tests passed; independent final and integration reviews reported no findings. The new backup smoke is included in default desktop and packaged checks.

This branch has not been deployed

No deployments
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