feat(paper): gate canonical execution on durable feed readiness
This commit is contained in:
parent
c01e96e4dd
commit
75abae2cfc
24 changed files with 3720 additions and 66 deletions
|
|
@ -437,3 +437,17 @@ Rejected: competing TS/web simulators, wholesale Rust rewrite, hand-written deci
|
|||
Only [manifest.json](backlog/manifest.json) owns status/assignment/dependencies. [Task files](backlog/README.md) own scope/acceptance. Read the reusable [implementation](agents/implementation.md), [review](agents/review.md), [integration](agents/integration.md), [planning](agents/planning.md) briefs and [quality gates](QUALITY-GATES.md).
|
||||
|
||||
Approval of planning artifacts is not permission to commit, push or create PRs. Historical planning-only statements refer to the original audit; later execution records and the canonical manifest identify actual implementation, authorization and validation evidence.
|
||||
|
||||
|
||||
## Seventeenth-wave execution — 2026-10-23
|
||||
|
||||
S03 was accepted and committed as `c01e96e`, superseding its uncommitted status above. S04 is in progress under its [pinned execution contract](backlog/tasks/S04.md#execution-contract--2026-10-23). Isolated feed and custody owners work under `/tmp/stock-bot-wave17.JfETUx/`; root owns shared contracts, API/composition and integration, with independent review. Performance tasks remain deferred by owner instruction.
|
||||
|
||||
The existing ingestion service has no working producer for its legacy paper Socket.IO client. This wave adds a validated trusted HTTP frame boundary and operator gate with deterministic feed-to-fill fixture coverage; it does not certify a vendor feed or activate paper/live trading. The canonical composition remains explicit and opt-in. Preserve S03 financial custody and financial semantics; retain paused work and require explicit historical recovery acknowledgement.
|
||||
|
||||
|
||||
**Validated handoff:** S04 is `review` / `validated_uncommitted`. Twenty source/test files integrated; feed, custody and API-test slices match independently reviewed frozen hashes. Root supplied shared contracts, composition and HTTP/SQL SMA-to-fill/restart and research-isolation tests. New accounts start halted/disconnected. Exact frame receipts, retained physical quote ordering and generation fences prevent replay/reconnect from silently creating liquidity or resuming execution. Human halt stops the next locked step without discarding pending work. Historical recovery requires explicit acknowledgement and keeps original quote prices/times. Existing loopback auth bypass remains an explicit development exception, not authenticated-feed certification.
|
||||
|
||||
Validation: `bun run check` passed build, source/contracts, 82 tooling, 43 utility, 44 calculation, 454 integration and 150 Rust tests (four manual tests ignored), plus lint. Full isolated PostgreSQL/Redis suite: **104 tests / 719 assertions**. Strict new-test TypeScript, scoped lint/format and diff checks passed. Final release addon matches this checkout's native library; **55 tests / 481 assertions** passed against it. No performance measurements were run. Exact commands, hashes and raw logs are in `manifest.json` → `seventeenth_wave_validation` and `/tmp/stock-bot-wave17.JfETUx/`.
|
||||
|
||||
Sandbox-only connection/child-process restrictions were rerun with escalation; only the exact stalled test process was stopped. Both exact disposable fixture containers were stopped after validation. Development services, worktrees and logs were retained. No S04 commit, push, PR, default cutover or trading activation occurred. The current trusted HTTP feed boundary still needs a real provider producer and operational calendars. **Next after acceptance/commit: S05**, a small composable multi-signal/regime strategy example; performance remains deferred. R01/R11 still need ADR-006.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Canonical development backlog
|
||||
|
||||
**First fifteen waves committed; S03 is validated for review.** S02 is accepted as `ca5abdd`. The owner deferred performance work; P08 is on hold. S03 preserves durable execution/recovery on the canonical Rust kernel, with full repository and disposable-database checks passing. Its changes remain uncommitted. 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.
|
||||
**First sixteen waves committed; S04 is validated and awaiting acceptance/commit.** S03 is accepted as `c01e96e`. P08 remains deferred at the owner's request. S04 adds explicit canonical paper-feed custody, readiness and operator controls; the repository has no functioning vendor stream to claim as verified. Consult manifest execution_scope and [current wave](../ROADMAP.md#seventeenth-wave-execution--2026-10-23). ADR-002/003/004/005 are approved; other policies/default cutovers remain gated.
|
||||
|
||||
## One source of truth
|
||||
|
||||
|
|
@ -54,8 +54,8 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
|
|||
| --- | --- | --- | --- | --- |
|
||||
| [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 / done | S01 | — | TypeScript strategy/quant engineering / M |
|
||||
| [S03 Adapt durable paper transactions to Rust financial reducers](tasks/S03.md) | P0 / review | 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 |
|
||||
| [S03 Adapt durable paper transactions to Rust financial reducers](tasks/S03.md) | P0 / done | S01, C06, ADR-005 | — | Durable execution/Rust integration / L |
|
||||
| [S04 Establish a verified paper feed and operator safety gate](tasks/S04.md) | P1 / review | S02, S03 | — | TypeScript trading infrastructure / 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 |
|
||||
|
||||
|
|
@ -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 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.
|
||||
The first sixteen waves are committed. **S04 is validated and uncommitted; 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.
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"plan_revision": "2026-10-23.36",
|
||||
"plan_revision": "2026-10-23.38",
|
||||
"repository_base": "b7aeca4",
|
||||
"plan_status": "sixteenth_wave_validated",
|
||||
"plan_status": "seventeenth_wave_review",
|
||||
"execution_authorized": true,
|
||||
"execution_scope": {
|
||||
"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.",
|
||||
"authorized_by": "User: commit and continue after validated S03 handoff (2026-10-23). S03 accepted/committed c01e96e; S04 prerequisites satisfied. Performance work remains deferred.",
|
||||
"tasks": [
|
||||
"S03"
|
||||
"S04"
|
||||
],
|
||||
"permissions": [
|
||||
"accepted_wave15_commits",
|
||||
"accepted_wave16_commits",
|
||||
"isolated_implementation",
|
||||
"local_correctness_tests",
|
||||
"local_integration_review",
|
||||
|
|
@ -1037,7 +1037,7 @@
|
|||
"epic": "E4",
|
||||
"priority": "P0",
|
||||
"severity": "Critical",
|
||||
"status": "review",
|
||||
"status": "done",
|
||||
"dependencies": [
|
||||
"S01",
|
||||
"C06"
|
||||
|
|
@ -1061,12 +1061,12 @@
|
|||
"assignment": "/root/s03_durable",
|
||||
"branch": "wave16/s03-durable",
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"completed_commit": "c01e96e4dd2879d0c728e57b48f5b6172adecd0f",
|
||||
"blocker": null,
|
||||
"release_gates": [],
|
||||
"worktree": "/tmp/stock-bot-wave16.kgaZm4/durable",
|
||||
"integration_base": "ca5abdde0e131ef4ec8c60ff9a4de4e277fc0820",
|
||||
"integration_state": "validated_uncommitted",
|
||||
"integration_state": "validated_committed",
|
||||
"implementation_slices": [
|
||||
{
|
||||
"owner": "/root/s03_native",
|
||||
|
|
@ -1091,7 +1091,7 @@
|
|||
"epic": "E4",
|
||||
"priority": "P1",
|
||||
"severity": "High",
|
||||
"status": "blocked",
|
||||
"status": "review",
|
||||
"dependencies": [
|
||||
"S02",
|
||||
"S03"
|
||||
|
|
@ -1107,13 +1107,34 @@
|
|||
"write_locks": [
|
||||
"paper-runtime"
|
||||
],
|
||||
"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": "Feed translator and durable runtime/control owners use disjoint files and the root-owned public contract. Root owns configuration/composition/routes/integrated tests; independent review checks temporal and account-lock guarantees.",
|
||||
"assignment": "/root/s04_controls_audit",
|
||||
"branch": "wave17/s04-control",
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"blocker": null,
|
||||
"release_gates": []
|
||||
"release_gates": [],
|
||||
"worktree": "/tmp/stock-bot-wave17.JfETUx/control",
|
||||
"integration_base": "c01e96e4dd2879d0c728e57b48f5b6172adecd0f",
|
||||
"integration_state": "validated_uncommitted",
|
||||
"implementation_slices": [
|
||||
{
|
||||
"owner": "/root/s04_feed_audit",
|
||||
"branch": "wave17/s04-feed",
|
||||
"worktree": "/tmp/stock-bot-wave17.JfETUx/feed",
|
||||
"scope": "Strict normalized quote-frame validation, explicit calendar/feature/cadence translation and focused tests."
|
||||
},
|
||||
{
|
||||
"owner": "/root/s04_controls_audit",
|
||||
"branch": "wave17/s04-control",
|
||||
"worktree": "/tmp/stock-bot-wave17.JfETUx/control",
|
||||
"scope": "Versioned host policy/control custody, atomic frame admission, persistent halt/runtime fencing, canonical runtime and real-PostgreSQL failure tests."
|
||||
},
|
||||
{
|
||||
"owner": "/root",
|
||||
"scope": "Shared public contracts, opt-in configuration/composition, operator-authenticated REST routes and integrated tests/planning."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "S05",
|
||||
|
|
@ -5904,7 +5925,7 @@
|
|||
"After S03 acceptance/commit, S04 is the next non-performance task. S05 is independently code/ADR-ready; R01/R11 still require ADR-006. P08 remains deferred."
|
||||
],
|
||||
"sixteenth_wave_validation": {
|
||||
"state": "validated_uncommitted",
|
||||
"state": "validated_committed",
|
||||
"work_root": "/tmp/stock-bot-wave16.kgaZm4",
|
||||
"committed_before_implementation": {
|
||||
"S02": "ca5abdde0e131ef4ec8c60ff9a4de4e277fc0820",
|
||||
|
|
@ -6057,6 +6078,154 @@
|
|||
"development_resources_untouched": true,
|
||||
"worktrees_and_logs_retained": true
|
||||
},
|
||||
"next": "Accept/commit S03, then S04 verified paper feed/operator readiness. S05 independently ready; research-product R01/R11 require ADR-006. P08 remains deferred by owner request."
|
||||
"next": "Accept/commit S03, then S04 verified paper feed/operator readiness. S05 independently ready; research-product R01/R11 require ADR-006. P08 remains deferred by owner request.",
|
||||
"completed_commit": "c01e96e4dd2879d0c728e57b48f5b6172adecd0f"
|
||||
},
|
||||
"seventeenth_wave": [
|
||||
"S04"
|
||||
],
|
||||
"seventeenth_wave_base": "c01e96e4dd2879d0c728e57b48f5b6172adecd0f",
|
||||
"seventeenth_wave_notes": [
|
||||
"Actual vendor/socket feed is absent. Implement a strict normalized authenticated HTTP ingress and remain unready without a configured producer/current data/calendar; no invented provider certification.",
|
||||
"Explicit canonical opt-in only; keep legacy execution intact for legacy accounts, skip legacy mutation/feed graph for canonical composition and reject canonical paper configuration in research-only composition.",
|
||||
"Halt/feed/runtime-generation guards share the S03 account row lock; reconnect/restart/stale gap require renewed human activation. No native Finish/reset as a pause.",
|
||||
"Inactive frames are health-only with immutable receipt disposition. Active frames enqueue complete derived command batches atomically. Preserve physical quote timestamps/sequences and one synchronized post-quote decision barrier.",
|
||||
"Explicit recoverPending acknowledgement permits original-time replay of already-admitted work; activation succeeds only after recovery and final readiness. No silent skipping or restamping."
|
||||
],
|
||||
"seventeenth_wave_validation": {
|
||||
"state": "validated_uncommitted",
|
||||
"work_root": "/tmp/stock-bot-wave17.JfETUx",
|
||||
"committed_before_implementation": {
|
||||
"S03": "c01e96e4dd2879d0c728e57b48f5b6172adecd0f"
|
||||
},
|
||||
"scope": [
|
||||
"Explicit trusted quote-frame ingress with immutable calendars, completed-bar manifests and cadence",
|
||||
"Generation-fenced durable host control under the canonical SQL account lock",
|
||||
"Persistent operator halt, per-asset readiness and explicit historical recovery",
|
||||
"Opt-in exclusive canonical composition and authenticated operator/feed REST routes",
|
||||
"Actual SMA-to-Rust-to-SQL HTTP and research isolation regression tests"
|
||||
],
|
||||
"source_integration": {
|
||||
"files": 20,
|
||||
"exact_hashes": {
|
||||
"apps/stock/config/src/schemas/stock-app.schema.ts": "64bdc88949ebb872cf906d31725e36eeadae14db3cabed091630fa85d6dec6ab",
|
||||
"apps/stock/orchestrator/src/api/rest/paper.ts": "a9235bcca32daadc4aa23348edcbbc1d958a643db9102fb225dcabcab242ee21",
|
||||
"apps/stock/orchestrator/src/container.ts": "9db8987baa9f7e0fc462a8d47141123ed5087ad49d205d4b4c1c56679e3bdf31",
|
||||
"apps/stock/orchestrator/src/contracts/paper-runtime.ts": "44ca90ab4b31bef527b084855b0d7b7bb6a259dd8bbcb8263307e96a22872467",
|
||||
"apps/stock/orchestrator/src/execution/CanonicalPaperExecution.ts": "0f7c50df6c9ef27fe167ddf74296999e664ca7d1543653494215d0ac8dc9d60d",
|
||||
"apps/stock/orchestrator/src/execution/PostgresCanonicalExecutionRepository.ts": "56912929fc1bea458cbcaae8125d2b98d7125e48784674a38c65c7c778539cd1",
|
||||
"apps/stock/orchestrator/src/execution/canonical-paper.ts": "88e648ea345fd965fee5ddc1db787c41f55640d3009138df22e764d12daee409",
|
||||
"apps/stock/orchestrator/src/index.ts": "efaa6bb761636988ea6f9c55d713766f28ce115c5234ea181e3ffe5616f2815c",
|
||||
"apps/stock/orchestrator/src/paper/CanonicalPaperRuntime.ts": "b1f2315c03beead9031e779082415b4a1832f32ec98e67d882142d11137f93af",
|
||||
"apps/stock/orchestrator/src/paper/feed.ts": "1ff4b9e46346f97e4e1bce4929f594cd885b4ee0dc598560adc704443f98f48a",
|
||||
"apps/stock/orchestrator/src/routes/create-routes.ts": "6f9627ccd8b75819a757e7154b7f8020bbfc2235eb380b2747d97c1cdba68ff6",
|
||||
"apps/stock/orchestrator/src/simple-container.ts": "8d7f51b87f8f5e2cba6298f3db67e79b1516a44da6db3610ee5fd319cca4282b",
|
||||
"apps/stock/orchestrator/src/types.ts": "dc89de87a58eb50f865ef302bcb9108c7f9e6dfe82acd32c3228645efa871e11",
|
||||
"test/fixtures/paper-feed.ts": "7321e4734c4a479bf49598401967da931f273bed29426cd5cc9950de1ad916fd",
|
||||
"test/fixtures/paper-runtime.ts": "eb7821542290b1c3d7ed5673cb796143a18da82f87288d8cabab1ad0cde7d952",
|
||||
"test/integration/paper-composition.test.ts": "880cc8996f0e89d088b75f2c215359f01fa88c7d9dd73593352015d6952a86f2",
|
||||
"test/integration/paper-feed.test.ts": "a4d88a45bf275db365ef95d2d65e85bbad620b9e09819f3a896ddbb22f0953fe",
|
||||
"test/integration/paper-routes.test.ts": "5a9f607ab756c3f1e5091575db63daee8ae97392f79535aaa3eb1b972c060ecb",
|
||||
"test/postgres/paper-http.test.ts": "6df5064448b9d7897234c9786db2d197cfea3ef605bd6c300a8648e13c182f6b",
|
||||
"test/postgres/paper-runtime.test.ts": "3a15bcba7ae0b423b5808a5906a342d9eea6a8f0f08aed9840471aef2fbb0780"
|
||||
},
|
||||
"source_archive": "/tmp/stock-bot-wave17.JfETUx/s04-integrated-source.tar",
|
||||
"source_archive_sha256": "6a0a38acea183444a3680b04650637aa10c6080fc25466e3ca7b0e6dc9304382",
|
||||
"feed_archive_sha256": "0613896c3101ed27dfc1260d5da176368f50e22e5a9178e373529394a9ed1e11",
|
||||
"control_archive_sha256": "da6e0195e5f102c13ca29ede7eb93a0bc0c36bcba51392ff0f8ab8e4f8fb1961",
|
||||
"api_tests_archive_sha256": "d51c6c145f589590555f11318863cf9fd77a2af09016b57d40c18eba7299294c"
|
||||
},
|
||||
"review": {
|
||||
"reviewer": "/root/s03_review",
|
||||
"result": "G1/G2 and scoped API/isolation accepted; all frozen hashes match; documentation auth-bypass caveat corrected",
|
||||
"findings_resolved": [
|
||||
"Pending recovery cannot report ready",
|
||||
"Fresh probe cannot hide stale executable quotes",
|
||||
"Physical quote high-water persists across reconnect/restart",
|
||||
"Rejected mutations preserve stale deactivation in a separate fenced transaction",
|
||||
"Actual hour-old admitted quote recovers once at original price/time only with explicit acknowledgement",
|
||||
"Malformed decimal HTTP inputs return400; unknown storage errors remain503",
|
||||
"Canonical composition cannot expose or replace itself with legacy gateways"
|
||||
]
|
||||
},
|
||||
"checks": [
|
||||
{
|
||||
"command": "CARGO_BUILD_JOBS=2 bun run check",
|
||||
"result": "passed outside sandbox",
|
||||
"counts": {
|
||||
"tooling": 82,
|
||||
"utilities": 43,
|
||||
"calculations": 44,
|
||||
"integration": 454,
|
||||
"rust": 150,
|
||||
"rust_manual_ignored": 4
|
||||
},
|
||||
"log": "/tmp/stock-bot-wave17.JfETUx/integration-check-final.log"
|
||||
},
|
||||
{
|
||||
"command": "PIPELINE_TEST_DATABASE_URL=postgres://fixture:fixture@127.0.0.1:32817/stock_bot_safety BACKTEST_TEST_REDIS_URL=redis://127.0.0.1:32818/15 bun run test:postgres",
|
||||
"result": "passed",
|
||||
"tests": 104,
|
||||
"assertions": 719,
|
||||
"log": "/tmp/stock-bot-wave17.JfETUx/integration-postgres.log"
|
||||
},
|
||||
{
|
||||
"command": "bunx tsc --project /tmp/stock-bot-wave17.JfETUx/root-tests-tsconfig.json --noEmit",
|
||||
"result": "passed",
|
||||
"log": "/tmp/stock-bot-wave17.JfETUx/root-tests-typecheck-final.log"
|
||||
},
|
||||
{
|
||||
"command": "Scoped ESLint --no-ignore --max-warnings0 over all new tests/fixtures; scoped Prettier --check over all20 source/test files; git diff --check",
|
||||
"result": "passed",
|
||||
"logs": [
|
||||
"/tmp/stock-bot-wave17.JfETUx/root-test-lint.log",
|
||||
"/tmp/stock-bot-wave17.JfETUx/integration-format.log"
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": "CARGO_BUILD_JOBS=2 bun run --cwd apps/stock/engine build:release",
|
||||
"result": "passed; final addon equals local target/release/libengine.so",
|
||||
"log": "/tmp/stock-bot-wave17.JfETUx/integration-release-build.log"
|
||||
},
|
||||
{
|
||||
"command": "PIPELINE_TEST_DATABASE_URL=postgres://fixture:fixture@127.0.0.1:32817/stock_bot_safety bun test test/postgres/paper-runtime.test.ts test/postgres/paper-http.test.ts test/integration/paper-feed.test.ts test/integration/paper-routes.test.ts test/integration/paper-composition.test.ts scripts/test/native-bindings.test.ts",
|
||||
"result": "passed against final release addon",
|
||||
"tests": 55,
|
||||
"assertions": 481,
|
||||
"log": "/tmp/stock-bot-wave17.JfETUx/integration-release-focused.log"
|
||||
}
|
||||
],
|
||||
"native": {
|
||||
"final_profile": "release",
|
||||
"final_addon_sha256": "ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103",
|
||||
"local_library_matches": true,
|
||||
"rust_source_unchanged": true,
|
||||
"performance_measurements": false
|
||||
},
|
||||
"environment_notes": [
|
||||
"Sandbox PostgreSQL connection refusal required escalation; all disposable-fixture suites passed outside sandbox.",
|
||||
"Sandbox native child tests timed out; only exact identified test process3655975 was terminated and full gate passed outside sandbox.",
|
||||
"NAPI release build spawnSync EPERM required escalation.",
|
||||
"Initial fixture issues corrected: generation test clock, exclusive research dataset end date, strict assertion types and formatting.",
|
||||
"Browser E2E/Python analytics not rerun: no frontend or Python changes. No performance profiling or benchmark measurement."
|
||||
],
|
||||
"limitations": [
|
||||
"No working external vendor quote producer was found; normalized HTTP fixture coverage verifies the boundary, not vendor connectivity. A real provider and declared operational calendars are still required.",
|
||||
"Canonical composition is opt-in; no default change or paper/live activation. Live remains disabled.",
|
||||
"Quote execution, raw prices, trusted built-in target strategies and explicit finite UTC session/cadence policies only. All configured assets require current quote/session readiness.",
|
||||
"Existing explicit loopback auth-disabled mode remains supported and is not authenticated-feed certification.",
|
||||
"Admitted historical recovery retains original prices/timestamps and needs explicit recoverPending; it does not pretend those fills use current quotes.",
|
||||
"Metadata binding is not retained immutable code provenance; R01/R05 own artifacts. Invalid durable inputs remain pending; no auto-skip/capital reset."
|
||||
],
|
||||
"cleanup": {
|
||||
"status": "completed",
|
||||
"development_resources_untouched": true,
|
||||
"worktrees_and_logs_retained": true,
|
||||
"stopped_container_ids": [
|
||||
"ebf9e7c2109562964d1367660f6c58cf46c4899d7c77740bf664674eb3dde124",
|
||||
"d96d9a126e665226aeebc191b5b58e25eb29165cbabb4c099201f01e6364ef7f"
|
||||
]
|
||||
},
|
||||
"next": "Accept/commit S04, then S05 composable multi-signal/regime example. R01/R11 still need ADR-006; performance remains deferred."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ Scheduling source of truth: [manifest entry S04](../manifest.json). No task is a
|
|||
|
||||
## Evidence and root cause
|
||||
|
||||
- **OPS-02 — Needs Investigation:** Paper/live operational readiness is not demonstrated end-to-end. Live is deliberately disabled; preserve that gate until feed, reconciliation and broker-specific recovery are verified. [apps/stock/orchestrator/src/core/ModeManager.ts:33](../../../../apps/stock/orchestrator/src/core/ModeManager.ts#L33); [apps/stock/orchestrator/src/container.ts:152](../../../../apps/stock/orchestrator/src/container.ts#L152).
|
||||
- **FIN-06 — Verified:** Native simulation fills complete requested quantities at the latest price without bar-volume participation; current risk must be enforced at acceptance and fill, including pending exposure. [apps/stock/engine/src/backtest/engine.rs:374](../../../../apps/stock/engine/src/backtest/engine.rs#L374); [apps/stock/engine/src/backtest/engine.rs:414](../../../../apps/stock/engine/src/backtest/engine.rs#L414).
|
||||
- **OPS-02 — Verified:** `MarketDataService.initialize()` creates a Socket.IO client, but `data-ingestion/src/routes/create-routes.ts` mounts no stream producer. The unmounted live route queues an absent handler. Connection logging is not feed readiness.
|
||||
- **FIN-06 — Addressed by F04/F05/S03:** Canonical Rust already enforces quantity/cash/risk and quote capacity. S04 must connect that tested engine to explicit market-data timing and retain its durable recovery, rather than fix or duplicate financial arithmetic. See `execution/CanonicalPaperExecution.ts` and `PostgresCanonicalExecutionRepository.ts`.
|
||||
- **OPS-02 composition evidence — Verified:** Existing composition constructs legacy execution/mode/order gateways; canonical activation requires an isolated graph and a persisted operator/feed gate, not just another boolean in a route.
|
||||
|
||||
## Intended behavior and implementation scope
|
||||
|
||||
|
|
@ -21,13 +22,13 @@ No unrelated refactor, new service or broker activation.
|
|||
|
||||
## Likely files and ownership
|
||||
|
||||
- apps/stock/orchestrator/src/paper/PaperTradingManager.ts
|
||||
- apps/stock/orchestrator/src/services/MarketDataService.ts
|
||||
- apps/stock/orchestrator/src/services/ExecutionService.ts
|
||||
- apps/stock/orchestrator/src/api/rest/
|
||||
- apps/stock/data-ingestion/src/
|
||||
- apps/stock/orchestrator/src/paper/{feed,CanonicalPaperRuntime}.ts
|
||||
- apps/stock/orchestrator/src/execution/{canonical-paper,CanonicalPaperExecution,PostgresCanonicalExecutionRepository}.ts
|
||||
- apps/stock/orchestrator/src/{contracts/paper-runtime,api/rest/paper,container,simple-container,index,routes/create-routes,types}.ts
|
||||
- apps/stock/config/src/schemas/stock-app.schema.ts
|
||||
- test/{integration,postgres,fixtures}/paper-*.ts
|
||||
|
||||
Write locks: paper-runtime. One agent owns this change. Lock names do not override actual overlapping files.
|
||||
Write locks: paper-runtime. Root owns shared contracts/composition/API; disjoint feed and custody slices have one owner each. Lock names do not override actual overlapping files.
|
||||
|
||||
## Dependencies and blockers
|
||||
|
||||
|
|
@ -58,3 +59,24 @@ 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
|
||||
|
||||
Base `c01e96e` contains accepted S03. This wave implements an opt-in canonical composition; no default cutover or trading activation. Inspection found no usable quote producer behind the legacy Socket.IO client: ingestion does not serve that protocol, the live route is not mounted, and its queued handler is absent. Do not manufacture provider readiness. The implemented ingress is an authenticated normalized HTTP frame boundary; a real provider adapter and verified operational calendar remain prerequisites for running it.
|
||||
|
||||
- Rust alone owns matching, financial state and risk. Host control state shares the existing SQL account row lock; no additional service/table. Immutable policy binds target-mode built-ins, explicit raw-price quote series, auxiliary completed-bar manifests/cadence, versioned UTC sessions and account risk boundaries.
|
||||
- Each process generation fences prior hosts. Startup/reconnect disconnects or revokes activation. Initial and persisted human halt stop decisions, submissions and fills without finish/cancel/liquidation/reset. Every drain step rechecks controls under the account lock; old shutdown cannot stop a replacement.
|
||||
- Feed frames carry original physical quote timestamps/sequences and explicit atomic release time. All quotes execute in native key order before the final synchronized decision; new intents cannot fill on those quotes. Completed bars are supplied, never synthesized. Session-open anchored bars may clip at declared session close. Auxiliary observations do not mark prices or create liquidity.
|
||||
- Frame admission persists original receipt/disposition and every input atomically. Exact retries never change health-only/admitted meaning. Physical quote/bar receipts prevent conflicting or recycled observations, including inactive probes. New active frames cannot plan against pending recovery; producer retries after prior request drains.
|
||||
- Fresh transport and every configured asset must be ready. Check the old deadline before refreshing health. Missing/stale/future/regressing/out-of-session data fail closed; no time repairs. A late fresh frame cannot silently resume execution. Native daily/drawdown risk remains authoritative and separate from the host pause.
|
||||
- Previously admitted crash-recovery inputs retain their original times. Activation defaults to `recoverPending:false`; explicit `true` is required for pending historical work. Acknowledgement follows successful recovery and final fresh readiness. Invalid durable work remains pending with diagnostics; never skip/restamp/reset it.
|
||||
- With HTTP authentication enabled, human operator credentials alone activate/halt; verified service credentials may submit feed frames. Existing explicit loopback development auth bypass maps to operator and remains supported; readiness in bypass mode is not authenticated-feed certification. Legacy order/position gateways and WebSocket controls are unavailable in canonical composition. Research uses its existing isolated worker. `/health` is liveness; `/api/paper/readiness` reports actual readiness or explicit unknown state. Live remains disabled.
|
||||
|
||||
Mandatory added scenarios: actual HTTP → built-in SMA → later quote fill → SQL → restart; service activation denial; initial/persisted halt; locked halt race; stale generation/shutdown; idle-before-refresh; stale second asset; pending recovery status; old quote after fresh probe; immutable retry dispositions; explicit historical recovery; cross-session controls; physical observation conflicts; configured capital; canonical/research isolation. No performance work or benchmark is included.
|
||||
|
||||
|
||||
## Validated handoff — 2026-10-23
|
||||
|
||||
Implementation and independent G1/G2/API isolation review accepted; manifest remains `review` until owner acceptance/commit. Full repository and PostgreSQL gates pass; the release-addon suite covers real SMA HTTP-to-fill restart, isolated research, all control regressions and native binding checks. See [wave17 validation](../manifest.json) and [roadmap](../../ROADMAP.md#seventeenth-wave-execution--2026-10-23) for exact commands, counts, hashes and limits.
|
||||
|
||||
Canonical configuration is opt-in at `services.orchestrator.canonicalPaper`, validated before opening connections. `/api/paper/readiness` exposes state; operator `/activate` and `/halt` are separate from trusted producer `/feed/connect`, `/feed/frames`, `/feed/disconnect`. No provider connectivity is claimed and no account was operationally activated. All configured assets currently require covered sessions and fresh quotes; arbitrary callbacks, broker execution and automatic calendar/provider discovery remain outside this slice.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue