MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / writeNumericFailures

Function writeNumericFailures

scripts/fungrim/report.ts:90–111  ·  view source on GitHub ↗
(stage2: Stage2Report)

Source from the content-addressed store, hash-verified

88}
89
90export function writeNumericFailures(stage2: Stage2Report): string {
91 const file = path.join(OUT_DIR, 'numeric-failures.json');
92 const payload = {
93 generated: new Date().toISOString(),
94 seed: stage2.seed,
95 slice: stage2.slice,
96 falseEntryCount: stage2.falseEntries.length,
97 entries: stage2.falseEntries
98 .map((e) => ({
99 id: e.id,
100 topic: e.topic,
101 class: e.class,
102 guardLevel: e.guardLevel,
103 instances: e.instances
104 .filter((i) => i.outcome === 'False')
105 .map((i) => ({ assignment: i.assignment, detail: i.detail })),
106 }))
107 .sort((a, b) => a.id.localeCompare(b.id)),
108 };
109 fs.writeFileSync(file, JSON.stringify(payload, null, 2) + '\n');
110 return file;
111}
112
113export function printStage1Summary(report: Stage1Report): void {
114 const pct = (x: number) => `${(100 * x).toFixed(2)}%`;

Callers 1

mainFunction · 0.90

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected