"""FastAPI app (spec M3). FROZEN after foundation — lanes never edit routes or shapes. Serves the synthetic project fully so lane C can treat this API as finished: GET /api/manifest -> {videos:[{id,filename,url,duration_s,fps,width,height, offset_ms,drift_ppm}], t_global_max, has_poses} GET /api/videos/{id}/poses -> [{frame_idx,t_video_s,q:[w,x,y,z],t:[x,y,z], intrinsics:{fx,fy,cx,cy},registered}] GET /api/pointcloud -> points.ply (binary; Range-capable) GET /api/anchors -> [...] POST /api/anchors GET /api/events -> [...] POST /api/events/detect {t_global_s?, window_s?} -> runs M7 detection POST /api/annotations {video_id, t_video_s, bbox:[x0,y0,x1,y1]} -> {anchor_id?, point?} Phase 5 (foundation2; shapes frozen in plan/20-phase5.md contracts): GET /api/beats -> beats.json body (contract #1); 404 when not yet analyzed POST /api/director {top_n?, lead_s?} -> camPath JSON (contract #2); while lane E is stubbed, degrades to a VALID empty path + "note" GET /api/paths -> [{id, name, created_at}] GET /api/paths/{id} -> {id, name, created_at, json: } POST /api/paths {name, json: } (validated -> 422) DELETE /api/paths/{id} PATCH /api/anchors/{id} {label?, color?} -> updated anchor dict Phase 6 (foundation3 / M18; shapes frozen in plan/30-phase6.md contract #2): GET /api/tracks -> [{id, marker_key, label, color, points:[{t_global_s,x,y,z, quality,views}]}] (points ordered by t_global_s) PATCH /api/tracks/{id} {label?, color?} -> updated track dict (404 on missing) DELETE /api/tracks/{id} -> {deleted: id} (404 on missing) POST /api/tracks/solve -> {result, tracks[, note]} — runs lane H's detect->solve (tracker_solve.run_solve); while lane H is stubbed it degrades to a VALID empty result + "note" (house pattern). manifest gains "has_tracks": bool. Source videos in ``data/raw`` are mounted at ``/media`` via Starlette ``StaticFiles``, which supports HTTP Range (required for ``