Skip to content

Retried jobs leave the jobs page, captions outlast clean-up, a changed re-download is worked on afresh - #25

Merged
dben merged 4 commits into
mainfrom
ccr-9ec380ef-bq4wb9
Oct 25, 2026
Merged

dben merged 4 commits into
mainfrom
ccr-9ec380ef-bq4wb9

Conversation

@dben

@dben dben commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Retried jobs leave the jobs page

Retry queued a new job but left the failed one under Recent with its Retry button. The listing now leaves out a failed or cancelled job once a later job of the same kind, episode and payload exists. The row and its timings stay.

Captions outlast clean-up

Clean-up deleted every saved transcript with the download, so downloading an episode again meant sending it to the transcription service again.

  • Captions from the transcription service, with their word times and speaker turns, now stay on a cleaned-up episode for a year (CAPTIONS_DAYS in retention.py), then go unless someone keeps the episode.
  • The feed's transcripts still go. On the next download they're fetched again and kept only for checking the captions, as before the clean-up.
  • The episode page and captions.vtt leave kept captions out until there's a cut to fit them to.

A changed re-download is worked on afresh

Shows that insert ads per download send a different file each time, and everything after a changed ad moves. Re-downloads were reusing the old fingerprint (kept 30 days), hand cuts and captions, all timed to the old file.

  • Episodes now store the SHA-256 of their download (migration 20, episodes.original_sha256).
  • When a new download doesn't match, processing._new_download drops the fingerprint, where blocks play in it, the report and comparisons, hand cuts, kept "Don't cut this" stretches, and captions. The episode is then fingerprinted, compared and transcribed again.
  • Blocks marked by hand and block types stay, since they're stored as fingerprints, not times.
  • Episodes downloaded before this have no hash, so their next download is taken to be the same file and keeps everything. The hash is recorded from then on.

Tests

  • Jobs page: Retry hides the failed job, and after the new job runs Recent shows only the finished one.
  • Captions kept through clean-up, reused on the same file, deleted after a year, and hidden on the episode page while there's no cut.
  • A different file is transcribed again.
  • End to end: the same file re-downloaded keeps its fingerprint and hand cuts; a different file is fingerprinted and compared again, and its hand cuts and kept stretches are dropped.
  • Migration hash registered in test_schema.py, and the upgrade test in test_web.py drops the new column too.
  • The last full suite run had 251 passing and 2 failing. Both failures were the schema tests above; after fixing them those files pass, but the whole suite wasn't rerun. Ruff is clean.

Generated by Claude Code

Retry queues a new job and leaves the old row as it was, so the failed job
stayed under Recent with its Retry button still showing. The listing now
leaves out a failed or cancelled job when a later job of the same kind,
episode and payload exists. The row itself is kept, along with its timings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015uaDJg4o8vw6uDYdNhUZhX
Clean-up deleted every saved transcript with the download, so an episode
downloaded again was sent to the transcription service once more. Captions
the service made (with their word times and speaker turns) now stay on an
expired episode for CAPTIONS_DAYS, and the next download uses them: the
feed's transcripts are fetched again beside them, kept only for checking,
as before the clean-up. After a year they go, unless someone keeps the
episode. The episode page leaves kept captions out until there is a cut
to fit them to.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015uaDJg4o8vw6uDYdNhUZhX
Captions kept from before a clean-up were reused whatever the next download
was. A show that puts its ads in as each download is made sends different
audio each time, and everything after a changed ad moves, so the old times
no longer fit. Captions now record the SHA-256 of the download they were
made from; after a new download, kept captions that don't match it are
deleted and the episode is transcribed again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015uaDJg4o8vw6uDYdNhUZhX
A cleaned-up episode keeps its fingerprint for 30 days, and its hand cuts
for good, all timed to the file it was first downloaded as. A show that puts
its ads in as each download is made sends a different file each time, so
"Download again" cut it at the old file's times.

The episode now records the SHA-256 of its download (migration 20). When a
new download differs, its fingerprint, where blocks play in it, its report
and comparisons, the hand cuts and kept stretches on its timeline, and its
captions all go: it is fingerprinted, compared and transcribed again. This
replaces the captions' own check from the last commit. Episodes downloaded
before this have no SHA-256 yet and are taken to be the same file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015uaDJg4o8vw6uDYdNhUZhX
@dben
dben merged commit 7cd512f into main Oct 25, 2026
5 checks passed
@dben
dben deleted the ccr-9ec380ef-bq4wb9 branch October 25, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants