move_detect/server/migrations
유창욱 6b69f22275 feat(data-asset): labeled-dataset export + improvement-action effect tracking
The operator's daily clicks become durable assets:

Label export (GET /api/export/labels?days=N, JSONL download):
- Every 확인/오탐 click is a human verdict on a detection, and each verdict
  carries a blurred 3-frame evidence timeline. The export turns that into a
  dataset: one JSON line per event with type/severity/camera/zone/metrics/
  spatial, label (confirmed | false_positive | unreviewed), labeled_by, and
  snapshot uuids (images fetched via /snap, which re-checks session + site).
  ergo_report rows are excluded - statistics are not labelable detections.
- Admin-only ('manage_compliance'): bulk export of detection history is a
  compliance decision, not an operator convenience. Site scope applies.
- This is where the deferred P1-C evaluation set will come from for free.

Improvement actions (move_actions + GET/POST /api/actions):
- Record a site fix against a camera ("미끄럼 방지 매트 설치"); the report's
  new card compares detection density over EQUAL windows before/after the
  fix (capped 30d; under 3 days shows "측정 중" - two days of data is noise,
  not a verdict). Improvement shows accent, worsening shows red - the card
  reports honestly in both directions, which is exactly what makes the
  improvement numbers credible.
- Future timestamps and >1y-old entries are rejected (the comparison could
  not be fair). Recording needs edit_zones + CSRF.

Verified: PHPUnit 145 pass (5 new: export perm gate + line shape/labels/
snapshot join, action validation, equal-window effect math, pending state)
+ Chrome real-render (action card with better/worse/pending rows, export
link, no console errors).
2026-08-07 07:44:00 +09:00
..
2026-07-17-p1-9-p3-2b.sql refactor: rename cloud/ to server/ (cafe24 is web hosting, not cloud) 2026-07-20 11:30:52 +09:00
2026-07-20-move-table-prefix.sql feat(dashboard): load a camera's latest frame as the zone-editor background 2026-07-20 23:41:58 +09:00
2026-08-06-false-positive-tag.sql feat(fp): operator false-positive tag + per-camera FP-rate report 2026-08-06 20:38:36 +09:00
2026-08-06-heatmap-spatial.sql feat(ergo): posture-load exposure scoring (REBA bands) with anonymous reports 2026-08-06 21:46:39 +09:00
2026-08-06-zone-rules.sql feat(zones): occupancy rule engine - lone-worker / capacity / dwell limits 2026-08-06 19:33:12 +09:00
2026-08-07-improvement-actions.sql feat(data-asset): labeled-dataset export + improvement-action effect tracking 2026-08-07 07:44:00 +09:00