feat(research): run trusted SMA strategies through native workers

This commit is contained in:
Boki 2026-10-23 14:07:53 -04:00
parent 4f6e44a853
commit ca5abdde0e
16 changed files with 1682 additions and 28 deletions

View file

@ -74,3 +74,9 @@ Keep finite plain JSON indicator state; validate reconstruction without exposing
Add strict `runStrategyReplay` version1 requests with existing dataset/config/eventBudget/resultFormat and trusted selections only. Return a versioned `strategyReplayResult` envelope containing normalized selections actually executed and the unchanged native result. The parent captures detached normalized inputs before fork and binds selections, native identity, policy and format on return. No callbacks, source, arbitrary paths, checkpoint transport or second worker infrastructure. Existing legacy/conformance requests remain supported.
Required additions: warmup/tie/delayed-bar/freshness cases; exact budget and native fee/gap rejection; separate owners; whole retry and JSON reconstruction; real worker/direct equality in all formats; malformed/tampered responses, crashes and cancellation (including result-before-close); legacy worker regressions. Full repository and disposable recovery gates follow integration. Measure representative release SMA replay without calling it pure callback cost or claiming a performance improvement.
## Validated handoff — 2026-10-23
The new schema and `createBuiltinStrategy`/`validateBuiltinStrategyBindings` implement the pinned contract; the legacy registry and built-ins are unchanged. `runStrategyReplay` requests carry only trusted selections. `parseStrategyReplayResult` validates the versioned envelope and all native result formats. New tests and existing gates pass; exact source hashes, commands and measurements are in the manifest's fifteenth-wave validation and roadmap handoff. Implementation remains uncommitted pending acceptance.
Worker provenance identifies the reviewed built-in/version/configuration. R01/R05 still own immutable code-artifact retention, durable/public results and default activation. Whole-attempt retry remains the recovery model. [P08](P08.md) records the measured state/decision overhead; optimization and financial-policy changes are outside S02.