feat(research): retain exact experiment and report citations in findings

This commit is contained in:
Boki 2026-10-24 14:42:14 -04:00
parent 46a4f13acd
commit 06039d17ba
36 changed files with 4170 additions and 253 deletions

View file

@ -561,7 +561,7 @@ export class ExperimentsService {
async readDetail(database: Query, id: string): Promise<WorkbenchExperimentDetail> {
const row = (
await database.query(
`SELECT ${summaryColumns},e.preview FROM research_experiments e WHERE e.id=$1`,
`SELECT ${summaryColumns},e.preview,(to_jsonb(e) ? 'validation_phase' AND to_jsonb(e)->'validation_phase' = 'null'::jsonb) AS standalone FROM research_experiments e WHERE e.id=$1`,
[id]
)
).rows[0];
@ -686,6 +686,12 @@ export class ExperimentsService {
counts[run.status as keyof ExperimentCounts]++;
}
}
return { ...summary(row), counts, preview, trials } as WorkbenchExperimentDetail;
return {
...summary(row),
standalone: row.standalone === true,
counts,
preview,
trials,
} as WorkbenchExperimentDetail;
}
}