From 70bfd9aa51239ef2b9b8264ac2f6f1cceace3b84 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Thu, 24 Sep 2026 18:11:51 +0000 Subject: [PATCH] Make the animated banner step say what it did The banner step produced nothing in three consecutive production renders while the same code, in the same container, produced all three banners when invoked by hand. That was hard to diagnose for one reason: success and never-ran looked identical from outside, because the only output on the failure path was a console.warn that never appeared in the logs. It now logs on entry, logs how many banners it produced, and logs a failure at error level. The next render says which of the three happened. Co-Authored-By: Claude Opus 5 (1M context) --- lib/ads/video/render.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ads/video/render.ts b/lib/ads/video/render.ts index 4d77402..f2757ca 100644 --- a/lib/ads/video/render.ts +++ b/lib/ads/video/render.ts @@ -360,6 +360,11 @@ export async function renderPreroll(args: { // revision whose video is fine, because the video is what the advertiser is // waiting for. The problems are recorded either way. if (args.probeGif) { + // Logged unconditionally. The banner step failed silently in production for + // three deploys while working when invoked by hand in the same container, + // and the only reason that was hard to diagnose is that success and + // never-ran looked identical from outside. + console.log("[render] animated banners: start"); try { const gifs = await renderAnimatedBanners({ snapshot, @@ -367,6 +372,7 @@ export async function renderPreroll(args: { captureFrames, probeGif: args.probeGif, }); + console.log(`[render] animated banners: produced ${gifs.length}`); for (const g of gifs) { const facts = await fileFacts(g.file); assets.push({ @@ -393,7 +399,7 @@ export async function renderPreroll(args: { // — while the code did the opposite and failed whole renders whose video // was fine. The banners are optional profiles; their absence is visible // in the asset list, and the reason belongs in the log. - console.warn(`[render] animated banners skipped: ${(err as Error).message}`); + console.error(`[render] animated banners FAILED: ${(err as Error).message}`); } }