From a388fe8cdd747bed09b3d813500d70530e537cef Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Sun, 4 Oct 2026 20:47:28 +0000 Subject: [PATCH] Console: OTA version captured as major.minor.patch in every update line (the installing line carried a colon) Co-Authored-By: Claude Fable 5.1 --- relay/lib/parse.mjs | 14 +++++++------- relay/test/parse.test.mjs | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/relay/lib/parse.mjs b/relay/lib/parse.mjs index f2f64938d..5cc2602dc 100644 --- a/relay/lib/parse.mjs +++ b/relay/lib/parse.mjs @@ -86,14 +86,14 @@ export function parseAppTail(tail) { // staged 0.3.4 ("update: ... downloaded and verified", "[ok] ... is ready; it installs at the next safe moment") and // its card said "0.3.3 is current" from a check 70 minutes older; a finished update's new run says only "is current". const SHAPES = [ - [/^(\d+)(?:\.\d+)? \[info\] Igneum Miner (\S+) is available: downloading/, 'downloading'], + [/^(\d+)(?:\.\d+)? \[info\] Igneum Miner (\d+\.\d+\.\d+)\S* is available: downloading/, 'downloading'], [/^(\d+)(?:\.\d+)? update: .*Igneum-Miner-(\d+\.\d+\.\d+)\S* downloaded and verified/, 'downloaded'], - [/^(\d+)(?:\.\d+)? \[ok\] Igneum Miner (\S+) is ready; it installs at the next safe moment/, 'staged'], - [/^(\d+)(?:\.\d+)? \[info\] installing Igneum Miner (\S+)/, 'installing'], - [/^(\d+)(?:\.\d+)? update to (\S+) complete/, 'updated'], - [/^(\d+)(?:\.\d+)? update: (\S+) is marked failed/, 'failed'], - [/^(\d+)(?:\.\d+)? update check: (\S+) is published but has no \S+ build yet/, 'no build'], - [/^(\d+)(?:\.\d+)? update check: (\S+) is current \(manifest \S+\)/, 'current'], + [/^(\d+)(?:\.\d+)? \[ok\] Igneum Miner (\d+\.\d+\.\d+)\S* is ready; it installs at the next safe moment/, 'staged'], + [/^(\d+)(?:\.\d+)? \[info\] installing Igneum Miner (\d+\.\d+\.\d+)/, 'installing'], + [/^(\d+)(?:\.\d+)? update to (\d+\.\d+\.\d+)\S* complete/, 'updated'], + [/^(\d+)(?:\.\d+)? update: (\d+\.\d+\.\d+)\S* is marked failed/, 'failed'], + [/^(\d+)(?:\.\d+)? update check: (\d+\.\d+\.\d+)\S* is published but has no \S+ build yet/, 'no build'], + [/^(\d+)(?:\.\d+)? update check: (\d+\.\d+\.\d+)\S* is current \(manifest \S+\)/, 'current'], ]; let best = a.ota ? { at: Number((/^(\d+)/.exec(ota[0]) || [])[1]) } : null; for (const [re, state] of SHAPES) { diff --git a/relay/test/parse.test.mjs b/relay/test/parse.test.mjs index 12a48adc4..8c852f5df 100644 --- a/relay/test/parse.test.mjs +++ b/relay/test/parse.test.mjs @@ -81,4 +81,6 @@ test('app tail: the newest update line decides the OTA state: staged beats an ol assert.equal(parseAppTail(mac + '\n1791146600 update: 0.3.4 is marked failed; it will not be applied again by itself').ota.state, 'failed'); assert.equal(parseAppTail(mac + '\n1791146600 update to 0.3.4 complete (from 0.3.3); keeping the previous version for a rollback').ota.state, 'updated'); assert.equal(parseAppTail(st(1)).ota, undefined); + const inst = parseAppTail(mac + '\n1791146700 [info] installing Igneum Miner 0.3.4: the miners stop, then the node, then the app opens again'); + assert.deepEqual([inst.ota.state, inst.ota.version], ['installing', '0.3.4']); });