What's Changed
Refactored
-
core.py—_restore_from_persistence(depth-5 / CC-17 → depth-3 / CC-5)
Extracted three focused helpers:_inject_into_chronos(uri, doc)— embedding generation + ChronosGrid injection_restore_store_docs(store_name, docs)— doc dedup + restore loop_restore_store_atoms(store_name, atoms)— atom restore loop
Entry point reduced to 18 lines. No behavior change.
-
auth.py—list_keys(depth-4 / CC-8 → depth-2)
Extracted two static helpers:_decode_permissions(perms_json)— decrypt + JSON parse with raw fallback_row_to_key_info(row)— DB tuple →APIKeyInfoconversion
Body reduced to a single list-comprehension.
-
api.py—_init_searcher(depth-4 / CC-5 → depth-2)
Extracted_seed_default_store(fs)— holds the nested inner-try that creates the default store and inserts the bootstrap doc.
Quality
- 71 tests pass (no regressions)
- Real-vault smoke probe: 156/156 files ingested, 8,405 atoms indexed, 5/5 queries
status=success, confidence ≥ 0.840
Full Changelog: https://github.com/flamehaven01/Flamehaven-Filesearch/blob/main/CHANGELOG.md