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:
@@ -1367,6 +1367,16 @@ test('the custom FCI check matches per data object', async () => {
|
||||
record_len: 6, num_of_rec: 2, fci_hex: FCI_A5, exists: true }) };
|
||||
r = await profilerRunRule({ ...rule([{ key: 'A5/80', mode: 'value', value: '01' }]), fciHex: FCI_A5 }, a5src);
|
||||
assert.strictEqual(r.status, 'pass', JSON.stringify(r.checks));
|
||||
// fciExtra covers a listed template's children and a listed child's parent
|
||||
// (an unlisted sibling still fails)
|
||||
const FCI_A5T = '621682054221000F0583026F4F8A0105A506800101810102';
|
||||
const a5tsrc = { ...src, select: async () => ({ name: 'EF.SAMPLE', file_type: 'linear_fixed',
|
||||
record_len: 6, num_of_rec: 2, fci_hex: FCI_A5T, exists: true }) };
|
||||
r = await profilerRunRule({ ...rule([{ key: 'A5', mode: 'present' }]), fciHex: FCI_A5T, fciExtra: 'fail' }, a5tsrc);
|
||||
assert.strictEqual(r.status, 'fail'); // 82/83/8A are still extras
|
||||
assert.deepStrictEqual(r.checks.find(c => c.label === 'fci').extra.map(it => it.key), ['82', '83', '8A']);
|
||||
r = await profilerRunRule({ ...rule([{ key: 'A5/80', mode: 'present' }]), fciHex: FCI_A5T, fciExtra: 'fail' }, a5tsrc);
|
||||
assert.deepStrictEqual(r.checks.find(c => c.label === 'fci').extra.map(it => it.key), ['82', '83', '8A', 'A5/81']);
|
||||
// an unparseable FCI fails with the parse error
|
||||
const bad = { ...src, select: async () => ({ name: 'EF.SAMPLE', file_type: 'linear_fixed',
|
||||
record_len: 6, num_of_rec: 2, fci_hex: '62', exists: true }) };
|
||||
|
||||
Reference in New Issue
Block a user