Files
universal-video-transcode/scripts
hoelee 7c1a243aad trash GC: measure the 72h hold from ARRIVAL, not from the original's mtime
Retiring an original is `os.replace`, which keeps the file's own mtime, so a 2014 movie replaced today
carried a 2014 timestamp into the quarantine and `st_mtime > cutoff` judged it expired on arrival —
measured 2026-11-10 on the owner's library: 86 of 118 quarantined entries were already "expired" the
moment they landed, i.e. the promised 72-hour rollback window was 0 hours for every old file.

New `trash_entry_ts()`: sidecar `ts` (written by move_to_trash, second precision) → `<date>/` directory
name taken as END of that day (a day late, never a second early) → mtime only as the last resort.
`purge_trash()` now gates on it. The three safety invariants are unchanged: a sidecar whose `live` file
is gone is the LAST copy and is never collected, the `.purge` stamp still throttles a directory to one
sweep an hour, and deletion stays per-file (never rmtree).

Tests (hevc-transcode/tests/test_engine_install_gates.py): fake-expiry helpers now backdate the sidecar
`ts` too; two new pins — an old original replaced today must keep its full 72 h, and a missing sidecar
may only ever make an entry look younger.
2026-11-10 09:49:48 +08:00
..