From 26dc9b505966de06e42cfe9bd556ce30a4e3dfbe Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 22 Sep 2026 20:21:40 +0000 Subject: [PATCH] fix: widen confirm-decode timeout to 15min - 1.8GB files decode at ~9x and were false-flagged at 5min --- src/remediation.js | 4 ++-- src/sonarr.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/remediation.js b/src/remediation.js index d460af5..7da550d 100644 --- a/src/remediation.js +++ b/src/remediation.js @@ -125,7 +125,7 @@ async function tickVerifying(rem) { return; // still extracting — keep waiting until timeout } - const decoded = await fullDecode(local, { timeoutMs: 300000 }); + const decoded = await fullDecode(local, { timeoutMs: 900000 }); if (decoded.pass) { setRemediationState(rem.episode_id, 'importing', { details: `verified ${record.outputPath}` }); return; @@ -172,7 +172,7 @@ async function tickImporting(rem) { try { await waitForStableFile(local, { intervalMs: 5000, checks: 2, maxWaitMs: 120000 }); } catch { return; } - const decoded = await fullDecode(local, { timeoutMs: 300000 }); + const decoded = await fullDecode(local, { timeoutMs: 900000 }); if (decoded.pass) { setRemediationState(rem.episode_id, 'swapped', { details: 'replacement verified on disk' }); logAction(rem, 'remediation_swapped', 'Replacement downloaded, verified clean, and imported. Old corrupt file replaced.'); diff --git a/src/sonarr.js b/src/sonarr.js index 9d913b0..2ef5ce8 100644 --- a/src/sonarr.js +++ b/src/sonarr.js @@ -204,7 +204,7 @@ export async function ensureUpcomingEpisodes(seriesId, season, episode, preloade // decode confirm and go straight to remediation. const { fullDecode } = await import('./decoder.js'); const confirm = localPath - ? await fullDecode(localPath, { timeoutMs: 300000 }) + ? await fullDecode(localPath, { timeoutMs: 900000 }) : { pass: false, error: 'local file not mounted - decode confirm skipped' }; if (confirm.pass) { // Tier 1/2 was a false positive (e.g. -ss tail artifact).