Add synthesize_part_box() as the single authoritative S5 part-box projection (T3 swap point): content-margin x-extent x part-band y-extent, BOTTOMLEFT coords; label_box retained as a separate anchor. build() attaches box per part. Co-Authored-By: Claude Opus 4.8 <[email protected]>
API Docling first-pass auto-map package
This package is the in-API home for the S5 exam-template/first-pass/v1 extraction pipeline copied from /home/kcar/dev/docling-exam-spike.
auto_map(pdf_bytes) returns the editable first-pass template.json shape consumed by downstream exam-marker mapping. The pipeline keeps margins as constraining inputs: document left/right and per-page top/bottom margins are derived before template assembly, then part/question bands and furniture/figure boxes are constrained through those margins.
dsync Redis env wiring
The OCR path uses dsync.py for docling-serve GPU locking, page cache, and retry. Configure with env-var names only:
DOCLING_SERVEDOCLING_REDIS_URLDOCLING_REDIS_HOSTDOCLING_REDIS_PORTDOCLING_REDIS_PASSWORDDOCLING_REDIS_DB
If Redis is unavailable, dsync falls back to no cache/lock and logs that state. Do not put secret values in this file.