docs(development): defer performance work and begin durable execution
This commit is contained in:
parent
ca5abdde0e
commit
5e9655de0b
6 changed files with 88 additions and 30 deletions
|
|
@ -1,12 +1,12 @@
|
|||
# Canonical development backlog
|
||||
|
||||
**First fourteen waves committed; S02 is validated and awaiting acceptance.** S01 is accepted as `2bcadbd`; `4f6e44a` records acceptance and the S02 contract. S02 adds one explicit long-only SMA version and trusted selection through the existing native worker. Consult manifest execution_scope and [current wave](../ROADMAP.md#fifteenth-wave-execution--2026-10-23). ADR-002/003/004/005 are approved; other policies/default cutovers remain gated.
|
||||
**First fifteen waves committed; S03 is in progress.** S02 is accepted as `ca5abdd`. The owner deferred performance work; P08 is on hold. S03 preserves durable execution/recovery while adopting the canonical Rust kernel. Consult manifest execution_scope and [current wave](../ROADMAP.md#sixteenth-wave-execution--2026-10-23). ADR-002/003/004/005 are approved; other policies/default cutovers remain gated.
|
||||
|
||||
## One source of truth
|
||||
|
||||
[manifest.json](manifest.json) owns scheduling metadata: status, priorities, dependencies, ADR approvals, assignments and write locks. Task Markdown owns implementation scope/evidence/acceptance. This index and the [graph](dependencies.mmd) are derived views. Only the planning/integration owner updates scheduling state.
|
||||
|
||||
**46 scheduled + 5 deferred + 4 merged IDs = 55 retained IDs.** F09/P07 add projection/profiling work; P08 follows measured TypeScript strategy overhead. Merged records preserve traceability; never execute them separately. Deferred work requires its stated trigger and explicit activation.
|
||||
**45 scheduled + 6 deferred + 4 merged IDs = 55 retained IDs.** F09/P07 add projection/profiling work; the owner deferred P08's TypeScript optimization. Merged records preserve traceability; never execute them separately. Deferred work requires its stated trigger and explicit activation.
|
||||
|
||||
States: ready, claimed, in_progress, review, done, blocked, deferred, merged. “Ready” means no code/ADR prerequisite, not execution authority. Implementation dependencies require accepted integration. `release_gates` govern enabling an end-to-end feature, not component coding or integration; conditional gates apply only to the named capability. F05 may integrate before F06, but its replay behavior is not released until F06 proves it.
|
||||
|
||||
|
|
@ -53,10 +53,10 @@ 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 / done | F07, ADR-004, ADR-005 | — | TypeScript trading infrastructure / M |
|
||||
| [S02 Adapt one SMA strategy for the first canonical path](tasks/S02.md) | P1 / review | S01 | — | TypeScript strategy/quant engineering / M |
|
||||
| [S03 Adapt durable paper transactions to Rust financial reducers](tasks/S03.md) | P0 / ready | S01, C06, ADR-005 | — | Durable execution/Rust integration / L |
|
||||
| [S02 Adapt one SMA strategy for the first canonical path](tasks/S02.md) | P1 / done | S01 | — | TypeScript strategy/quant engineering / M |
|
||||
| [S03 Adapt durable paper transactions to Rust financial reducers](tasks/S03.md) | P0 / in_progress | 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 |
|
||||
| [S05 Add a small composable multi-signal regime example](tasks/S05.md) | P2 / blocked | S02, F08 | R08 | Quant strategy research / M |
|
||||
| [S05 Add a small composable multi-signal regime example](tasks/S05.md) | P2 / ready | S02, F08 | R08 | Quant strategy research / M |
|
||||
| [S06 Retire duplicate simulator paths after cutover proof](tasks/S06.md) | P2 / blocked | S03, S04, R05 | — | TypeScript trading infrastructure / M |
|
||||
|
||||
### E5 — Existing web backtest vertical slice
|
||||
|
|
@ -96,7 +96,7 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
|
|||
| [P05 Separate result summaries from paged detail payloads](tasks/P05.md) | P2 / deferred | R06, P01 | — | Performance/infrastructure engineering / M |
|
||||
| [P06 Conditionally add a minimal Rust-executed strategy plan](tasks/P06.md) | P2 / deferred | P04, S01, ADR-008 | — | Rust/TS performance compiler boundary / M |
|
||||
| [P07 Profile representative canonical replay workloads](tasks/P07.md) | P1 / done | F07, P01 | F09 for compact comparisons | Performance/test infrastructure / M |
|
||||
| [P08 Reduce measured TypeScript strategy decision overhead](tasks/P08.md) | P1 / blocked | S02, P07 | — | TypeScript performance/runtime engineering / M |
|
||||
| [P08 Reduce measured TypeScript strategy decision overhead](tasks/P08.md) | P1 / deferred | S02, P07; owner resume | — | TypeScript performance/runtime engineering / M |
|
||||
|
||||
### E8 — Authorized, isolated AI research
|
||||
|
||||
|
|
@ -118,4 +118,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 fourteen waves are committed. **S02 is independently reviewed and validated, with new implementation changes uncommitted.** Recommended next after acceptance: P08, profile and reduce the measured TypeScript strategy decision/state overhead. S03 is also code/ADR-ready. R01/R11 still need ADR-006; the multi-asset mark-policy gate still blocks default activation. No P08 implementation, new S02 commit, push, PR or trading operation is included in this continuation.
|
||||
The first fifteen waves are committed. **S03 is authorized and in progress; performance work is deferred by the owner.** S05 is also code/ADR-ready but outside this wave. R01/R11 still need ADR-006; the multi-asset mark-policy gate still blocks default activation. No default/paper activation, push or PR is included in this continuation.
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ flowchart TD
|
|||
P05["P05: Separate result summaries from paged detail payloads (conditional)"]
|
||||
P06["P06: Conditionally add a minimal Rust-executed strategy plan (conditional)"]
|
||||
P07["P07: Profile representative canonical replay workloads"]
|
||||
P08["P08: Reduce measured TypeScript strategy decision overhead"]
|
||||
P08["P08: Reduce measured TypeScript strategy decision overhead (owner deferred)"]
|
||||
end
|
||||
subgraph E8["E8: Authorized, isolated AI research"]
|
||||
A01["A01: Add research-only principals and durable job budgets"]
|
||||
|
|
@ -202,5 +202,5 @@ flowchart TD
|
|||
S04 --> O02
|
||||
R03 -. save or link finding only .-> R09
|
||||
classDef conditional stroke-dasharray: 5 5,fill:#fff3cd,color:#222
|
||||
class D04,P03,P05,P06,O02 conditional
|
||||
class D04,P03,P05,P06,P08,O02 conditional
|
||||
%% Merged traceability only: C05 -> F01; F03 -> F02; D03 -> D01; P02 -> F06.
|
||||
|
|
|
|||
|
|
@ -1,22 +1,24 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"plan_revision": "2026-10-23.34",
|
||||
"plan_revision": "2026-10-23.35",
|
||||
"repository_base": "b7aeca4",
|
||||
"plan_status": "fifteenth_wave_in_review",
|
||||
"plan_status": "sixteenth_wave_in_progress",
|
||||
"execution_authorized": true,
|
||||
"execution_scope": {
|
||||
"authorized_by": "User: commit and continue (2026-10-23), after S01 validated handoff named S02. S01 accepted and committed as 2bcadbd. Continue only S02 under approved ADR-002/003/004/005.",
|
||||
"authorized_by": "User: commit and continue, then stop performance work for now and continue remaining backlog (2026-10-23). S02 accepted and committed ca5abdd. S03 is the highest-priority ready non-performance task under approved ADR-005.",
|
||||
"tasks": [
|
||||
"S02"
|
||||
"S03"
|
||||
],
|
||||
"permissions": [
|
||||
"accepted_wave14_commits",
|
||||
"accepted_wave15_commits",
|
||||
"isolated_implementation",
|
||||
"local_tests",
|
||||
"local_correctness_tests",
|
||||
"local_integration_review",
|
||||
"planning_progress_updates"
|
||||
],
|
||||
"excluded": [
|
||||
"performance_profiling_or_optimization",
|
||||
"performance_benchmarks",
|
||||
"new_wave_commits_without_further_approval",
|
||||
"push",
|
||||
"pull_requests",
|
||||
|
|
@ -969,7 +971,7 @@
|
|||
"epic": "E4",
|
||||
"priority": "P1",
|
||||
"severity": "High",
|
||||
"status": "review",
|
||||
"status": "done",
|
||||
"dependencies": [
|
||||
"S01"
|
||||
],
|
||||
|
|
@ -989,12 +991,12 @@
|
|||
"assignment": "/root/s02_strategy",
|
||||
"branch": "wave15/s02-strategy",
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"completed_commit": "ca5abdde0e131ef4ec8c60ff9a4de4e277fc0820",
|
||||
"blocker": null,
|
||||
"release_gates": [],
|
||||
"worktree": "/tmp/stock-bot-wave15.zi3GmP/strategy",
|
||||
"integration_base": "2bcadbd117c288577a26615e6d132cf49ea074e4",
|
||||
"integration_state": "validated_uncommitted",
|
||||
"integration_state": "validated_committed",
|
||||
"implementation_slices": [
|
||||
{
|
||||
"owner": "/root/s02_strategy",
|
||||
|
|
@ -1015,7 +1017,7 @@
|
|||
"/root"
|
||||
],
|
||||
"verification_reference": "ROADMAP.md#fifteenth-wave-execution--2026-10-23",
|
||||
"review_notes": "All ten source/test files independently approved with exact hashes. Full repository, strict test types/lint/format, disposable recovery, release and built-worker parity gates passed. Long-only policy differs explicitly from legacy; R01/R05 retain artifact and durable/public cutover. Paired 48-session exact-decision benchmark identifies aggregate strategy/state overhead; P08 planned only. Root finished worker validation after owner tool approval stalled; no new source semantics changed during takeover.",
|
||||
"review_notes": "All ten source/test files independently approved with exact hashes. Full repository, strict test types/lint/format, disposable recovery, release and built-worker parity gates passed. Long-only policy differs explicitly from legacy; R01/R05 retain artifact and durable/public cutover. Paired 48-session exact-decision benchmark identifies aggregate strategy/state overhead; P08 planned only. Root finished worker validation after owner tool approval stalled; no new source semantics changed during takeover. Owner accepted and authorized commit 2026-10-23; all frozen source hashes verified before commit.",
|
||||
"concrete_write_scope": [
|
||||
"apps/stock/orchestrator/src/contracts/builtin-strategy.ts",
|
||||
"apps/stock/orchestrator/src/strategies/canonical-sma.ts",
|
||||
|
|
@ -1035,7 +1037,7 @@
|
|||
"epic": "E4",
|
||||
"priority": "P0",
|
||||
"severity": "Critical",
|
||||
"status": "ready",
|
||||
"status": "in_progress",
|
||||
"dependencies": [
|
||||
"S01",
|
||||
"C06"
|
||||
|
|
@ -1055,13 +1057,30 @@
|
|||
"paper-transaction",
|
||||
"financial-contract"
|
||||
],
|
||||
"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": "Native wire/schema owner and durable custody/shared strategy staging owner use disjoint files. Durable owner consumes root-accepted native contract overlay. Root owns metadata/integration; independent review checks financial/recovery invariants.",
|
||||
"assignment": "/root/s03_durable",
|
||||
"branch": "wave16/s03-durable",
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"blocker": null,
|
||||
"release_gates": []
|
||||
"release_gates": [],
|
||||
"worktree": "/tmp/stock-bot-wave16.kgaZm4/durable",
|
||||
"integration_base": "ca5abdde0e131ef4ec8c60ff9a4de4e277fc0820",
|
||||
"integration_state": "isolated_implementation",
|
||||
"implementation_slices": [
|
||||
{
|
||||
"owner": "/root/s03_native",
|
||||
"worktree": "/tmp/stock-bot-wave16.kgaZm4/native",
|
||||
"branch": "wave16/s03-native",
|
||||
"scope": "Stateless Rust financial transaction boundary, exact per-effect views, wire schemas and native tests; no resident research hot-loop change."
|
||||
},
|
||||
{
|
||||
"owner": "/root/s03_durable",
|
||||
"worktree": "/tmp/stock-bot-wave16.kgaZm4/durable",
|
||||
"branch": "wave16/s03-durable",
|
||||
"scope": "Versioned SQL custody, shared S01 decision staging, actual canonical strategy/RNG/pending-prefix recovery, one durable owner-batch outbox, migration and failure tests."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "S04",
|
||||
|
|
@ -1099,7 +1118,7 @@
|
|||
"epic": "E4",
|
||||
"priority": "P2",
|
||||
"severity": "Medium",
|
||||
"status": "blocked",
|
||||
"status": "ready",
|
||||
"dependencies": [
|
||||
"S02",
|
||||
"F08"
|
||||
|
|
@ -1997,7 +2016,7 @@
|
|||
"epic": "E7",
|
||||
"priority": "P1",
|
||||
"severity": "High",
|
||||
"status": "blocked",
|
||||
"status": "deferred",
|
||||
"dependencies": [
|
||||
"S02",
|
||||
"P07"
|
||||
|
|
@ -2019,7 +2038,7 @@
|
|||
"branch": null,
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"blocker": "Requires S02 acceptance/commit and explicit next-wave authorization. Profile subphase costs before choosing a local optimization; preserve current contracts and all invariants.",
|
||||
"blocker": "Owner explicitly stopped performance work for now (2026-10-23). Initial read-only inspection only; no application changes, profiling, benchmark runs or optimization. Resume only on owner request.",
|
||||
"release_gates": []
|
||||
},
|
||||
{
|
||||
|
|
@ -5865,5 +5884,16 @@
|
|||
"worktrees_and_evidence_retained": true
|
||||
},
|
||||
"next": "Accept/commit S02; recommended next P08 measured local TS decision/state optimization. S03 also code/ADR-ready; R01/R11 still require ADR-006. No extra task/default/paper approval inferred."
|
||||
}
|
||||
},
|
||||
"sixteenth_wave": [
|
||||
"S03"
|
||||
],
|
||||
"sixteenth_wave_base": "ca5abdde0e131ef4ec8c60ff9a4de4e277fc0820",
|
||||
"sixteenth_wave_notes": [
|
||||
"Owner explicitly deferred performance work after S02 commit; stopped all P08 agents before implementation or measurement.",
|
||||
"S03 reuses Rust financial semantics and existing SQL transaction/row-lock/journal guarantees. Native and durable owners have isolated worktrees; review is independent.",
|
||||
"Versioned new canonical accounts only. No implicit legacy migration, current service/default switch, operator reset, broker execution or paper feed activation.",
|
||||
"Native Failed outcomes with committed-prefix effects persist as terminal before surfacing error; SQL failure discards private state. Duplicate outcomes emit no duplicate effects.",
|
||||
"Persist all-owner checkpoint/intent batches and mixed-cadence observation prefixes; reuse S01 staging without changing its public research recovery semantics or inventing a paper dataset hash."
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Parent epic: E7. Priority/severity: P1 / High. Complexity: M. Specialist: TypeSc
|
|||
|
||||
Story: As a researcher, I can run realistic window-based TypeScript strategies without repeatedly paying avoidable state-validation or copying costs.
|
||||
|
||||
Scheduling source of truth: [manifest P08](../manifest.json). This story is planned, not authorized for implementation in S02's wave.
|
||||
Scheduling source of truth: [manifest P08](../manifest.json). **Deferred at the owner's request, 2026-10-23:** stop performance work for now and continue the remaining backlog. Initial inspection produced no application changes, profiling or benchmark runs. Resume only when requested.
|
||||
|
||||
## Evidence and root cause
|
||||
|
||||
|
|
|
|||
|
|
@ -57,3 +57,23 @@ 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 stopped performance work and requested the remaining backlog after S02 was committed as `ca5abdd`. S03 is authorized under ADR-005; P08 is deferred. No profiling, throughput optimization or performance measurements belong to this wave.
|
||||
|
||||
**Native staging:** expose one stateless JSON `stageFinancialTransaction` boundary with initialize/apply variants, explicit version/session/account identity, canonical matching config or checkpoint, and one matching command. Rehydrate a private `MatchingAccount`, use its existing `apply`, and return the new checkpoint, native view, outcome and ordered per-effect views. No operator-reset or broker capability. Research retains its existing resident loop.
|
||||
|
||||
At the paper boundary, intermediate views may be reconstructed by restoring the pre-command private Rust `RiskAccount` and applying the exact retained effect commands through the same reducer, plus native managed-order updates. Compare every reconstructed outcome and final risk checkpoint/order state with the authoritative matcher. No TS accounting or final-view substitution. A replayed outcome emits no new effect rows; persist any native alias receipt without replaying historical effects into current state. Intermediate views are recovery facts, not decision-barrier tokens.
|
||||
|
||||
**Durable custody:** retain the existing SQL account row lock and transaction mechanism. New explicitly canonical account IDs use a versioned outer envelope containing the opaque native checkpoint plus TS cursors/pending work. Reuse generic JSON journal/checkpoint/input storage where compatible; add only the all-owner batch-intent storage actually needed. Native order snapshots and ordered fill journal facts are authoritative persisted records; do not introduce UUID remapping or redundant financial projections. Legacy repository reads/initialization explicitly refuse canonical envelopes, and canonical initialization refuses legacy state or changed configuration. No implicit account conversion.
|
||||
|
||||
**Actual strategy recovery:** a canonical paper runner accepts trusted normalized input commands/observations and optional decision scheduling metadata. S04 supplies the real feed/calendar/scheduler; the caller cannot supply a portfolio or revision. Capture the committed native view for a decision. Restore program JSON state, RNG state/draws, decision cursors and pending observation prefixes for every owner before evaluating all due owners against that same view. Functionally extract/reuse S01 staging logic; preserve its public research diagnostics and complete-retry behavior. Never invent a historical dataset hash for paper.
|
||||
|
||||
Atomically save all next checkpoints and one complete decision-batch intent. Dispatch that batch in a subsequent locked transaction and persist actual admission feedback with its financial snapshot/effects. Drain pending batch, then pending decision, then next input; do not admit later financial input while recovery is pending. Reject caller-supplied Submit commands on the paper input path. Per-owner pending observations must survive mixed-cadence restarts. Trusted program definitions are bound by declared metadata/version/seed/mode/initial state; immutable code artifact retention remains R01/R05.
|
||||
|
||||
**Failures:** SQL failure discards all private staged changes. Native validation/restore errors with no returned transition roll back. A returned native `Failed` outcome can contain a committed financial prefix: save its failed snapshot and exact ordered effects atomically, mark the account/batch terminal, then surface failure after commit. Never report successful execution or keep a running retry state. Publication occurs after commit and cannot roll back finance; stable readable journal IDs recover notification gaps without claiming exactly-once delivery.
|
||||
|
||||
Port existing failure/recovery scenarios to approved canonical economics. Legacy immediate cached-quote fills, UTC implicit resets, shorts and mutable policy reloads are not canonical compatibility promises. Preserve DAY/GTC/IOC/FOK under next-eligible-event timing and explicit venue/risk sessions, and retain legacy tests unchanged. Required added cases include old-command/alias retries after later fills, failed-prefix custody, shared-revision owner batches, mixed-cadence restart, pending-input recovery, SQL decision/intent/effect failures, lost commit acknowledgement and competing producers.
|
||||
|
||||
Native and TypeScript owners work in separate worktrees with an accepted wire-schema overlay. The native owner controls the new API/schema and minimal existing-schema exports; the durable owner controls custody, shared strategy staging and canonical recovery. Root controls integration/migrations acceptance; independent review checks invariants. No default/service/feed activation or paper trading operation is authorized by this task.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue