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
* perf(vectors): lifespan-cached LayeredIgnore + is_ignored memo (PR-P3)
- Define IGNORE ContextKey (version-detected) alongside PROJECT_ROOT/EMBEDDER/LANCE_DB
- Provide IGNORE once per flow run in coco_lifespan (LayeredIgnore constructed once)
- Convert process_java_file, process_sql_file, process_yaml_file to use IGNORE ContextKey
- Add _mega_cache to LayeredIgnore, memoizing _mega(rel) by directory
- Add test_is_ignored_mega_caches_by_directory and test_layered_ignore_memo_preserves_decisions
- Add test_layered_ignore_provided_once_per_flow (HEAVY) in test_lancedb_e2e.py
Scope: Only the three process_*_file sites converted. Sites :182 and :578
(_approximate_vectors_total and app_main pre-walk) left untouched as they call
cocoindex_excluded_patterns() once per run, not per-file.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: address PR review feedback for PR-P3
FIX 1: Rewrite test_layered_ignore_provided_once_per_flow
- Replace broken subprocess-based test (patch cannot cross process boundary)
- Use source-structure assertion that counts builder.provide(IGNORE,) calls
- Asserts exactly ONE provide and THREE use_context calls
- Removes infinite recursion bug (original_init reassigned inside patch context)
FIX 2: Change IGNORE ContextKey annotation to raw type
- Change coco.ContextKey["path_filtering.LayeredIgnore"] to coco.ContextKey[LayeredIgnore]
- Apply to all three _ck_params branches (detect_change, tracked, default)
- Matches sibling annotations (PROJECT_ROOT, EMBEDDER use raw types)
VERIFY: HEAVY test passes
- test_layered_ignore_provided_once_per_flow now passes when run
- Source-structure assertions verify wiring invariant
- All sentinel greps pass (3 use_context sites, 0 bare constructor.is_ignored sites)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments