feat(research): cut over canonical runtime and enforce agent budgets
This commit is contained in:
parent
ab08db82fd
commit
bbf0dd4453
103 changed files with 6138 additions and 3112 deletions
|
|
@ -9,6 +9,7 @@ import {
|
|||
type ChronologicalValidationSummary,
|
||||
type ValidationResultEvidence,
|
||||
} from '@stock-bot/stock-config/chronological-validation';
|
||||
import { researchActorSchema } from '@stock-bot/stock-config/research';
|
||||
import { canonicalStrategyJson } from '@stock-bot/stock-config/strategy';
|
||||
import { API_BASE_URL, apiFetch } from '@/lib/api';
|
||||
import {
|
||||
|
|
@ -49,7 +50,7 @@ const candidate = z.object({
|
|||
trialKey: hash,
|
||||
parameters: z.record(z.union([z.string(), z.number().finite(), z.boolean()])),
|
||||
});
|
||||
const actor = z.enum(['operator', 'service']);
|
||||
const actor = researchActorSchema;
|
||||
const summary = z.object({
|
||||
id: uuid,
|
||||
name: z.string().min(1),
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import {
|
|||
type ExperimentSummary,
|
||||
type ExperimentTrialRetry,
|
||||
} from '@stock-bot/stock-config/experiments';
|
||||
import { researchActorSchema } from '@stock-bot/stock-config/research';
|
||||
import { canonicalStrategyJson } from '@stock-bot/stock-config/strategy';
|
||||
import { API_BASE_URL, apiFetch } from '@/lib/api';
|
||||
|
||||
|
|
@ -165,7 +166,7 @@ const retryReceipt = z.object({
|
|||
pausedAt: z.string().nullable(),
|
||||
failureUpdatedAt: z.string().min(1),
|
||||
recordedAt: z.string().min(1),
|
||||
principal: z.enum(['operator', 'service']),
|
||||
principal: researchActorSchema,
|
||||
reviewId: z.string().uuid(),
|
||||
});
|
||||
/** Immutable source identity captured when the operator reviews a failed trial. */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { z } from 'zod';
|
||||
import { researchActorSchema } from '@stock-bot/stock-config/research';
|
||||
import { canonicalStrategyJson } from '@stock-bot/stock-config/strategy';
|
||||
import {
|
||||
MAX_WALK_FORWARD_RUNS,
|
||||
|
|
@ -173,7 +174,7 @@ const report = z.object({
|
|||
previewHash: hash,
|
||||
reportHash: hash,
|
||||
createdAt: z.string().min(1),
|
||||
principal: z.enum(['operator', 'service']),
|
||||
principal: researchActorSchema,
|
||||
reset: z.literal('initial-capital-empty-positions'),
|
||||
segments: z
|
||||
.array(
|
||||
|
|
@ -395,7 +396,7 @@ export const walkForwardApi = {
|
|||
previewHash: hash,
|
||||
reportHash: hash,
|
||||
createdAt: z.string().min(1),
|
||||
principal: z.enum(['operator', 'service']),
|
||||
principal: researchActorSchema,
|
||||
})
|
||||
.parse(envelope(body, 'receipt'));
|
||||
const value = parseWalkForwardDetail(envelope(body, 'walkForward')),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue