profiler: dedupe redundant record-count failure in check report

A record file with both a numRecords metadata check and record content
checks reported the same count mismatch twice (numRecords and
content.records). profilerRunRule now omits the content.records line when
the numRecords check already covers it, keeping it only when no numRecords
check ran (FCP/FCI 'type' mode or numRecords cleared) or when numRecords
passes but the read returns a different count.

3 new tests. SW cache v58 -> v59.
This commit is contained in:
2026-09-10 23:08:17 +03:00
parent 16c183f79c
commit ad543fd731
3 changed files with 45 additions and 2 deletions
+4 -1
View File
@@ -7642,7 +7642,10 @@ async function profilerRunRule(r) {
const n = Math.min(exp.length, act.length);
if (exp.length !== act.length) {
res.status = 'fail';
res.checks.push({ label: 'content.records', expected: exp.length + ' records', actual: act.length + ' records', ok: false });
const numRec = res.checks.find(c => c.label === 'numRecords');
if (!numRec || numRec.ok) {
res.checks.push({ label: 'content.records', expected: exp.length + ' records', actual: act.length + ' records', ok: false });
}
}
const matched = [];
for (let j = 0; j < n; j++) {