move_detect/cloud/tests
유창욱 9386dfc580 feat(delivery): install-path fixes + cafe24 package + delivery-audit hardening
Three intertwined bodies of work developed and tested together this session.
Full test suite green: python (edge) + phpunit (cloud).

## Edge/Pi install path
- setup_online.sh: apt-lock retry (apt-daily contention), Type=exec unit +
  StartLimitIntervalSec in [Unit], journalctl-on-failure, crash-loop detection.
- onnxruntime is now best-effort (no sdist / no 32-bit-ARM wheel); [6/8] probes the
  real backend and hard-fails if none works.
- Hailo HEF auto-fetch: edge/tools/fetch_hailo_hef.py (pinned sha256, refuses to guess
  8 vs 8L, HAILO_ARCH override for serial-less boards); hailo_pose.py run() timeout fix.
- install_offline.sh: mirrors the backend gate; onnxruntime optional.

## Cafe24 cloud package (cloud/deploy/)
- build_cafe24_package.sh emits move_detect_app/ (private, one folder) + www/move_detect/
  (docroot subdir); no-dev classmap autoloader; preflight.php; hardened .htaccess.
- Subdirectory mount support: Request::baseFrom/pathFor strip the mount prefix; index.php
  walks up to find the app root; views/JS prefix every URL with APP_BASE; session cookie
  scoped to the mount.

## Delivery audit — silent-failure & correctness (docs/delivery-audit.md)
All 4 blockers + all Phase-1 silent-failure + Phase-2 HIGH correctness:
- Edge cloud clients send a custom User-Agent (cafe24 WAF blocks python-requests) and
  allow_redirects=False.
- Daemon fails loud on blank CAFE24_URL/DEVICE_SECRET; run_loop logs swallowed exceptions;
  heartbeat carries real fps + per-camera health; UvcSource reopens a dead camera;
  offline queue is size-capped and drops poison rows; TARGET_FPS/QUEUE_DB validated.
- Zone coordinates normalized 0..1 on both sides (were canvas-px vs camera-px — every zone
  misplaced); pinch zones emit PINCH/HIGH (were downgraded to WARNING).
- Fall detection uses bbox cues when keypoints are low-confidence (occluded fallen person);
  ghost incident not cancelled by a bystander; displacement normalized per-second (FPS-invariant).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Xmn8KZWqiQUguEMRtn6rW
2026-07-17 09:07:33 +09:00
..
Support feat(cloud): repository interfaces + in-memory test doubles 2026-07-11 23:32:16 +09:00
ApiSyncTest.php fix(cloud): add nonce-replay + timestamp-window checks to config/heartbeat (M2) 2026-07-12 09:19:32 +09:00
AuthControllerTest.php fix(cloud): add per-IP rate limit to /login before Argon2id verify (H2) 2026-07-12 09:11:47 +09:00
BasePathTest.php feat(delivery): install-path fixes + cafe24 package + delivery-audit hardening 2026-07-17 09:07:33 +09:00
ConfigTest.php feat(cloud): P1-B scaffold — composer autoload + Config 2026-07-11 23:16:13 +09:00
DashboardTest.php fix(cloud): enforce CSRF on authenticated state-changing POSTs (M1) 2026-07-12 09:16:38 +09:00
EventValidatorTest.php fix(cloud): type-guard EventValidator fields against malformed input 2026-07-11 23:46:38 +09:00
HmacTest.php test(cloud): golden HMAC vectors proving P1-A Python interop 2026-07-11 23:25:15 +09:00
HttpTest.php feat(cloud): Http Request/Response primitives 2026-07-11 23:54:58 +09:00
ImageProcessorTest.php fix(cloud): session-id regeneration on login (fixation) + pristine test output 2026-07-12 00:35:41 +09:00
IngestControllerTest.php fix(cloud): move ingest per-device rate limit post-auth, add pre-auth IP limit (H1) 2026-07-12 09:09:31 +09:00
PasswordCsrfTest.php feat(cloud): argon2id password + CSRF token helpers 2026-07-12 00:11:20 +09:00
PdoIntegrationTest.php feat(cloud): PDO repositories + schema + Cafe24 deploy doc 2026-07-12 01:58:05 +09:00
RbacTest.php feat(cloud): RBAC permission matrix 2026-07-12 00:19:47 +09:00
RepositoryContractTest.php fix(cloud): centralize test-double autoloading via composer files 2026-07-11 23:38:01 +09:00
RouterTest.php feat(cloud): path-param router + dispatch 2026-07-12 00:49:52 +09:00
WiringSmokeTest.php feat(cloud): incident detail view renders snapshot images 2026-07-12 11:48:55 +09:00
ZoneConfigTest.php fix(cloud): enforce CSRF on authenticated state-changing POSTs (M1) 2026-07-12 09:16:38 +09:00