Last Updated: October 21, 2025
Purpose: Prevent wasted time editing deprecated/unused files
This document defines which files are ACTIVELY USED vs DEPRECATED.
Always check this before making code changes!
- File:
src/vue_api_endpoints_updated.py - Purpose: All API endpoint routing and response handling
- Key Functions:
_format_response()- Line 568+: Builds API responsesanalyze_text()- Main analysis endpoint- CitationResult serialization - Line 582-592
- File:
src/vue_api_endpoints.py - Status: DELETED on 2025-10-21
- Reason: Not imported anywhere, no blueprint defined, confirmed unused
- Verification:
src/api/blueprints.pyline 23 imports vue_api_endpoints_updated, not this file - History: Phase 3 verification bug fix was applied here by mistake (hours wasted), then file was deleted to prevent future confusion
- File:
src/unified_case_extraction_master.py - Purpose: Main case name extraction logic
- Key Functions:
_extract_case_name_with_strategies()- Multi-strategy extraction_clean_case_name()- Signal word removal and cleaning- Vacatur detection with semicolon boundary checks (lines 592-598, 1150-1156)
- File:
src/utils/strict_context_isolator.py - Purpose: Context isolation and fallback extraction
- Status: Still used in some code paths
- Key Functions:
- Signal word patterns (line 200)
- Corporate suffix capture (line 244)
- Final cleanup (lines 348-349)
- Signal word contamination fixes → Edit BOTH files
- Corporate name extraction → Edit BOTH files
- Vacatur detection → Edit ONLY unified_case_extraction_master.py
- File:
src/unified_clustering_master.py - Purpose: All citation clustering logic
- Key Functions:
_standardize_extracted_names_in_group()- Name selection (line 1434+)- Signal word removal before name selection (lines 1434-1449)
- Vacatur detection logic
- Cluster name propagation
- Single source of truth for clustering ✅
- File:
src/unified_citation_processor_v2.py - Purpose: Main citation processing pipeline
- Status: Primary processor for sync operations
- File:
src/progress_manager.py - Purpose: Async processing
- Note: Different code path for async vs sync
- File:
src/models.py - Purpose: CitationResult class definition
- Key Functions:
to_dict()- Line 56+: Proper serialization including verified/canonical fields__post_init__()- Initialization logic
When unsure which file is active:
- Check logs:
docker logs casestrainer-backend-prod --tail 200 | grep "File.*line"Look for file names in stack traces
- Search for imports:
grep -r "from.*vue_api_endpoints" src/
grep -r "import.*vue_api_endpoints" src/- Check app.py or main:
grep -r "vue_api" src/app*.py- Test with error:
Add
raise Exception("Testing which file is active")at the top of a function and trigger it
When deprecating a file:
- Add prominent warning to file header (see vue_api_endpoints.py for example)
- Update this document
- Create/update memory in AI system
- Consider deleting the file if completely unused
- If kept for reference, move to
deprecated/folder
- Files:
unified_case_extraction_master.py - Lines: 592-598, 1150-1156
- Status: ✅ Verified working
- Files:
strict_context_isolator.py(lines 200, 244, 348-349)unified_clustering_master.py(lines 1434-1449)
- Status: ✅ Verified working
- File:
vue_api_endpoints_updated.py(lines 582-592) - Wrong File Used:
vue_api_endpoints.py(not active!) - Status: ⏱️ Fix applied, pending verification
Before editing any file, ask:
- Is this file in the "ACTIVE" section above?
- Does the file have a deprecation warning?
- Can I verify it's imported somewhere?
- Do logs show this file executing?
If unsure: Check logs, check imports, or test with a deliberate error.
If you're uncertain which file to edit:
- Check this document first
- Check the file header for deprecation warnings
- Grep for imports
- Check recent git commits to see what's being edited
- Look at logs to see what's executing
Remember: Time spent verifying the correct file = Time saved avoiding wrong fixes!