fix: shadow reader dedupes by run folder, so two runs started in the same second both count (wave browse CI free-suite 16)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-11-02 10:08:55 +00:00
1 parent fd6f5079a9
commit 29d413c825
2 files changed
+13 -2

No files matched your search

+10
View File
@@ -391,6 +391,16 @@ describe('the switch through the driver, and the spend cap', async () => {
});
describe('the reader over many runs', () => {
test('two runs that share a run id are both counted; the same folder listed twice is counted once', () => {
const copy = path.join(TMP, 'fail-copy', 'run');
fs.cpSync(path.join(TMP, 'fail', 'run'), copy, { recursive: true });
expect(readRun(copy).run).toBe(readRun(path.join(TMP, 'fail', 'run')).run);
const list = path.join(TMP, 'runs-same-id.txt');
fs.writeFileSync(list, [path.join(TMP, 'fail', 'run'), copy, copy].join('\n') + '\n');
const r = exported(['--runs', list], baseEnv({ GSTACK_CAPY: '' }));
expect(r.status).toBe(0);
expect(JSON.parse(r.stdout).counts.status).toEqual({ failed: 14 });
});
test('missing, failed, malformed, retrospective and recorded rows; dedupe across a repeated entry; CEO_ONLY_NO_GATE', () => {
const e = baseEnv({ GSTACK_CAPY: '' });
const { out: missing } = start('reader-missing', e);