From e45bfe83b800d10957327d31418dc8bc91857254 Mon Sep 17 00:00:00 2001 From: Thomas Marchand Date: Fri, 31 Jul 2026 16:56:51 +0100 Subject: [PATCH] fix(ocr): classify packet budget exhaustion as timeout, not error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit execFileSync reports its own timeout as code ETIMEDOUT with killed=false on Linux — observed live on PR #2219 (group Compiler/Proofs/ExecutionSummary.lean after the 13-minute ceiling). Label it timeout so the uncovered-packets list points at OCR_PACKET_TIMEOUT_MINUTES instead of implying a reviewer crash. --- .github/scripts/ocr-packet-review.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/scripts/ocr-packet-review.js b/.github/scripts/ocr-packet-review.js index dc21f4a46..1d42db2d1 100644 --- a/.github/scripts/ocr-packet-review.js +++ b/.github/scripts/ocr-packet-review.js @@ -110,7 +110,12 @@ function reviewGroup(plan, group, rulesPath) { return { ...base, status: 'success', findings: comments.length, comments }; } catch (err) { const detail = String(err && err.message ? err.message : err).slice(0, 300); - const status = err && err.killed ? 'timeout' : 'error'; + // execFileSync surfaces its timeout as code ETIMEDOUT (killed stays false + // on some platforms) — observed live on PR #2219 group 2. Label budget + // exhaustion as timeout so the summary suggests raising + // OCR_PACKET_TIMEOUT_MINUTES rather than implying a crash. + const timedOut = Boolean(err && (err.killed || err.code === 'ETIMEDOUT' || /ETIMEDOUT/.test(detail))); + const status = timedOut ? 'timeout' : 'error'; return { ...base, status, error: detail }; } }