From d7ba93530213dab62a748565535e71f21b1c40e4 Mon Sep 17 00:00:00 2001 From: wtclaude Date: Wed, 7 Oct 2026 01:32:22 -0500 Subject: [PATCH] fix(drill): a wait from an earlier week starts over; say when a run by hand goes ahead Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY --- tools/drill/drill.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/drill/drill.js b/tools/drill/drill.js index 294250c..d7bf19e 100644 --- a/tools/drill/drill.js +++ b/tools/drill/drill.js @@ -187,7 +187,8 @@ async function window_(a) { const days = windowDays(a.today ? new Date(a.today) : new Date()) const wipe = nextWipe(a.today ? new Date(a.today) : new Date()).toISOString().slice(0, 10) const open = days >= 1 && days <= 7 - log(`the next forced wipe is ${wipe}, in ${days} day(s): ${open ? 'in the drill week' : 'outside the drill week, nothing to do'}`) + const verdict = open ? 'in the drill week' : a.force ? 'outside the drill week, but run by hand: going ahead' : 'outside the drill week, nothing to do' + log(`the next forced wipe is ${wipe}, in ${days} day(s): ${verdict}`) output('open', open || a.force ? 'true' : 'false') } @@ -475,7 +476,9 @@ async function report(a) { findings.push(`The static half could not run: ${(stat && stat.note) || 'no static.json'}`) if (stat && stat.fields === 'error') sections.push(['tools/fieldlist', read('fields.diff')]) } else if (stat.oxideBehind !== 0) { - const waiting = state.waiting && state.waiting.manifest === manifest ? state.waiting : { manifest, since: now() } + // A wait from an earlier drill week (or a run by hand outside one) starts over. + const current = state.waiting && state.waiting.manifest === manifest && Date.now() - Date.parse(state.waiting.since) < 7 * 86400000 + const waiting = current ? state.waiting : { manifest, since: now() } const days = (Date.now() - Date.parse(waiting.since)) / 86400000 if (days < WAIT_DAYS) { outcome = `waiting for Oxide (${stat.oxideBehind} behind, day ${Math.floor(days) + 1} of ${WAIT_DAYS})`