Skip to content

fix(subtitle_gen): include every output input in cache identity - #968

Open
chuenchen309 wants to merge 1 commit into
OpenMontageInc:mainfrom
chuenchen309:fix/subtitle-gen-cache-identity
Open

chuenchen309 wants to merge 1 commit into
OpenMontageInc:mainfrom
chuenchen309:fix/subtitle-gen-cache-identity

Conversation

@chuenchen309

Copy link
Copy Markdown

Summary

With OPENMONTAGE_ASSET_CACHE=1, subtitle_gen (deterministic) is keyed only on segments, format and max_words_per_cue. A rerun with corrections, which is the "fix an ASR typo" loop, or with a new max_chars_per_line or highlight_style restores the first call's subtitle file.

Reproduction on main (2e003e6):

raw.srt    {}                            from_cache=False  'teh fox'
fixed.srt  corrections={"teh": "the"}    from_cache=True   'teh fox'   <- still uncorrected

Same per-tool gap as #883 (remotion_caption_burn) and #882 (video_compose).

Related issue

None.

Changes

  • Key subtitle_gen on every input it reads except output_path (all of them are declared in its schema).
  • tests/tools/test_subtitle_gen_cache_identity.py: every schema input changes cache_key, and a corrected rerun is written rather than restored. 4 of these fail without the fix.

Testing

  • pytest tests/ on this branch: 2923 passed. The two failures also happen without this change: test_bmts_lite.py::test_run_emits_mp4_timeline_audiomap_and_openmontage_report fails on main too, and test_audio_mixer_ducking_timing.py[full_mix] is intermittent (1 of 3 runs on its own).
  • ruff check on the changed files.

Checklist

  • The change is focused on a single logical concern.
  • I ran the relevant tests locally (make test-contracts / make test) where applicable.
  • I updated docs/README if behavior or usage changed.
  • No unrelated files (build artifacts, local config) are included in the diff.

With OPENMONTAGE_ASSET_CACHE=1 the key covered only segments, format and max_words_per_cue, so a rerun with corrections, max_chars_per_line or highlight_style restored the first call's file. Same per-tool fix as OpenMontageInc#882/OpenMontageInc#883.
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.

1 participant