From 569f308cecda423a4383c26819878cd230cef879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Wed, 9 Sep 2026 23:35:21 +0300 Subject: [PATCH] profiler: skip fileSize for linear-fixed/cyclic files - Do not store fileSize on record-file rules during 'Profile from card' - Do not check/report fileSize mismatch for record-file rules; only recordLen and numRecords are reported for LF/CY files SW cache v46. --- frontend/index.html | 6 ++++-- frontend/sw.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 2946c32..57288d2 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -6903,11 +6903,12 @@ async function profilerBuildFileRule(path, c, ignoreFids) { sel = await pysimFetch('/api/select', { path: path }); } catch (e) { return null; } if (!sel || sel.exists !== true) return null; + const isRecord = profilerContentKindForFileType(sel.file_type) === 'record'; const rule = { type: 'file', path: path, fileType: sel.file_type || null, - fileSize: (sel.file_size === null || sel.file_size === undefined) ? null : sel.file_size, + fileSize: isRecord ? null : ((sel.file_size === null || sel.file_size === undefined) ? null : sel.file_size), recordLen: (sel.record_len === null || sel.record_len === undefined) ? null : sel.record_len, numRecords: (sel.num_of_rec === null || sel.num_of_rec === undefined) ? null : sel.num_of_rec, content: null, @@ -7184,7 +7185,8 @@ async function profilerRunRule(r) { if (!ok) res.status = 'fail'; res.checks.push({ label: 'fileType', expected: r.fileType, actual: sel.file_type, ok: ok }); } - if (r.fileSize !== null && r.fileSize !== undefined) { + const isRecord = profilerContentKindForFileType(r.fileType) === 'record'; + if (!isRecord && r.fileSize !== null && r.fileSize !== undefined) { const ok = sel.file_size === r.fileSize; if (!ok) { res.status = 'fail'; sizeMismatch = true; } res.checks.push({ label: 'fileSize', expected: r.fileSize, actual: sel.file_size, ok: ok }); diff --git a/frontend/sw.js b/frontend/sw.js index 89814fa..1cbafc7 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'otaman-v45'; +const CACHE = 'otaman-v46'; const URLS = [ 'index.html', 'help.html',