lane A status: M1 complete, ready_to_merge (isolated worktree)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
m3ultra 2026-07-16 01:15:23 +10:00
parent 157c783e25
commit 88caecb660

View File

@ -1,21 +1,24 @@
# Status — lane-A # Status — lane-A
## Round 0 — 2026-07-16 — STATUS: in_progress ## Round 0 — 2026-07-16 — STATUS: ready_to_merge (committed on isolated worktree)
**Directives acknowledged:** round 0 of plan/DIRECTIVES.md (run order & protocol; Lane A = spec M1). **Directives acknowledged:** round 0 of plan/DIRECTIVES.md (run order & protocol; Lane A = spec M1).
**Acceptance checklist** (spec M1 + lane brief): **Acceptance checklist** (spec M1 + lane brief) — ALL PASSING:
- [ ] `ingest`: ffprobe each file in `data/raw`, register in `videos`, extract mono 16 kHz WAV per video into `data/work/audio/`. - [x] `ingest`: ffprobe each file in `data/raw`, register in `videos`, extract mono 16 kHz WAV into `data/work/audio/`.
- [ ] `sync`: GCC-PHAT (PHAT-whitened, not raw xcorr) pairwise offsets, scored by peak-to-second-peak ratio. - [x] `sync`: PHAT-whitened GCC-PHAT pairwise offsets, scored by peak-to-second-peak ratio; sub-sample parabolic peak refinement.
- [ ] Global least-squares solve over the offset graph, confidence-weighted, cycle-consistency rejection (>50 ms). - [x] Global confidence-weighted least-squares solve; cycle-consistency rejection (>50 ms residual).
- [ ] Drift: windowed GCC-PHAT, line fit → `drift_ppm`; store 0 if `|drift| < 5 ppm`. - [x] Drift: windowed GCC-PHAT + line fit → `drift_ppm`; store 0 if `|drift| < 5 ppm`.
- [ ] Disconnected sync-graph components → `offset_ms = None` (spec pitfall #5). - [x] Disconnected components → `offset_ms = None` (spec pitfall #5).
- [ ] Persist `offset_ms`/`drift_ppm`/`sync_confidence` via `db.update_video_sync`; export `config.SYNC_JSON`. - [x] Persist via `db.update_video_sync`; export `config.SYNC_JSON`.
- [ ] `python -m festival4d ingest && python -m festival4d sync` recovers GT offsets (±10 ms) and drift (±3 ppm). - [x] `synthetic → ingest → sync` recovers GT offsets (err < 0.001 ms) and drift 0 ppm inside ±10 ms / ±3 ppm.
- [ ] `pytest` green (new `test_ingest.py`, `test_audio_sync.py`); synthetic end-to-end intact. - [x] `pytest` green in isolation: **43 passed** (24 foundation + 19 new) on pristine foundation + Lane A only.
**Done this round:** branched `lane/a-media` from `main`; baseline `pytest` green (24 passed). Verified env: ffmpeg/ffprobe present, librosa 0.11, scipy 1.18; synthetic fixtures (`data/raw/cam{0,1,2}.mp4`, DB rows GT offsets 0/+1370/842) in place. Implementing `ingest.py` + `audio_sync.py`. **Done this round:** implemented `ingest.py` + `audio_sync.py`; wrote `test_ingest.py` (6) + `test_audio_sync.py` (13). Committed as `157c783` on `lane/a-media`, based directly on `main`/foundation (`5fa7301`) — exactly the 5 owned files, no other lane's changes. Evidence (run in the isolated `festifun-laneA` worktree):
- `pytest``43 passed, 4 warnings` (warnings are librosa/audioread deprecations only).
- `synthetic → ingest → sync` → DB cam0/1/2 = +0.000 / +1370.000 / 842.000 ms, drift 0, err ≤ 0.0002 ms vs `ground_truth.json`.
- `sync` exported `data/work/sync.json` (reference id, per-video offset/drift/confidence, raw edges, components).
**Blockers / questions for coordinator:** none. `sync.json` schema is unspecified by the spec — designing a self-describing schema (reference id, per-video offset/drift/confidence, raw edges, components); no consumer depends on it (API reads the DB), so no change request needed. **Coordination note (was a blocker; resolved for Lane A):** Lanes A/C/D were sharing one working directory (`/Users/m3ultra/Documents/festifun`) and colliding — HEAD there was moved to `lane/d-events`, and the shared tree held four lanes' uncommitted changes intermixed. Per coordinator sign-off, Lane A was landed into its own `git worktree` (`festifun-laneA`, branch `lane/a-media` reset to `main`) and committed there, disturbing no other worktree. **Still open for coordinator:** lanes C and D also need their own worktrees (lane B already has one); the shared dir still contains their intermixed uncommitted work.
**Next:** implement both modules, validate GCC-PHAT against the real extracted fixture audio, write tests, run acceptance, then update status → ready_to_merge. **Next:** awaiting coordinator go-ahead to `git push origin lane/a-media` and merge to `main` (merge is coordination-sensitive given the collision; branch is ready).