feat(research): run durable chronological validation and retain reports

This commit is contained in:
Boki 2026-10-24 12:03:41 -04:00
parent 67ab30cb7a
commit abd1c5b83d
42 changed files with 5345 additions and 74 deletions

View file

@ -69,7 +69,7 @@ async function fixture(poolMax = 4, withRetries = true) {
'19-canonical-research.sql',
'21-run-reproduction.sql',
'22-experiments.sql',
...(withRetries ? ['23-experiment-retries.sql'] : []),
...(withRetries ? ['23-experiment-retries.sql', '24-chronological-validation.sql'] : []),
]) {
await pool.query(
readFileSync(new URL(`../../database/postgres/init/${name}`, import.meta.url), 'utf8')
@ -745,6 +745,13 @@ describe.skipIf(!url)('guarded failed experiment trial retry', () => {
expect(
(await f.pool.query('SELECT to_jsonb(d) AS value FROM backtest_dispatch d')).rows
).toEqual(outbox);
// Current services require the later validation columns; verify SQL23 evidence first.
await f.pool.query(
readFileSync(
new URL('../../database/postgres/init/24-chronological-validation.sql', import.meta.url),
'utf8'
)
);
expect(await f.experiments.listTrialRetries(experimentId, runId)).toEqual([]);
const accepted = await f.experiments.retryTrial(experimentId, runId, observed(), receipt());
const after = await row(f, runId);