mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-03 18:06:54 +02:00
fix(qa): checkpoint receipts print the report link for their exploration file
qa-functional-webhook-report failed in two of three censuses because the report linked .qa-evidence/NNN capture folders as "checkpoints" and never linked exploration-NNN.json. The checkpoint receipt now prints link: [checkpoint NNN](exploration-NNN.json), and the functional report template says capture folders are not checkpoints.
This commit is contained in:
1 parent
958d1ceba6
commit
8dd3c44fc6
3 files changed
+4
-2
No files matched your search
+2
-1
@@ -193,7 +193,8 @@ function checkpoint(root: string, checkpointId: string, source: string | Record<
|
||||
const captured = readQaCapture(root, intent.capture);
|
||||
const value = { observationCommand: intent.observationCommand, observed: captured.observed, hypothesis: intent.hypothesis, nextCommand: intent.nextCommand };
|
||||
const sha256 = publish(root, `exploration-${checkpointId}.json`, value);
|
||||
return { action: 'checkpoint', id: checkpointId, status: 'complete', sha256, capture: intent.capture, captureSha256: captured.sha256, intentSha256: hash(bytes), exitCode: 0 };
|
||||
return { action: 'checkpoint', id: checkpointId, status: 'complete', sha256, capture: intent.capture, captureSha256: captured.sha256, intentSha256: hash(bytes),
|
||||
link: `[checkpoint ${checkpointId}](exploration-${checkpointId}.json)`, exitCode: 0 };
|
||||
}
|
||||
|
||||
function materialize(root: string, source: string) {
|
||||
|
||||
@@ -33,6 +33,7 @@ evidence and regression baselines. Do not combine their scores or outcomes.
|
||||
## Discoveries and permanent tests
|
||||
|
||||
Link each `exploration-NNN.json` checkpoint, saved before its next probe, in this report.
|
||||
Each checkpoint receipt prints its `link`; `.qa-evidence/NNN` capture folders are not checkpoints.
|
||||
Use one Markdown entry per checkpoint, for example:
|
||||
|
||||
- [checkpoint 001](exploration-001.json) — how this observation shaped the next probe.
|
||||
|
||||
@@ -43,7 +43,7 @@ test('native capture executes once, preserves exact JSON and stderr, and materia
|
||||
f.json('intent.json', { capture: '001', observationCommand: 'first native command', hypothesis: 'The successful boundary suggests testing the rejected input next.', nextCommand: 'second native command' });
|
||||
const checkpoint = f.run('checkpoint', f.root, '001', 'intent.json');
|
||||
expect(checkpoint.status, checkpoint.stderr).toBe(0);
|
||||
expect(receipt(checkpoint.stdout)).toMatchObject({ action: 'checkpoint', status: 'complete', id: '001' });
|
||||
expect(receipt(checkpoint.stdout)).toMatchObject({ action: 'checkpoint', status: 'complete', id: '001', link: '[checkpoint 001](exploration-001.json)' });
|
||||
expect(JSON.parse(fs.readFileSync(path.join(f.root, 'exploration-001.json'), 'utf8'))).toEqual({
|
||||
observationCommand: 'first native command', observed, hypothesis: 'The successful boundary suggests testing the rejected input next.', nextCommand: 'second native command',
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user