- P3-2 [H] snapshot retention (7 days): snapshot_retention_days config;
SnapshotRepository::purgeOlderThan (interface + Pdo + double, files-then-rows,
bounded batch); opportunistic purge in the ingest path (Cafe24 has no cron).
- P4-1 [H] index.php sets display_errors=0 + a global exception handler → generic
{"error":"internal"} + error_log (no DSN/db_user leak); ships www/move_detect/.user.ini.
- P4-2 [H] ConfigController + HeartbeatController take an optional rate limiter +
clientIp; pre-auth per-IP anti-flood → 429 (were unthrottled).
- P4-3 [M] PdoNonceRepository::remember + PdoRateLimiterRepository::hit opportunistically
reap expired rows (Cafe24 has no cron; tables grew unbounded).
- P4-4 [M] Router::dispatch rawurldecodes captured params (Korean/space camera_id could
save zones but never load them).
Tests: python green; phpunit 84 green. See docs/delivery-audit.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Xmn8KZWqiQUguEMRtn6rW
16 lines
702 B
PHP
16 lines
702 B
PHP
<?php
|
|
return [
|
|
'db_dsn' => 'mysql:host=localhost;dbname=move_detect;charset=utf8mb4',
|
|
'db_user' => 'CHANGEME',
|
|
'db_pass' => 'CHANGEME',
|
|
'snapshot_dir' => __DIR__ . '/storage/snapshots',
|
|
// Every key App\Config reads is listed, defaults included. They all have `?? default`
|
|
// fallbacks, so an omitted key is silently absent rather than an error — an operator
|
|
// who never sees it here cannot know the knob exists.
|
|
'nonce_ttl' => 86400,
|
|
'timestamp_window' => 300,
|
|
'rate_limit_per_min' => 60,
|
|
'ingest_ip_rate_limit_per_min' => 300,
|
|
// PIPA retention: worker snapshots are purged after this many days (0 disables).
|
|
'snapshot_retention_days' => 7,
|
|
];
|