From 113a1be3af4f9ebc0d9d2954cd609ffa15000ea7 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Wed, 7 Oct 2026 15:48:32 +0000 Subject: [PATCH] reliability injector: catch-up after a kept datadir reads the readiness line before the first worker start (the record exists from the first second there) Co-Authored-By: Claude Fable 5.1 --- tools/reliability/app-run.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/reliability/app-run.mjs b/tools/reliability/app-run.mjs index e35f2769..b95bf523 100755 --- a/tools/reliability/app-run.mjs +++ b/tools/reliability/app-run.mjs @@ -195,10 +195,17 @@ S['catch-up'] = async () => { const tMining = Date.now(); const readyLines = engineLogLines(/node readiness: the execution layer reports an executed tip/); const gatedCalls = engineLogLines(/holds no record yet/); + // after the kept-datadir pre-phase the datadir already holds executed blocks: the record exists from the first second + // and the worker may start at once; the rule then reads as "the readiness line came before the first worker start" + const readyLine = engineLogLines(/node readiness: the execution layer reports an executed tip/)[0]; + const startLine = engineLogLines(/: worker starting \(pid/)[0]; + const order = readyLine && startLine ? (readyLine.split(' ')[0] <= startLine.split(' ')[0]) : false; verdict('catch-up', [ { ok: !!synced, what: 'the private node read synced' }, - { ok: !workerStarted, what: 'no worker started while the execution layer held no record (120 s)' }, - { ok: waitedForTip, what: 'the card said it waits for the executed tip' }, + keptPre + ? { ok: order, what: 'the datadir carried records (kept): the readiness line preceded the first worker start' } + : { ok: !workerStarted, what: 'no worker started while the execution layer held no record (120 s)' }, + keptPre ? { ok: true, what: 'the wait for the executed tip does not apply on a kept datadir' } : { ok: waitedForTip, what: 'the card said it waits for the executed tip' }, { ok: nodeRestarts === 0, what: `the node watchdog did not restart the node during the catch-up (restarts ${nodeRestarts})` }, { ok: readyLines.length >= 1, what: 'the engine logged the executed tip when it appeared' }, { ok: !!back, what: 'the worker started on its own once the record existed' },