Skip to content

Local audio transcript cache misses because fileMtime is omitted on write #240

@alfozan

Description

@alfozan

Summary

Repeated --extract runs on the same unchanged local audio file re-transcribe instead of serving the cached transcript.

Repro

summarize --plain /path/to/audio.opus --extract
summarize --plain /path/to/audio.opus --extract

Observed

The second run still logs transcription done media file: yt-dlp and calls the transcription provider. If the second run uses an invalid transcription API key, it fails with the provider error instead of serving the cached transcript.

Expected

The second run should hit the transcript cache for the same unchanged local file.

Likely Cause

For local files, summarizeMediaFile() passes fileMtime into transcript resolution. transcriptCache.get() builds its key with fileMtime, but transcriptCache.set() writes using a key that omits fileMtime. Since buildTranscriptCacheKeyValue() includes fileMtime, local-file reads and writes do not match.

Suggested Fix

Include fileMtime when building the write key in transcriptCache.set(), and add a regression test against the real cache store implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions