You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A corrupt search-index.json makes sync silently wipe all search data #163
build_search_index preserves the skill/rule/tool name arrays from the existing docs/search-index.json. On a ValueError (for example a leftover merge-conflict marker) load_existing_search_index returns {}, and the sync writes an index with empty arrays for every tool, with no warning. Preservation across sync has no test.
Where
scripts/sync_from_registry.py:425-434
scripts/sync_from_registry.py:395-400
tests/test_sync_from_registry.py
Details
try:
data = json.loads(path.read_text(encoding="utf-8"))
except (ValueError, OSError):
return {}
Impact
A registry edit followed by sync can drop all scanned search data behind catalog search; recovering needs a full aggregate_search.py --clone.
Suggested fix
Fail loudly on a present-but-unparseable file (non-zero exit with a message). Add tests: preserved arrays survive a description change; a new entry gets empty arrays; a removed entry leaves the index; a corrupt file fails.
Acceptance criteria
Corrupt search-index.json fails sync with a clear error
Activity
abhicodes-007 commentedon Nov 30, 2026
Fixed in PR #198: #198 — fix/issue-163-corrupt-search-index