feat(research): cut over canonical runtime and enforce agent budgets

This commit is contained in:
Boki 2026-10-24 16:47:19 -04:00
parent ab08db82fd
commit bbf0dd4453
103 changed files with 6138 additions and 3112 deletions

View file

@ -19,6 +19,7 @@ import {
experimentReceipt,
} from './experiment-input';
import { ExperimentsService } from './experiments.service';
import { lockResearchAgent } from './research-agent-budget';
import { validationEqual } from './validation-evidence';
import {
parseWalkForwardFinalization,
@ -93,6 +94,7 @@ export class WalkForwardService {
{ previewHash, ...input } = submission;
const hash = experimentHash({ version: 1, operation: 'submit-walk-forward', submission });
return this.database.transaction(async client => {
await lockResearchAgent(client, identity.principal);
const replay = async () => {
const row = (
await client.query(
@ -212,6 +214,7 @@ export class WalkForwardService {
input,
});
return this.database.transaction(async client => {
await lockResearchAgent(client, identity.principal);
const replay = async () => {
const row = (
await client.query(