fix(drill): a wait from an earlier week starts over; say when a run by hand goes ahead
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in -1m57s
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in -1m57s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
@@ -187,7 +187,8 @@ async function window_(a) {
|
|||||||
const days = windowDays(a.today ? new Date(a.today) : new Date())
|
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 wipe = nextWipe(a.today ? new Date(a.today) : new Date()).toISOString().slice(0, 10)
|
||||||
const open = days >= 1 && days <= 7
|
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')
|
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'}`)
|
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')])
|
if (stat && stat.fields === 'error') sections.push(['tools/fieldlist', read('fields.diff')])
|
||||||
} else if (stat.oxideBehind !== 0) {
|
} 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
|
const days = (Date.now() - Date.parse(waiting.since)) / 86400000
|
||||||
if (days < WAIT_DAYS) {
|
if (days < WAIT_DAYS) {
|
||||||
outcome = `waiting for Oxide (${stat.oxideBehind} behind, day ${Math.floor(days) + 1} of ${WAIT_DAYS})`
|
outcome = `waiting for Oxide (${stat.oxideBehind} behind, day ${Math.floor(days) + 1} of ${WAIT_DAYS})`
|
||||||
|
|||||||
Reference in New Issue
Block a user