mirror of https://github.com/garrytan/gstack.git
test(evals): retro E2E passes require the report on disk
Both retro tests passed with zero work product: error_max_turns counted as success and the content assertion was guarded by fs.existsSync — a run that burned 30 turns and wrote nothing recorded green (red team). The report is now load-bearing for pass/fail.
This commit is contained in:
parent
6ef93fd69f
commit
3dc2cde346
|
|
@ -80,17 +80,18 @@ Write your retrospective to ${dir}/retro-output.md`,
|
||||||
});
|
});
|
||||||
|
|
||||||
logCost('/retro base-branch', result);
|
logCost('/retro base-branch', result);
|
||||||
|
// The report is the work product: a run that exits max-turns without
|
||||||
|
// writing it is a FAIL, not a pass — otherwise this test cannot detect
|
||||||
|
// the most basic regression (the skill stops producing its report).
|
||||||
|
const retroPath = path.join(dir, 'retro-output.md');
|
||||||
|
const wroteReport = fs.existsSync(retroPath);
|
||||||
recordE2E(evalCollector, '/retro default branch detection', 'Base branch detection', result, {
|
recordE2E(evalCollector, '/retro default branch detection', 'Base branch detection', result, {
|
||||||
passed: ['success', 'error_max_turns'].includes(result.exitReason),
|
passed: ['success', 'error_max_turns'].includes(result.exitReason) && wroteReport,
|
||||||
});
|
});
|
||||||
expect(['success', 'error_max_turns']).toContain(result.exitReason);
|
expect(['success', 'error_max_turns']).toContain(result.exitReason);
|
||||||
|
expect(wroteReport).toBe(true);
|
||||||
// Verify retro output was produced
|
const content = fs.readFileSync(retroPath, 'utf-8');
|
||||||
const retroPath = path.join(dir, 'retro-output.md');
|
expect(content.length).toBeGreaterThan(100);
|
||||||
if (fs.existsSync(retroPath)) {
|
|
||||||
const content = fs.readFileSync(retroPath, 'utf-8');
|
|
||||||
expect(content.length).toBeGreaterThan(100);
|
|
||||||
}
|
|
||||||
}, 480_000);
|
}, 480_000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -165,18 +166,18 @@ Analyze the git history and produce the narrative report as described in the SKI
|
||||||
});
|
});
|
||||||
|
|
||||||
logCost('/retro', result);
|
logCost('/retro', result);
|
||||||
recordE2E(evalCollector, '/retro', 'Retro E2E', result, {
|
// Accept error_max_turns (retro does many git commands to analyze
|
||||||
passed: ['success', 'error_max_turns'].includes(result.exitReason),
|
// history) — but only WITH the report on disk. The report is the work
|
||||||
});
|
// product; max-turns with nothing written is a fail.
|
||||||
// Accept error_max_turns — retro does many git commands to analyze history
|
|
||||||
expect(['success', 'error_max_turns']).toContain(result.exitReason);
|
|
||||||
|
|
||||||
// Verify the retro was written
|
|
||||||
const retroPath = path.join(retroDir, 'retro-output.md');
|
const retroPath = path.join(retroDir, 'retro-output.md');
|
||||||
if (fs.existsSync(retroPath)) {
|
const wroteReport = fs.existsSync(retroPath);
|
||||||
const retro = fs.readFileSync(retroPath, 'utf-8');
|
recordE2E(evalCollector, '/retro', 'Retro E2E', result, {
|
||||||
expect(retro.length).toBeGreaterThan(100);
|
passed: ['success', 'error_max_turns'].includes(result.exitReason) && wroteReport,
|
||||||
}
|
});
|
||||||
|
expect(['success', 'error_max_turns']).toContain(result.exitReason);
|
||||||
|
expect(wroteReport).toBe(true);
|
||||||
|
const retro = fs.readFileSync(retroPath, 'utf-8');
|
||||||
|
expect(retro.length).toBeGreaterThan(100);
|
||||||
}, 420_000);
|
}, 420_000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue