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 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-04 20:47:28 +00:00
parent 1375c0a6b5
commit 67ef2fef96
2 changed files with 9 additions and 7 deletions

View file

@ -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) {

View file

@ -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']);
});