Kevin Carter (via Claude) 98210f2cff P2: route exam auto-map through the extraction service (full recognition)
When EXAM_EXTRACT_URL is set, POST /templates/{id}/auto-map now runs the spike's
full recognition pipeline (via the P1 service) instead of the thin first-pass, as
an async job. New modules/services/exam_extract.py (HTTP client: POST paper, poll,
return the analyse contract). templates.py: _map_service_contract_to_rows adapts the
page-fraction analyse contract onto the app's 780-wide stacked canvas (fraction ×
rendered dims + page_top), re-namespaces the service's uuid5s per template (stable
re-map, no cross-template collision), and is FK-safe (drops orphan regions, de-parents
dangling parents). Rich meta (OMR boxes, select_n, unit/quantity, n_options) persists
to the new exam_response_areas.meta column (migration 75). Typed response_form + mcq
answer_type + kind:context reference links map natively (schema already allows them).

The thin path is preserved as fallback when EXAM_EXTRACT_URL is unset. Unit test
covers the mapping (coord conversion, id remap, FK-safety, meta passthrough).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 23:41:37 +00:00
2026-05-28 17:55:37 +01:00
2026-05-27 22:55:01 +01:00
2025-11-14 14:47:19 +00:00
2025-11-19 20:02:34 +00:00
2025-11-19 20:02:34 +00:00
2025-07-11 13:52:19 +00:00
2025-11-14 14:47:19 +00:00
2025-11-14 14:47:19 +00:00
2025-11-14 14:47:19 +00:00
2025-11-14 14:47:19 +00:00
2025-11-14 14:47:19 +00:00
Description
FastAPI + Python 3.12 backend for Classroom Copilot — auth, document processing, transcription sessions, LLM integration, Supabase-backed
62 MiB
Languages
Python 98.9%
Shell 0.8%
Jupyter Notebook 0.3%