fix: unchain track 5 frames so one bad read cannot poison the rest

The chained attempt (1530bbc) fed each run's result into the next frame's
seed, so a wrong read on one frame carried into the ones after it. Runs are
independent again: every frame is seeded from the drawn shape, frames 2-5
with it grown x1.5 about its centre for motion tolerance. REQ-189, ui-spec
and tasks.md updated to the independent contract.
This commit is contained in:
asus committed 2026-10-05 12:35:17 +07:00
1 parent 1530bbc999
commit 9c95a4a759
4 files changed
+43 -34

No files matched your search

+12 -9
View File
@@ -1409,15 +1409,18 @@ read it.
1. Root cause: `trackForward` sent the **same box** to all 5 frames, and batch 19 was
extracted at **fps 0.5** (one frame every 2 s, `batches.fps`) — a truck entering frame
outruns a static seed. Now the runs are **chained**: first frame gets the drawn box
untouched, each later frame is seeded with the previous run's resulting shape grown ×1.5
about its centre (`SEED_GROWTH`, `growBox`), a refused frame keeps the last good seed.
Geometry handling moved to a module-level `shapeBox()` reused by both call sites.
→ verify: **[DONE]** `npm run build` green; first frame un-grown (stationary case keeps
its exact precision); failure path leaves `seed` untouched; busy guard still blocks a
double-writes; **moving-object behaviour needs the user's GPU run** — expect chained
readjustment to hold a slow move, still lose a fast one at 0.5 fps (fix: re-extract at
2 fps via *Trim → frames per second*, or REQ-190 video propagation).
outruns a static seed. First attempt chained each run's result into the next frame's seed;
that let a wrong read on one frame carry into the following ones, which the user rejected
as poisoning. Final shape: runs are **independent again**, every frame seeded from the
drawn shape, frames 2–5 grown ×1.5 about its centre (`SEED_GROWTH`, `growBox`) for motion
tolerance. Geometry handling moved to module-level `shapeBox()`.
→ verify: **[DONE]** `npm run build` green; no frame's seed derives from a previous result
(`seed` reassignment removed, grep confirms `firstBox` is the only seed source); first frame
un-grown so the stationary case keeps exact precision; growth ×1.5 total size (not 2×);
busy guard still blocks double-writes. **Moving-object behaviour needs the user's GPU
run** — and without chaining, a fast-moving truck may still leave the seed window; fix is
re-extract at 2 fps (*Trim → frames per second*) or a video-propagation requirement
(not yet written; `sam3_video_inference.py` already has `propagate_in_video`).
## Task — Track 5 Frames works at all (REQ-189) `[DONE]`