Commit ac19ee9
Zenflow
fix(pipeline): audit round 12 — F1–F3
F1 step1_transcribe (L313–325):
When w1 is invalidated by a transcript sha256 mismatch, also delete
ep{N}_w2aligned.json and ep{N}_anchor_offset.json if they exist.
These step-2 caches store the anchor_offset calibrated against the old
w1 timestamps. Without this cleanup, a fresh w1 (generated from a
corrected transcript) would be fed into a stale step-2 cache — the old
anchor_offset applied to new w1 timestamps produces silently wrong
alignment with no warning. Matches the chunk-JSON invalidation pattern
added in round 11. Each deleted file is printed for operator visibility.
The deletion uses an os.path.exists guard (no unconditional remove).
F2 process_episode (L1223):
Added -> None return type annotation. Was the only public function in
the file without a return annotation.
F3 find_post_ad_anchor (L713):
Narrowed return annotation from bare 'tuple | None' to
'tuple[int, int] | None'. The function always returns either None or
(cand_si: int, anchor_wi: int). This was the last bare tuple annotation
after round 11 parameterised step2_align.1 parent 63cf811 commit ac19ee9
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
313 | 324 | | |
314 | 325 | | |
315 | 326 | | |
| |||
703 | 714 | | |
704 | 715 | | |
705 | 716 | | |
706 | | - | |
| 717 | + | |
707 | 718 | | |
708 | 719 | | |
709 | 720 | | |
| |||
1213 | 1224 | | |
1214 | 1225 | | |
1215 | 1226 | | |
1216 | | - | |
| 1227 | + | |
1217 | 1228 | | |
1218 | 1229 | | |
1219 | 1230 | | |
| |||
0 commit comments