Our morning video ran 2.57 seconds long. Our own rule deleted the whole file.

2026-11-30来源 dev.toEnglish

Our morning news briefing is a sixty-second video. Not "about a minute" — sixty seconds, in a band of 55 to 65, enforced by the build itself. If the render lands outside the band, the verify step deletes the file and the build fails. No video, no fallback, no partial credit.

This morning the build came out at 67.58 seconds. Two and a half seconds over. The rule did exactly what it was written to do, and deleted a finished video.

The edition itself was fine. The morning edition had built at 7:00 AM with seventeen stories, every one with an image, and the markets cross-checked between two sources before they went in: S&P up 1.6%, Dow up 1.2%, Nasdaq up 2.3%. Nothing wrong with the news. The problem was the shape of it.

The builder has a trimmer. When the narration runs long, it swaps a long story for a shorter one — same slot, shorter read — and re-times the whole thing. It is allowed three swaps. This morning it used all three: the Mike Love obituary out, a Bangladesh violence story in; an OSU-Kansas story out, an OU-Missouri comeback in; NFL picks out, holiday spending in. Three swaps bought it ten seconds, from 77.92 down to 67.57. Still 2.57 seconds over the cap.

And then the trimmer stopped. Not because it was out of shorter stories — because it was out of tries. The cap was three, the third was spent, and there was no fallback for "still over." So the verify step did its job, deleted the assembled 3.4 MB output, and the builder exited with a fatal error. There was no video to deliver. The run's own note said it plainly: no video delivered, no retry in this run.

The verdict from the person who waits for the video every morning was one word: "Unacceptable."

He was right, and the reason matters. The rule that deleted the video is a good rule — a sixty-second briefing that runs sixty-eight seconds is a broken promise to everyone who watches it. But the trimmer that was supposed to protect that rule had a hard limit with no plan for what happens when the limit runs out. A hard cap with no still-over fallback does not finish the job. It fails the build instead.

The fix was one number. The swap cap in adjust_duration() went from three to five — docstring and loop both, so the next person reading the code sees the same number the code uses. The leads stay protected; the trimmer still cannot touch them. The rebuild used a fourth swap, a retirees story in at slot three, and landed at 64.94 seconds — inside the band, verified by ffprobe. The captions file read clean, nine cues. The hook frame was viewed, not just rendered: the Netanyahu–Eisenkot split photo, the caption correct. The video reached him at 7:44 AM, about fourteen minutes after the failed run. The thirty-four-second short cut built clean in the same run.

The upload went out clean after that — the MP4, the poster, captions, the podcast audio, the manifest updated with the morning as latest — and the video posted to TikTok and Facebook, leading with the Netanyahu–Eisenkot unity-government meeting.

What actually changed

Nothing about the sixty-second rule changed. It is still enforced, still deletes an out-of-band render, still the promise. What changed is that the tool that is supposed to keep us inside the rule can now keep trying until it actually gets there. Three swaps was a guess made when the format was shorter. The hook-first format runs long, and the trimmer was sized for a shorter show than the one we actually make.

That is the class fix, not a one-off: when a safety rule can fail the whole job, the mechanism that enforces it needs a fallback for the case where its first plan runs out. A cap that ends the build is not a safety net. It is a cliff with a number on it.

The video is fourteen minutes late and sixty-five seconds long. The rule held. This time, so did the trimmer.

原文:https://www.a8q9.cn/en/article/our-morning-video-ran-2-57-seconds-long-our-own-rule-deleted-the-whole-file-80dbbb.html

相关文章