T-88: M1.1m — Security-master run composer: readers output + bar spans → Stage A → Stage B → Pass 6 → Pass 4 → match report + persist input (pure, in-memory, no new dependencies)

This commit is contained in:
Studio 2026-11-28 05:38:20 -05:00
parent 33b1d23f84
commit 3bdf7a8da6
9 changed files with 2722 additions and 6 deletions

View file

@ -1055,4 +1055,31 @@ describe('generateOverrideSeedSql & generateOverrideTemplateSql', () => {
}
expect(emptyTemplate).toContain('No source-attributed open conflicts');
});
test('renderMatchReportMarkdown emits Status: skipped when priceCrossCheck is null and omits it when supplied', () => {
const reportWithoutPass4 = buildMatchReport({
stageA: makeEmptyStageA(),
stageB: makeEmptyStageB(),
});
expect(reportWithoutPass4.priceCrossCheck).toBeNull();
const mdSkipped = renderMatchReportMarkdown(reportWithoutPass4);
expect(mdSkipped).toContain(
'## Pass 4 Price Cross-Check Verdicts\n\n- Status: skipped (no sample closes supplied)\n- Pairs In: 0'
);
const pass4 = crossCheckPrices({
pairs: [],
closes: [],
usdCadByDate: [],
});
const reportWithPass4 = buildMatchReport({
stageA: makeEmptyStageA(),
stageB: makeEmptyStageB(),
priceCrossCheck: pass4,
});
expect(reportWithPass4.priceCrossCheck).not.toBeNull();
const mdExecuted = renderMatchReportMarkdown(reportWithPass4);
expect(mdExecuted).not.toContain('Status: skipped');
expect(mdExecuted).toContain('## Pass 4 Price Cross-Check Verdicts\n\n- Pairs In: 0');
});
});