3 Commits
Author SHA1 Message Date
jetson bc537984d6 docs: sync README, ERD, changelog with model upload/conversion feature 2026-11-04 10:39:49 +07:00
jetson d3d58ffcde fix: harden the output lifecycle (range requests, temp files, job gate)
Review of the compression branch (ce93c68..d7c1415): one Important and the
cheap real Minors, each with a RED test first.

- app.py: drop the manual Content-Length override - it broke ranged
  requests (206 announcing the full length while sending a slice).
  send_file sets it and the 206/Content-Range itself.
- app.py: the download route serves video extensions only, never the temp
  of an encode in flight.
- src/compress.py: the encode temp is unique per attempt (mkstemp), is
  validated (playable video) and fsynced before it replaces the original;
  a failing os.replace keeps the original and cleans the temp up instead
  of raising into the route. The compressed video keeps the source mode.
- src/compress.py: a stale temp of a killed encode is swept after 2 h
  instead of the 5-day video expiry.
- src/job.py: cancelled and failed jobs are not re-encoded; the job shows
  "Compressing..." while the encode runs.
- ERD.md: the $OUTPUT_DIR/*_compressed.mp4 row is gone.

328 tests pass (was 319).
2026-10-28 15:47:28 +07:00
jetson 97507f8bf8 docs: add ERD.md (Mermaid) and CHANGELOG.md
ERD: no DB in this repo — models in-memory Job/JobResult entities plus
filesystem artifacts (uploads/, output/job-*/, zones.json, models/),
with status state machine and restart/orphan hazards.

CHANGELOG: Keep a Changelog format covering all 83 commits grouped by
date, from 2026-09-15 init through the /upload NameError 500 fix.
2026-10-20 09:24:30 +07:00