feat(research): prepare stored EOD datasets before canonical admission
This commit is contained in:
parent
366bee810b
commit
0c6aec4dc6
16 changed files with 1897 additions and 61 deletions
|
|
@ -12,7 +12,7 @@ Scheduling source of truth: [manifest entry R05](../manifest.json). No task is a
|
|||
|
||||
## Intended behavior and implementation scope
|
||||
|
||||
Freeze strategy/model artifact IDs, parameters, seed, code/lockfile/build hashes and execution policies at submission. For a selected frozen dataset, pin its hash immediately; for a source request, retain the immutable query and atomically attach the first prepared dataset/hash before replay begins. Expose preparing versus reproducibility-finalized state. Wire the canonical Rust session with existing registered TS strategies into the durable runner and versioned result DTO. Exact reproduction API/UI is R12.
|
||||
Freeze strategy/model artifact IDs, parameters, seed, code/lockfile/build hashes and execution policies at submission. For canonical research, prepare and retain source data before submission, then atomically pin its exact verified hash with the immutable run request. A preparation query is not a run or frozen dataset. Expose read-only preparation, retained data and admitted run as separate actions. This explicitly supersedes the original proposal for preparation inside an admitted run; see the 2026-10-24 disposition below. Wire the canonical Rust session with existing registered TS strategies into the durable runner and versioned result DTO. Exact reproduction API/UI is R12.
|
||||
|
||||
Consume F08's additive canonical analytics/report contract here. Version the persisted/public projection so canonical fractions, genuine zero exposure and null reasons bypass legacy percentage conversion/placeholder suppression. Preserve owner books and distinguish fills from round trips. Additional position valuations needed by the UI must come from Rust or be explicitly unavailable; do not invent marks, average-price basis or unrealized P&L in TypeScript merely to satisfy the old DTO. Keep historical readers unchanged and prove reopen/render compatibility during this cutover.
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ Parallel eligibility: only with disjoint actual files and reserved write locks;
|
|||
## Acceptance criteria
|
||||
|
||||
- Changing template, strategy source or provider history after dataset freezing cannot alter an admitted run. A source query alone is not labelled a frozen dataset.
|
||||
- No strategy decision executes before artifact verification and atomic dataset binding; failed preparation remains diagnosed and retry-safe.
|
||||
- No canonical run is admitted before source data is retained and verified; artifact verification and atomic dataset binding precede decisions. Failed preparation creates no run. Retention retries reuse captured input/hash, while an explicitly requested fresh source preview may observe changed provider history.
|
||||
- A retained-version/current-build mismatch rejects before execution; successful provenance identifies the executable that actually ran. Changing the current built-in implementation cannot silently change a retained version's behavior.
|
||||
- New results declare financialEngine=rust and strategyExecution separately; correctness-gate evidence requires approved engine/data gates, not a UI flag.
|
||||
- Before making canonical multi-asset research the default, obtain explicit owner disposition of sequential equal-time mark risk: either accept the disclosed versioned approximation or approve a coordinated atomic-mark policy/implementation with independent fixtures. F04/F05 currently evaluate each ordered mark; F06 demonstrates offsetting simultaneous moves can latch intermediate loss/drawdown halts. A passing deterministic replay suite alone does not resolve this material modeling issue. Single-asset component work and additive native integration need not wait for this decision.
|
||||
|
|
@ -66,9 +66,9 @@ Keep migrations additive and previous results readable. Do not add a switch that
|
|||
|
||||
## Web/API contract and user states
|
||||
|
||||
- API: Run/results expose immutable request plus resolved dataset binding, provenance and preparation state. No exact-reproduce endpoint until R12.
|
||||
- API: Preparation returns captured source input plus its normalized descriptor without creating a run. Retention verifies that input/hash; run/results expose the immutable request, retained dataset binding and provenance. Existing R12 owns exact reproduction.
|
||||
- Backend/data dependencies: Existing request_snapshot/dataset_hash/results extended with retained provenance and engine correctness-gate evidence metadata.
|
||||
- Loading/error/empty behavior: API distinguishes preparing, dataset-pinned, running, failed and completed. W02/R11 render these fields without fabricated provenance.
|
||||
- Loading/error/empty behavior: The preparation panel distinguishes reading, previewing, unavailable evidence, retaining and uncertain retention; exact captured retries preserve identity. Admitted runs keep the existing durable queued/running/terminal lifecycle. Preparation is not a run status. W02/R11 render retained evidence without fabricated provenance.
|
||||
- User-facing completion is demonstrated by the acceptance criteria and interaction tests above; a backend-only implementation is insufficient where a UI is in scope.
|
||||
|
||||
## Handoff
|
||||
|
|
@ -121,3 +121,21 @@ The above slice is independently reviewed and `partial_validated_uncommitted` on
|
|||
Final gates: repository check 1077 integration /150 Rust plus93 tooling/43 utility/44 calculation tests; PostgreSQL240/2157; Chromium16/590; strict affected-test types, all16-file lint/format/hash/DAG/diff checks. Independent agent overlays and root browser/transport changes are accepted. Four prior manual Rust cases remain ignored. Logs/hashes/limits are in `manifest.json` → `thirty_fifth_wave_validation` and the [roadmap handoff](../../ROADMAP.md#thirty-fifth-wave-handoff--2026-10-24). Both disposable containers were removed.
|
||||
|
||||
Full R05 stays `in_progress`: automatic provider-query preparation/first binding and default cutover are not delivered. No performance work or candidate/multiasset/paper/live/AI activation occurred. Changes await the next authorized commit.
|
||||
|
||||
## Accepted export and stored-source continuation — 2026-10-24
|
||||
|
||||
Wave35 export preparation is accepted and committed as `366bee8`. Continue with operator metadata plus existing stored EOD intraday bars; one asset/series, raw1m/5m/1h, interval-start and explicit interval-end assumption only. Read through the actual request-local StorageService adapter without initialize/runtime mutation or provider fallback. Return complete captured input plus existing descriptor; the existing Retain action uses those exact bytes/hash. Source edits after preview affect only a new preview.
|
||||
|
||||
**Deliberate simplification:** source preparation is completed before canonical admission. This replaces (does not claim to implement) the earlier pending-query run kind, preparing run phase and first-binding lifecycle. Existing admission already atomically freezes the full immutable request and verified retained hash; the worker checks them under its lease before executing. No second lifecycle is needed to satisfy reproducibility. Asynchronous preparation jobs require a demonstrated product need before reconsideration.
|
||||
|
||||
Acceptance adds metadata/scope validation before IO; exact EOD routing, source identity and range; deterministic adapter ordinal (not provider sequence); no invented availability or VWAP; abort before/after reads; valid unavailable evidence preserved; source changes after materialization cannot alter retention/retry or native execution; fresh reads can change identity. Provider connection, missing range, invalid metadata and malformed stored data have distinct failure paths. Actual browser coverage retains the export path, loads EOD via existing adapter, edits underlying rows, and proves stored identity/economics survive save/run/reopen without requery.
|
||||
|
||||
Full cutover/default activation remains incomplete, and S06 stays blocked. Daily/QuestDB preparation, v1 conversion, generalized query history, new SQL/runner states and performance work are excluded from this slice. Do not add optional adapters solely to avoid the remaining real owner policy decisions.
|
||||
|
||||
## Validated stored-source handoff — 2026-10-24
|
||||
|
||||
The stored EOD component is independently reviewed and `partial_validated_uncommitted` on `366bee8`. One raw1m/5m/1h EOD source with complete explicit metadata can be materialized through the existing adapter, inspected and retained before unchanged canonical admission. Existing export mode remains. Source mutations after preview change only a fresh preview; retention/retry and actual Rust execution preserve captured bytes and expected economics. Unsupported or unknown evidence cannot become an executable selection.
|
||||
|
||||
Final gates: fullcheck1126 integration/150 Rust (+93 tooling/43 utility/44 calculation); PostgreSQL242/2196; Chromium16/612; strict affected/new-test types and all11-file lint/format/hash/DAG/diff checks. Four preexisting Rust cases remain ignored. Both disposable containers removed. Exact evidence: `manifest.json` → `thirty_sixth_wave_validation`, [roadmap handoff](../../ROADMAP.md#thirty-sixth-wave-handoff--2026-10-24).
|
||||
|
||||
The before-admission disposition above replaces deferred preparation rather than claiming to implement it. Full R05 stays `in_progress` for wider cutover/default policy; S06 remains blocked. Daily/QuestDB/v1 adapters are optional, not mandatory work to postpone owner decisions. No performance or AI/paper/live activation. New changes await the next authorized commit.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue