feat(research): isolate candidates and add reviewed paper promotion
This commit is contained in:
parent
26b97265c6
commit
25b5cbf481
128 changed files with 13038 additions and 1388 deletions
|
|
@ -550,6 +550,13 @@ export function BacktestDetailPageV2() {
|
|||
>
|
||||
Retry execution eligibility
|
||||
</button>
|
||||
{canonicalCapability?.execution && !isCapabilityLoading && (
|
||||
<span className="block break-all">
|
||||
Isolated candidate sandbox: {canonicalCapability.execution.imageId}. Limit{' '}
|
||||
{canonicalCapability.execution.profile.limits.wallMs / 1000}s per container; agent
|
||||
attempt deadlines may be shorter.
|
||||
</span>
|
||||
)}
|
||||
{backtest?.strategyVersionId && (
|
||||
<>
|
||||
{' '}
|
||||
|
|
|
|||
|
|
@ -68,9 +68,19 @@ export function CanonicalResults({
|
|||
>
|
||||
<h3 className="font-semibold">Canonical research result</h3>
|
||||
<p className="text-sm text-text-secondary">
|
||||
Rust financial simulation · retained TypeScript built-in. Completion does not establish
|
||||
strategy profitability or authorize trading.
|
||||
Rust financial simulation ·{' '}
|
||||
{request.strategy.origin === 'candidate'
|
||||
? 'isolated TypeScript candidate'
|
||||
: 'retained TypeScript built-in'}
|
||||
. Completion does not establish strategy profitability or authorize trading.
|
||||
</p>
|
||||
{request.strategy.origin === 'candidate' && (
|
||||
<p className="text-sm break-all">
|
||||
Sandbox {request.strategy.execution.imageId} · Author-declared warmup{' '}
|
||||
{request.strategy.package.execution?.warmupBars} bars. Candidate code is unverified;
|
||||
retained seeds and inputs support an actual reproduction comparison.
|
||||
</p>
|
||||
)}
|
||||
<dl className="grid gap-3 text-sm sm:grid-cols-2 break-all">
|
||||
<div>
|
||||
<dt>Run</dt>
|
||||
|
|
|
|||
|
|
@ -32,9 +32,10 @@ const policyFields: {
|
|||
{
|
||||
key: 'ownerBudget',
|
||||
label: 'Owner budget',
|
||||
group: 'Capital allocation',
|
||||
group: 'Strategy sizing',
|
||||
kind: 'decimal',
|
||||
description: 'USD allocated to this strategy; it cannot exceed initial capital.',
|
||||
description:
|
||||
'USD sizing input supplied to the strategy. Rust enforces the separate position, exposure and cash constraints. This input cannot exceed initial capital.',
|
||||
},
|
||||
{
|
||||
key: 'feeRate',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { z } from 'zod';
|
||||
import { candidateExecutionSchema } from '@stock-bot/stock-config/candidate-execution';
|
||||
import { canonicalRunRequestSchema } from '@stock-bot/stock-config/canonical-research';
|
||||
import type {
|
||||
CanonicalDatasetCatalogEntry,
|
||||
|
|
@ -562,7 +563,18 @@ export const backtestApiV2 = {
|
|||
if (!response.ok) {
|
||||
throw await requestError(response, 'Could not check canonical execution eligibility');
|
||||
}
|
||||
return response.json();
|
||||
const capability = z
|
||||
.object({
|
||||
available: z.boolean(),
|
||||
reason: z.string().nullable(),
|
||||
execution: candidateExecutionSchema.optional(),
|
||||
})
|
||||
.strict()
|
||||
.parse(await response.json());
|
||||
if (capability.execution && !capability.available) {
|
||||
throw new Error('Unavailable execution cannot advertise an admitted sandbox profile');
|
||||
}
|
||||
return capability;
|
||||
},
|
||||
async listCanonicalDatasets(signal?: AbortSignal): Promise<CanonicalDatasetCatalogEntry[]> {
|
||||
const response = await fetch(`${API_BASE_URL}/api/v2/datasets/canonical?limit=50&offset=0`, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue