move_detect/cloud/tests
유창욱 99070f5e87 fix(cloud): don't swallow snapshot failures, clean orphan JPEGs (P4-7)
The ingest snapshot loop silently `continue`d on re-encode and file-write
failures (evidence lost with a 201), and a DB-index throw after the file
landed left an orphan JPEG on disk with no row — or bubbled into a 500
that discarded an already-stored event.

Extracts storeSnapshot(): re-encode → write file → index, in that order
so bytes exist before a row points at them. Every failure is error_log'd
instead of swallowed; a DB-index failure after the write @unlinks the
orphan file. A snapshot problem no longer fails the ingest — the event is
already persisted, so the 201 stands.

Test: testSnapshotIndexFailureCleansOrphanFileButKeepsEvent uses a
throwing snapshot repo and asserts 201, the event is stored, and no *.jpg
is left in the snapshot dir.

phpunit: 90 passing (4 skipped: PDO-backed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Xmn8KZWqiQUguEMRtn6rW
2026-07-17 10:08:28 +09:00
..
Support feat(cloud): cursor pagination for the event list (P4-5) 2026-07-17 10:05:52 +09:00
ApiSyncTest.php feat(delivery-audit): PIPA retention + cloud hardening (P3-2, P4-1..4) 2026-07-17 09:28:16 +09:00
AuthControllerTest.php fix(cloud): verify login CSRF + zone ownership 400 not 500 (P4-8, P4-6) 2026-07-17 10:00:04 +09:00
BasePathTest.php fix(cloud): logout order, url normalization, length caps, package hygiene (P4-9/10/11, P5-6) 2026-07-17 09:48:35 +09:00
ConfigTest.php feat(cloud): P1-B scaffold — composer autoload + Config 2026-07-11 23:16:13 +09:00
DashboardTest.php feat(cloud): cursor pagination for the event list (P4-5) 2026-07-17 10:05:52 +09:00
EventValidatorTest.php fix(cloud): logout order, url normalization, length caps, package hygiene (P4-9/10/11, P5-6) 2026-07-17 09:48:35 +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): don't swallow snapshot failures, clean orphan JPEGs (P4-7) 2026-07-17 10:08:28 +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): verify login CSRF + zone ownership 400 not 500 (P4-8, P4-6) 2026-07-17 10:00:04 +09:00