reanalyze stale noops on processInbox so title fixes actually get queued
Build and Push Docker Image / build (push) Successful in 1m30s

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) <noreply@anthropic.com>
This commit is contained in:
2026-04-21 11:10:11 +02:00
parent 50e1ea66f4
commit 39fcac10b5
2 changed files with 12 additions and 1 deletions
+11
View File
@@ -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