Skip to content

fix(sync): fail loudly on corrupt search index - #198

Open
abhicodes-007 wants to merge 1 commit into
TMHSDigital:mainfrom
abhicodes-007:fix/issue-163-corrupt-search-index
Open

abhicodes-007 wants to merge 1 commit into
TMHSDigital:mainfrom
abhicodes-007:fix/issue-163-corrupt-search-index

Conversation

@abhicodes-007

Copy link
Copy Markdown

Problem

A present but unparseable docs/search-index.json was treated as empty, so sync silently wiped preserved skill/rule/tool arrays.

Approach

Make the loader exit non-zero with the file path and parse error instead of returning empty preservation data.

Tests

Regression for corrupt file plus preservation/new/removed entry cases. Full suite 356 passed, 2 skipped.

Risk

Missing-index behavior is unchanged; a corrupt index now aborts sync before artifacts are written.

Closes #163

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.

A corrupt search-index.json makes sync silently wipe all search data

1 participant