From 39fcac10b593dbbe889c76d221e0df0787da60eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20F=C3=B6rtsch?= Date: Tue, 21 Apr 2026 11:10:11 +0200 Subject: [PATCH] reanalyze stale noops on processInbox so title fixes actually get queued MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Items previously marked is_noop=1 by the old analyzer (before the title check) have reasons=NULL. processInbox now reanalyzes these once — if the title check flips them to non-noop, they enter the pipeline and get their titles fixed by ffmpeg. One-time catch-up: subsequent runs skip them because reasons is populated. Co-Authored-By: Claude Opus 4.6 (1M context) --- package.json | 2 +- server/api/review.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 950ac86..3860f67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "netfelix-audio-fix", - "version": "2026.04.21.11", + "version": "2026.04.21.12", "scripts": { "dev:server": "NODE_ENV=development bun --hot server/index.tsx", "dev:client": "vite", diff --git a/server/api/review.ts b/server/api/review.ts index d0baf7f..486b1bb 100644 --- a/server/api/review.ts +++ b/server/api/review.ts @@ -146,6 +146,17 @@ export async function processInbox( // Snapshot the ids first — reanalyze() below rewrites stream_decisions and // the plan's auto_class/is_noop so we must re-read the plan after each // reanalysis rather than trusting this initial select. + // + // Also pick up noop items that have never been analyzed with the reasons + // system (reasons IS NULL). Reanalyze may flip them to non-noop if the + // title/language/default checks now catch something the old code missed. + const staleNoops = db + .prepare("SELECT item_id FROM review_plans WHERE is_noop = 1 AND reasons IS NULL") + .all() as { item_id: number }[]; + for (const { item_id } of staleNoops) { + reanalyze(db, item_id, audioLanguages); + } + const unsortedIds = db .prepare(` SELECT rp.item_id