Refactored
-
API orchestration (
api.py):initialize_services(66 lines, CC~8) →
_init_searcher+_init_cache+_init_metrics+ 8-line orchestrator.
_record_upload_failureextracted — eliminates 2× duplicated
record_file_upload + record_errorblocks inupload_single_file. -
Admin auth (
admin_routes.py):_get_admin_user(77 lines, CC~10) →
_parse_bearer_token+_try_oauth_admin+_resolve_key_admin+ 5-line
orchestrator. Fixesreverse_field_glyphsrebuilt on every recursive call. -
Engine (
engine/chronos_grid.py):seek_vector_resonance(80 lines,
2 code paths) →_hnsw_vector_resonance+_brute_vector_resonance+
10-line dispatcher (HNSW path vs brute-force cosine similarity). -
Engine (
engine/gravitas_pack.py):_compress_dict/_decompress_dict
clone cluster →_transform_dict(obj, key_map, value_transform)dispatch table.
Both callers become 2-line delegators.
Changed
-
eval_self.py:CORPUS_FILESsplit intoAUDIT_CORPUS(11 docs) +
SOURCE_CORPUS(7 source files).CORPUS_FILES = AUDIT_CORPUS + SOURCE_CORPUS
preserves existing full-pack behaviour;AUDIT_CORPUSalone enables lightweight
doc-quality runs. -
.gitignore:docs/history/added under "Historical development artifacts".
Tests
- 475 passed, 13 skipped — same count as v1.6.0 (1 pre-existing flaky timing test
in full suite; passes in isolation).