v3.25.8 review: the FCI extras coverage for templates
The custom-FCI check's `fciExtra: 'fail'` coverage counted only the exact keys, so a listed template (A5) did not accept its decoded children (A5/80) and a listed child did not accept its parent - both were reported as unexpected. An object is now covered by its own key, by a listed parent or by a listed child (an unlisted sibling still fails); the seeded flow lists every object and was unaffected. Tests: the coverage cases (a listed A5 accepts A5/80 + A5/81, a listed A5/80 accepts A5 but not the A5/81 sibling) - the fixture's A5 length corrected in the process. Help EN/RU + both AGENTS. 893 frontend + 880 Python; sw cache simple-v433.
This commit is contained in:
+7
-1
@@ -20614,7 +20614,13 @@ async function profilerRunRule(r, source) {
|
||||
}
|
||||
const listed = {};
|
||||
r.fciDos.forEach(d => { listed[d.key] = true; });
|
||||
const extra = r.fciExtra === 'fail' ? dec.items.filter(it => !listed[it.key]) : [];
|
||||
// An object is covered by its own key, by a listed parent (a listed
|
||||
// template accepts its children) or by a listed child (the parent of
|
||||
// a listed child is implied); an unlisted sibling still fails.
|
||||
const covered = k => listed[k] ||
|
||||
(k.indexOf('/') > 0 && listed[k.split('/')[0]]) ||
|
||||
Object.keys(listed).some(l => l.startsWith(k + '/'));
|
||||
const extra = r.fciExtra === 'fail' ? dec.items.filter(it => !covered(it.key)) : [];
|
||||
const ok = dos.every(d => d.ok) && !extra.length && !dec.error;
|
||||
if (!ok) res.status = 'fail';
|
||||
res.checks.push({ label: 'fci', mode: 'custom', dos: dos, extra: extra,
|
||||
|
||||
Reference in New Issue
Block a user