docs(development): accept F08 and pin stateful strategy runtime scope
This commit is contained in:
parent
3838295eec
commit
0870b55830
5 changed files with 76 additions and 28 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Canonical development backlog
|
||||
|
||||
**First twelve waves committed; F08 validated and awaiting acceptance.** F09/P07 were accepted as `e3bd722`; `1e16445` records their completion and the F08 contract. F08 adds account-session equity, occupied-time exposure and explicit statistical policies on the same financial core. Consult manifest execution_scope and [current wave](../ROADMAP.md#thirteenth-wave-execution--2026-10-23). ADR-002/003/004 are approved; other policies/default cutovers remain gated.
|
||||
**First thirteen waves committed; S01 in progress.** F08 is accepted as `3838295`. S01 adds stateful TypeScript decisions over Rust sessions with per-owner cursors and staged state. Consult manifest execution_scope and [current wave](../ROADMAP.md#fourteenth-wave-execution--2026-10-23). ADR-002/003/004/005 are approved; other policies/default cutovers remain gated.
|
||||
|
||||
## One source of truth
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
|
|||
| [F05 Unify matching and order lifecycle on the ledger](tasks/F05.md) | P0 / done | F04, ADR-003 | F06 | Rust execution semantics / L |
|
||||
| [F06 Implement deterministic replay once, with linear historical traversal](tasks/F06.md) | P0 / done | F05, D01, P01, ADR-003 | — | Rust deterministic replay / M |
|
||||
| [F07 Expose bounded Rust step sessions through existing NAPI workers](tasks/F07.md) | P0 / done | F06, C02, ADR-004 | — | Rust/TypeScript integration / M |
|
||||
| [F08 Publish canonical metrics and versioned result projections](tasks/F08.md) | P1 / review | F06, F09, ADR-002, ADR-003 | — | Quant analytics/Rust integration / M |
|
||||
| [F08 Publish canonical metrics and versioned result projections](tasks/F08.md) | P1 / done | F06, F09, ADR-002, ADR-003 | — | Quant analytics/Rust integration / M |
|
||||
| [F09 Return compact canonical replay projections](tasks/F09.md) | P1 / done | F07, ADR-002, ADR-003, ADR-004 | — | Rust/TypeScript financial integration / M |
|
||||
|
||||
### E3 — Point-in-time datasets and features
|
||||
|
|
@ -52,7 +52,7 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
|
|||
|
||||
| Task | Priority / status | Implementation prerequisites | Release gate | Specialist / size |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| [S01 Run deterministic TypeScript decisions on Rust sessions](tasks/S01.md) | P0 / blocked | F07, ADR-004, ADR-005 | — | TypeScript trading infrastructure / M |
|
||||
| [S01 Run deterministic TypeScript decisions on Rust sessions](tasks/S01.md) | P0 / in_progress | F07, ADR-004, ADR-005 | — | TypeScript trading infrastructure / M |
|
||||
| [S02 Adapt one SMA strategy for the first canonical path](tasks/S02.md) | P1 / blocked | S01 | — | TypeScript strategy/quant engineering / M |
|
||||
| [S03 Adapt durable paper transactions to Rust financial reducers](tasks/S03.md) | P0 / blocked | S01, C06, ADR-005 | — | Durable execution/Rust integration / L |
|
||||
| [S04 Establish a verified paper feed and operator safety gate](tasks/S04.md) | P1 / blocked | S02, S03 | — | TypeScript trading infrastructure / M |
|
||||
|
|
@ -117,4 +117,4 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
|
|||
|
||||
Before any wave: unique IDs; existing task/ADR references; acyclic implementation graph; no scheduled task dependent on merged/deferred work; approvals/readiness; actual file locks; isolated native build outputs/workspace dependencies and test databases. Release gates are checked separately at activation.
|
||||
|
||||
The first twelve waves are committed. **F08 is independently reviewed and validated, with new implementation changes uncommitted.** Its reporting facts and statistics preserve authoritative Rust financial output; R05 retains persistence and public-result migration. Next, S01 needs ADR-005 approval; R01/R11 need ADR-006. The unresolved multi-asset mark-policy gate still blocks default activation. No further task, new commit, push, PR or trading operation is included in this continuation.
|
||||
The first thirteen waves are committed. **S01 is authorized and in progress** after the owner continued from the named next step and linked ADR-005. One owner implements the runtime/feedback contract; disjoint tests consume the pinned API. R01/R11 still need ADR-006; the multi-asset mark-policy gate still blocks default activation. New S01 commits, other tasks, push, PR or trading operations are outside this continuation.
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"plan_revision": "2026-10-23.30",
|
||||
"plan_revision": "2026-10-23.31",
|
||||
"repository_base": "b7aeca4",
|
||||
"plan_status": "thirteenth_wave_in_review",
|
||||
"plan_status": "fourteenth_wave_in_progress",
|
||||
"execution_authorized": true,
|
||||
"execution_scope": {
|
||||
"authorized_by": "User: lets commit and continue with the backlog (2026-10-23). Accepted F09/P07 commit and authorizes F08 canonical historical reporting under approved ADR002/003/004; no default cutover or new financial policy.",
|
||||
"authorized_by": "User: commit all of it and continue (2026-10-23), after handoff explicitly named S01 and linked pending ADR-005. F08 accepted and committed as 3838295; continue with S01 under ADR-004/005. No paper/default cutover or unrelated ADR approval.",
|
||||
"tasks": [
|
||||
"F08"
|
||||
"S01"
|
||||
],
|
||||
"permissions": [
|
||||
"accepted_wave12_commits",
|
||||
"accepted_wave13_commits",
|
||||
"isolated_implementation",
|
||||
"local_tests",
|
||||
"local_integration_review",
|
||||
|
|
@ -25,7 +25,6 @@
|
|||
"other_backlog_tasks"
|
||||
],
|
||||
"pending_policy_decisions": [
|
||||
"ADR-005",
|
||||
"ADR-006",
|
||||
"ADR-007",
|
||||
"ADR-008"
|
||||
|
|
@ -62,7 +61,9 @@
|
|||
{
|
||||
"id": "ADR-005",
|
||||
"file": "architecture/decisions/005-durable-cutover.md",
|
||||
"status": "proposed_for_plan_approval"
|
||||
"status": "approved",
|
||||
"approved_by": "Owner instructed commit all of it and continue after handoff explicitly named S01 and linked pending ADR-005; direction approved, paper migration/default activation remain separate.",
|
||||
"approved_on": "2026-10-23"
|
||||
},
|
||||
{
|
||||
"id": "ADR-006",
|
||||
|
|
@ -650,7 +651,7 @@
|
|||
"epic": "E2",
|
||||
"priority": "P1",
|
||||
"severity": "High",
|
||||
"status": "review",
|
||||
"status": "done",
|
||||
"dependencies": [
|
||||
"F06",
|
||||
"F09"
|
||||
|
|
@ -677,12 +678,12 @@
|
|||
"assignment": "/root/f08_contract_review",
|
||||
"branch": "wave13/f08-reporting",
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"completed_commit": "3838295eec8e84a46115462ca6c5d5c8c7fab66b",
|
||||
"blocker": null,
|
||||
"release_gates": [],
|
||||
"worktree": "/tmp/stock-bot-wave13.KfvceG/f08",
|
||||
"integration_base": "e3bd722e31a4e14519df543d87affd90a8103fa2",
|
||||
"integration_state": "validated_uncommitted",
|
||||
"integration_state": "validated_committed",
|
||||
"implementation_slices": [
|
||||
{
|
||||
"owner": "/root/f08_contract_review",
|
||||
|
|
@ -699,7 +700,8 @@
|
|||
],
|
||||
"review_notes": "Independent reviews accepted native/reporting and analytics slices. 22 owner files integrated with exact hashes plus root native/worker/analytics composition tests. Repository gates, disposable recovery and release comparisons pass; shared-host drift checked against unchanged release control. Financial event IDs/checkpoints/trace/projection and legacy paths retained. See thirteenth_wave_validation; R05 owns persisted/public-result cutover.",
|
||||
"reviewed_by": ["/root/wave12_review", "/root"],
|
||||
"verification_reference": "ROADMAP.md#thirteenth-wave-execution--2026-10-23"
|
||||
"verification_reference": "ROADMAP.md#thirteenth-wave-execution--2026-10-23",
|
||||
"accepted_by": "Owner: commit all of it and continue (2026-10-23). Accepted source hashes reverified before commit 3838295."
|
||||
},
|
||||
{
|
||||
"id": "F09",
|
||||
|
|
@ -902,7 +904,7 @@
|
|||
"epic": "E4",
|
||||
"priority": "P0",
|
||||
"severity": "Critical",
|
||||
"status": "blocked",
|
||||
"status": "in_progress",
|
||||
"dependencies": [
|
||||
"F07"
|
||||
],
|
||||
|
|
@ -920,15 +922,24 @@
|
|||
"specialization": "TypeScript trading infrastructure",
|
||||
"write_locks": [
|
||||
"strategy-contract",
|
||||
"worker-protocol"
|
||||
"replay-driver",
|
||||
"native-admission-feedback"
|
||||
],
|
||||
"parallel_policy": "Allowed only with satisfied dependencies/approvals and disjoint write locks AND actual files; see agents/integration.md.",
|
||||
"assignment": null,
|
||||
"branch": null,
|
||||
"parallel_policy": "One runtime/native-feedback contract owner; disjoint verification owner consumes the pinned contract. Root owns metadata/integration; independent reviewer is read-only. No worker request or financial-engine change.",
|
||||
"assignment": "/root/s01_contract",
|
||||
"branch": "wave14/s01-runtime",
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"blocker": null,
|
||||
"release_gates": []
|
||||
"release_gates": [],
|
||||
"worktree": "/tmp/stock-bot-wave14.JYfazy/s01",
|
||||
"integration_base": "3838295eec8e84a46115462ca6c5d5c8c7fab66b",
|
||||
"integration_state": "isolated_implementation",
|
||||
"implementation_slices": [
|
||||
{ "owner": "/root/s01_contract", "scope": "Typed strategy contract, shared pull driver, staged per-owner runtime, native admission-feedback parser and focused tests", "worktree": "/tmp/stock-bot-wave14.JYfazy/s01", "branch": "wave14/s01-runtime" },
|
||||
{ "owner": "/root/s01_test_review", "scope": "Disjoint real-native multi-owner failure/retry/integrity tests and measured strategy fixture after pinned API handoff", "worktree": "/tmp/stock-bot-wave14.JYfazy/verification", "branch": "wave14/s01-verification" }
|
||||
],
|
||||
"review_notes": "Whole-attempt restart from frozen inputs/initial states/seeds; diagnostic TS snapshots are not resumable financial checkpoints. Per-owner observation cursors and RNG/decision sequences; native Order effects supply admission feedback. Direct trusted host programs only; S02 owns built-in/worker wiring, S03 paper recovery, R05 default/persistence cutover."
|
||||
},
|
||||
{
|
||||
"id": "S02",
|
||||
|
|
@ -4929,7 +4940,8 @@
|
|||
"Legacy positions and round-trip DTOs cannot truthfully represent the new facts without further work. F08 publishes an additive canonical analytics DTO; R05 retains persisted/public-result/default cutover with existing approval gates."
|
||||
],
|
||||
"thirteenth_wave_validation": {
|
||||
"state": "validated_uncommitted",
|
||||
"state": "validated_committed",
|
||||
"accepted_commit": "3838295eec8e84a46115462ca6c5d5c8c7fab66b",
|
||||
"work_root": "/tmp/stock-bot-wave13.KfvceG",
|
||||
"committed_before_implementation": [
|
||||
"e3bd722e31a4e14519df543d87affd90a8103fa2",
|
||||
|
|
@ -5201,6 +5213,14 @@
|
|||
"Legacy financial paths/results/UI remain active until separately gated migration. No DSL/cache/journal deletion or unrelated hot-loop rewrite."
|
||||
],
|
||||
"cleanup": "Stopped only exact --rm fixture containers a4edf7d7b61f944d9b42f93fe2fb77c9be565efabfa9292aeb8d34de3d1c8c85 and 604c940db286ab408bd60963116355428f0efa216725ca2e269639e1572fc1dd. Development services untouched; isolated worktrees/logs retained.",
|
||||
"next": "After acceptance, S01 stateful TS decisions requires ADR-005 approval; R01/R11 require ADR-006. No pending ADR implicitly approved."
|
||||
}
|
||||
"next": "At handoff S01 required ADR-005; the next owner instruction accepted F08 and continued the explicitly named S01/ADR-005 direction. See fourteenth_wave_notes. R01/R11 remain gated by ADR-006."
|
||||
},
|
||||
"fourteenth_wave": ["S01"],
|
||||
"fourteenth_wave_base": "3838295eec8e84a46115462ca6c5d5c8c7fab66b",
|
||||
"fourteenth_wave_notes": [
|
||||
"Owner: commit all of it and continue, after the handoff named S01 and linked pending ADR-005. F08 committed after exact accepted-source hash verification; S01 is now authorized under ADR-004/005.",
|
||||
"Root pinned S01 whole-attempt restart and per-owner state/RNG/observation semantics after independent runtime/recovery inspection. Existing native API has no checkpoint wire; do not introduce a partial TS-only resume.",
|
||||
"One implementation owner controls strategy contract/shared driver/native admission feedback. Disjoint verification owner waits for pinned API. Root owns metadata/integration; independent review checks both slices.",
|
||||
"Trusted direct programs only. S02 owns real-strategy/worker composition, S03 paper migration, R05 durable canonical/default cutover. Other ADRs, untrusted-code isolation, financial policy and existing active runtimes remain unchanged."
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,3 +57,19 @@ Keep migrations additive and previous results readable. Do not add a switch that
|
|||
## Handoff
|
||||
|
||||
Report scope changes (if any), fixture expectations, API/schema changes, measurements, remaining limitations and commit/PR references once authorized. Request independent review; only the integration/planning owner may mark the manifest done.
|
||||
|
||||
## Execution contract — 2026-10-23
|
||||
|
||||
The owner accepted F08 and requested continuation after the handoff explicitly named S01 and linked ADR-005. Base `3838295`; manifest revision `2026-10-23.31`. Root reserves the strategy contract/shared pull driver/native feedback parser to one owner; independent test author owns disjoint test/measurement files after the API is pinned. No Rust financial semantics, worker request protocol, active legacy registry, SQL/paper operation or default cutover changes.
|
||||
|
||||
- Add `runStrategyReplay(load, programs, options)` as a trusted host primitive. Programs have owner ID, strategy ID/version, fixed target/orders mode, explicit uint32 seed, initial JSON state and a synchronous `decide(context) -> {nextState, intent}`. Owner IDs are unique and exactly match native configuration; strategy IDs/versions may repeat for independent instances. Capture/detach inputs at attempt creation. Do not pass execution services, native handles, future data or state belonging to other owners into author callbacks.
|
||||
- Context contains the engine time/barrier, the same frozen portfolio view for every due callback, owned positions, newly available observations since that owner's prior decision, previous admission feedback, readonly typed state and a scoped `random()`. Cadence controls scheduling; it must not discard another owner's pending observations. Warmup is consumed through the same prefix. Account information remains visible for portfolio-aware strategies; isolated state/feedback belongs only to its owner.
|
||||
- Extract one internal pull loop used by the existing conformance wrapper and the new runtime. Keep existing trace IDs, output hashes, observation delivery and format defaults stable for conformance. The runtime stages all due decisions/states before one native batch; only a validated successful response commits all prepared state/RNG/observation/sequence slots. A native risk rejection is a valid state transition; a failed/ambiguous submit disposes the attempt.
|
||||
- Per-owner RNG uses versioned `lcg32-v1`, the existing unsigned 32-bit `Math.imul(state,1664525)+1013904223` recurrence, divided by 2^32. Track state/draw count and safe decision counters. Invalidate the scoped RNG function immediately after the synchronous callback, including exceptions. This is reproducible fixture randomness, not a cryptographic or statistical-independence claim.
|
||||
- Reject non-JSON, lossy/nonfinite state, async outputs, invalid intents and wrong modes before admission. Detach/freeze input and returned state; do not let caller mutation or retained callback references rewrite a committed snapshot. Copying small strategy state is acceptable; never clone native financial history per observation.
|
||||
- Admission feedback copies validated native `Order` effects for the owner, including native rejection reasons and cancellation of that owner's earlier decisions. `Running` is not proof of order acceptance. Feedback is available at that owner's next decision and retained in terminal diagnostics. This is not a complete fill-event stream: subsequent fills appear in authoritative positions/open orders; S01 does not invent execution events or accounting.
|
||||
- Return `{result, metrics, diagnostics}`. Versioned diagnostic snapshots contain identity, committed barrier count/last ID, sorted owner records with state, next decision sequence, RNG state/draw count, consumed observation count and previous admission feedback. `StrategyReplayError` carries the last confirmed committed diagnostics and cause, never a successful financial result. Fault tests may spy on the native host submit method; no generic session factory is needed.
|
||||
- Retry means an entirely fresh native session with the original frozen inputs, detached initial states and per-owner seeds. Recompute every cursor and decision. Diagnostic TS snapshots are **not resumable financial checkpoints**. Do not expose a TS-only restore API or add native checkpoint transport for this task. Existing Rust reconstruction and paper checkpoints remain intact.
|
||||
- Direct trusted program objects suffice here. S02 supplies the first real SMA strategy and trusted worker composition; R01/A02 own immutable/untrusted artifacts and isolation. Keep the existing legacy `StrategyRegistry` instead of broadening its execution-service factory into the canonical author API.
|
||||
|
||||
Required regression scenarios include mixed owner cadence/warmup, reversed callback order and independent RNG draws, prefix/future-suffix integrity, late callback failure after a committed barrier, ambiguous post-native-submit failure, risk-rejection feedback with state advancement, repeated/partial targets, owned cancellation feedback, frozen/retained-reference isolation, invalid state/Promise/mode rejection, and compile-time absence of financial mutation services. Fresh retries must equal uninterrupted decision/state/RNG/economic results. Preserve existing conformance/result hashes and paper recovery tests. Measure deterministic strategy staging on representative release workloads without a DSL/cache or an unrelated hot-loop optimization.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue