The Museum Heist Nobody Saw
The camera was sending the empty case. The wall was displaying cached footage from before the network interruption. A fresh wall clock and LIVE overlay described the gateway, not the age of the underlying image.
Prove where the images diverge
Select Diamond Gallery and sample the camera directly. Its media receipt belongs to the current encoder session and its image shows the empty case. In Evidence, inspect the gallery's gateway response: it is a cache hit whose receipt belongs to an earlier session. Both responses can be HTTP 200 without containing the same image.
The encoder directory and media contract explain the identity boundary. On reconnect, the camera changes stream_id and restarts sequence. Its compatibility media path includes the camera and sequence, but omits the encoder session. The initial policy uses only that path, so a new segment aliases an old stored object.
Reproduce the failure
Run Steady viewers with the active gateway. It works within one session. Run Camera reconnect: later requests retrieve media from the earlier connection. Clearing the production cache improves the wall but leaves the key policy unchanged. Session labels are camera-local, so a repair must also distinguish different cameras and successive segments.
Patch and deploy
def cache_key(segment):
return (
segment["camera_id"],
segment["stream_id"],
segment["sequence"],
)
The camera, encoder session, and media sequence together identify an immutable segment. (segment["path"], segment["stream_id"]) is also valid because the path already includes camera and sequence. Other implementations with equivalent behavior are accepted.
Test your draft on the reconnect and all-camera scenarios. Repeated viewers should share objects, while different segments must return their original media. A request_id or request-time key defeats sharing and fails the origin-capacity check. A session-only key mixes successive segments; a sequence-only key mixes cameras and sessions.
Deploy the patch. New keys normally separate current footage from old contaminated objects without a manual purge; if a candidate key aliases an existing object, production verification detects it. No specific key text or mandatory purge is required when the returned media is correct.
The wall finally displays the empty case. This is a successful monitoring repair, even though the physical theft remains a security investigation.