Spaces:
Sleeping
Sleeping
Commit History
-
Code quality: fix all ruff warnings, add CI/CD, improve test coverage
ClaudeUnverified signatureLinting (214 -> 0 ruff warnings): - Migrate str+Enum to StrEnum (UP042) across all domain enums - Use datetime.UTC alias instead of timezone.utc (UP017) - Sort and organize all imports (I001) - Fix all line-too-long issues (E501) in src/ and tests/ - Rename ambiguous 'l' loop variables to 'ln'/'lv' (E741) - Collapse nested if statements (SIM102) - Remove unused imports (F401) - Move lru_cache import to top of file (E402) - Remove TCH rules from ruff config (false positives with Pydantic) CI/CD: - Add .github/workflows/ci.yml with lint + test + coverage gates Test coverage improvements (497 -> 508 tests): - Add tests for hub_runtime, local_runtime, api_runtime execute/NotImplementedError - Add tests for rescale_point, rotate_point_90, rotate_polygon_90 transforms - Cover all previously uncovered runtime code paths https://claude.ai/code/session_01AdT5qvpceqqRs1AGJNgD1Ybbbfba8 -
Repo audit: fix security issues, bugs, and prepare HF Space deployment
ClaudeUnverified signatureSecurity fixes: - Fix CORS wildcard + credentials vulnerability (CSRF risk) - Add path traversal protection in FileStore (sanitize job_id/provider_id) - Add upload size limit (50MB) to prevent DoS - Chain exception properly in JSON parse error (raise from None) Bug fixes: - Fix job final status logic: no exports now correctly returns FAILED - Fix misleading [-0] index in hyphenation enricher (same as [0]) - Remove unused field_validator import in canonical_document - Cache Settings singleton with lru_cache (was re-reading .env per request) HF Space deployment: - Add YAML frontmatter to README.md for HF Spaces auto-configuration - Add non-root user in Dockerfile (required by HF Spaces) - Create /data directory for persistent storage All 497 tests pass. Coverage: 96%. https://claude.ai/code/session_01AdT5qvpceqqRs1AGJNgD1Ybb6107f
-
Sprint 6: enricher subsystem — 6 enrichers with pipeline and policy control
ClaudeUnverified signatureEnrichers transform a CanonicalDocument into a new one with derived data. All models are frozen — enrichers use model_copy(update={}) for immutability. Enricher infrastructure: - BaseEnricher ABC (name, enrich) - EnricherPipeline: configurable chain, threads document through enrichers, updates audit.enrichers_applied 6 enrichers implemented: - polygon_to_bbox: derives bbox from polygon when geometry status is 'unknown'. Marks result as 'inferred'. Respects allow_polygon_to_bbox - bbox_repair_light: clips bboxes that overflow page boundaries. Marks as 'repaired'. Does not reconstruct or invent geometry - lang_propagation: propagates language from region→line→word when child has no lang. Does not overwrite existing. Respects allow_lang_propagation - reading_order_simple: infers reading order from spatial position (top-to-bottom, left-to-right) when page has none. Respects policy - hyphenation_basic: detects word-ending '-' at line boundary with lowercase continuation. Build…3213f50 -
Sprint 0: project foundation — structure, settings, FastAPI skeleton
ClaudeUnverified signatureSet up the complete project scaffolding for the XmLLM document structure engine (canonical-first architecture for image → ALTO XML / PAGE XML): - pyproject.toml with core deps (FastAPI, Pydantic v2, lxml, Pillow) and dev deps - Full directory structure matching the 4-anneau architecture (domain, execution, API, presentation) - SettingsService with auto-detection of local vs HF Space mode - FastAPI app skeleton with /health endpoint - AGENTS.md with all non-negotiable architecture rules - .env.example with documented configuration variables - Test suite foundation with 6 passing tests (settings + health) https://claude.ai/code/session_01Cuzvc9Pjfo5u46eT3ta2Cg96f8c0a