feat: install LOAD failures get the compatibility-test analysis (v3.6.53)

ramShowInstallResult appends ramCompatDetailHtml(data, capMem) to the
install modal (the modal content is HTML now - the step lines are escaped
and ramOpModalFinish takes the asHtml mode), so a failed LOAD / INSTALL
[for load] shows the same block analysis as the compatibility test:

- the failing block's CAP section (load-file byte range and components, and
  what completes there), with the JC VM spec 4.5.2 note - or 'the import
  list already passed' when the failure is later in the file;
- the remote status word with its name;
- the import list at the CAP's own versions (a real install runs no probe);
  the closing hint points at the compatibility test ('Set all 0.0' first,
  then bisect), while a probe run keeps the lower-the-versions wording.

ramInstallFailHint stays as the short inline hint; INSTALL [for install] and
/api/ram-install-app failures show no block (the LOAD guard in the helper).

sw cache simple-v326; tests: 550 Python / 704 Node.
This commit is contained in:
2026-09-30 09:27:42 +03:00
parent ee747003f2
commit 4906c91463
5 changed files with 37 additions and 7 deletions
+16
View File
@@ -1113,6 +1113,13 @@ test('ramCompatFailureHtml names the failing CAP section and the import list', (
assert.ok(out3.includes('The import list already passed \u2014 the Import component completed at LOAD (1/2).'), out3);
assert.ok(out3.includes('remote SW 6581'), out3);
assert.ok(!out3.includes('4.5.2'), out3);
// a real install run (no probe): the hint points at the compatibility test
const install = { success: false, failed_step: 3, boundary_block: 1, total_blocks: 2,
load_block_size: 240, error: 'LOAD (1/2): remote SW 6985', steps: data.steps };
const out4 = ramCompatFailureHtml(install, mem);
assert.ok(out4.includes('the CAP compatibility test can confirm it'), out4);
assert.ok(!out4.includes('lower the versions (Set all 0.0)'), out4);
assert.ok(out4.includes('Import list under test (4):'), out4);
delete globalThis.t;
// not a LOAD failure at all: no block analysis
assert.strictEqual(ramCompatFailureHtml(Object.assign({}, data, {
@@ -1142,6 +1149,15 @@ test('the compatibility test runs in the modal like the install', () => {
assert.ok(!src.includes('ramShowProgress'), 'the inline progress bar is replaced by the modal');
});
test('a failed install carries the LOAD failure analysis into the modal', () => {
const src = extractFunc(html, 'ramShowInstallResult');
assert.ok(src.includes('ramCompatDetailHtml(data, capMem'), 'the analysis must reach the modal');
assert.ok(/ramOpModalFinish\(resultEl\.textContent, !!data\.success, modal, true\)/.test(src),
'the modal content is HTML now');
assert.ok(src.includes('ramInstallFailHint'), 'the short inline hint stays');
assert.ok(src.includes('ramNvLine'), 'the NV footprint line stays');
});
test('ramExecute dispatches the compatibility test op', () => {
const src = extractFunc(html, 'ramExecute');
assert.ok(/op === 'compat'/.test(src), 'the compat op must be dispatched');