headroom/tests/test_transforms
chopratejas 34c5cd9da6 Add DiffCompressor and fix hnswlib SIGILL crash on CI
DiffCompressor:
- Parse unified diff format and compress by reducing context lines
- Preserve file headers and all +/- change lines
- Score hunks by relevance (error keywords, query matches)
- Add summary line: [N files, +X -Y lines]
- Expected 30-50% savings on typical git diffs
- Wire into content router for CompressionStrategy.DIFF
- 30 tests covering parsing, compression, edge cases

hnswlib SIGILL fix:
- Move hnswlib import from module level to lazy loading
- hnswlib crashes with SIGILL (Illegal Instruction) on CPUs
  without AVX support, before Python can catch the error
- Now imports only when HNSWVectorIndex is actually used
- HNSW_AVAILABLE is checked lazily via __getattr__

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 01:03:48 -08:00
..
__init__.py Initial commit: Headroom SDK - LLM context optimization toolkit 2026-01-06 23:16:58 -08:00
test_anchor_selector.py Add reasoning capability forwarding to HeadroomAgnoModel 2026-01-21 20:32:02 -08:00
test_cache_aligner.py Integrate DynamicContentDetector into CacheAligner (Phase 1) 2026-01-19 22:56:20 -08:00
test_code_compressor.py Integrate DynamicContentDetector into CacheAligner (Phase 1) 2026-01-19 22:56:20 -08:00
test_content_router.py Remove hardcoded source hint system from ContentRouter 2026-01-23 00:28:22 -08:00
test_diff_compressor.py Add DiffCompressor and fix hnswlib SIGILL crash on CI 2026-01-31 01:03:48 -08:00
test_intelligent_context.py feat(toin): add TOIN + CCR integration to IntelligentContextManager 2026-01-27 16:08:36 -08:00
test_llmlingua_compressor.py Add comprehensive evaluation framework for compression accuracy 2026-01-22 09:31:54 -08:00
test_progressive_summarizer.py Add quality retention eval and fix linting for Python 3.12 2026-01-19 21:52:18 -08:00
test_rolling_window.py Add persistent memory system with zero-latency inline extraction 2026-01-14 21:32:09 -08:00
test_scoring.py Add IntelligentContextManager for semantic-aware context management 2026-01-18 22:22:48 -08:00
test_smart_crusher.py Fix all ruff lint and format errors for CI 2026-01-10 15:33:44 -08:00
test_tool_crusher.py Fix all ruff lint and format errors for CI 2026-01-10 15:33:44 -08:00