From 6a703c314d95120aa60328a4907d7681f7394044 Mon Sep 17 00:00:00 2001 From: type-two Date: Fri, 17 Jul 2026 20:55:29 +1000 Subject: [PATCH] foundation3 WIP checkpoint (steps 2-5,7): DB/API/CLI/config/capsule + tracker stubs Incomplete: step 1 (fixture markers + track_truth.json), step 6 (frontend wiring), step 8 (tests) not done; suite not yet run. Salvaged from interrupted prior session. Co-Authored-By: Claude Opus 4.8 --- backend/festival4d/api.py | 85 ++++++++ backend/festival4d/capsule.py | 4 +- backend/festival4d/cli.py | 27 ++- backend/festival4d/config.py | 2 + backend/festival4d/db.py | 140 +++++++++++++ backend/festival4d/synthetic.py | 283 +++++++++++++++++++++++++-- backend/festival4d/tracker_detect.py | 171 ++++++++++++++++ backend/festival4d/tracker_solve.py | 72 +++++++ plan/status/foundation3.md | 26 +++ 9 files changed, 793 insertions(+), 17 deletions(-) create mode 100644 backend/festival4d/tracker_detect.py create mode 100644 backend/festival4d/tracker_solve.py create mode 100644 plan/status/foundation3.md diff --git a/backend/festival4d/api.py b/backend/festival4d/api.py index 06ed1ee..4037a6e 100644 --- a/backend/festival4d/api.py +++ b/backend/festival4d/api.py @@ -23,6 +23,17 @@ Phase 5 (foundation2; shapes frozen in plan/20-phase5.md contracts): 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 ``