docs: close P08 and O02 and record conditional no-go decisions

This commit is contained in:
Boki 2026-10-28 13:10:59 -04:00
parent 8c858b9d5c
commit 1a9f07b285
13 changed files with 323 additions and 43 deletions

View file

@ -1,6 +1,6 @@
# Canonical development backlog
**Current scheduled backlog: 97/97 complete.** No task is ready, claimed, in progress, in review or blocked. Seven conditional extensions remain **unimplemented and deferred**; four merged IDs are redirects. This is not a claim that all 108 retained IDs were implemented. The [completion review below](#completion-review--october-28-2026) records their gates and the final repository check. Do not add new follow-up IDs merely to continue a finished wave.
**Current scheduled backlog: 99/99 complete.** The owner resumed performance and authorized review of all seven conditions. P08 and O02 are implemented; five optional extensions remain deliberately deferred, and four merged IDs are redirects. This is not a claim that all 108 retained IDs were implemented. [Decisions, measurements and validation](../conditional-review.md).
**The original 45/45 scheduled tasks are complete.** The canonical Rust engine, TypeScript research/workbench, bounded worker pool, isolated candidates, AI evidence workflow and human-reviewed paper promotion are validated. Implementation commits: `bbf0dd4`, `26b9726`, `25b5cbf` (R07 measurement `ab08db8`). Six conditional tasks remain deferred; four merged IDs remain redirects. This is scheduled-backlog completion, not live-trading activation.
@ -10,7 +10,7 @@
[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.
**Current total: 108 retained IDs — 97 done, 7 deferred, 4 merged.** RP18 completes the bounded October multi-session pilot; RP01–RP17 add the authorized real-data workflow and its dataset reuse, export and workflow recovery follow-ups. The earlier 68 IDs retain their state. E11 adds seven authorized cleanup tasks and one conditional replay extraction; see the manifest for current scheduling. The original backlog accounted for 55 IDs. F09/P07 added 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.
**Current total: 108 retained IDs — 99 done, 5 deferred, 4 merged.** No task is ready or active. P08/O02 source commits are `70d173a9` / `8c858b9d`. Deferred tasks retain concrete reopen conditions; the earlier blanket performance pause is superseded by the October 28 owner instruction. The manifest owns scheduling and completion evidence.
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.
@ -100,7 +100,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 / deferred | S02, P07; owner resume | — | TypeScript performance/runtime engineering / M |
| [P08 Reduce measured TypeScript strategy decision overhead](tasks/P08.md) | P1 / done | S02, P07 | — | TypeScript performance/runtime engineering / M |
### E8 — Authorized, isolated AI research
@ -116,7 +116,7 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
| Task | Priority / status | Implementation prerequisites | Release gate | Specialist / size |
| --- | --- | --- | --- | --- |
| [O01 Serialize additive schema migrations safely](tasks/O01.md) | P1 / done | None | — | PostgreSQL/backend infrastructure / S |
| [O02 Expose truthful research and paper readiness diagnostics](tasks/O02.md) | P1 / deferred | S04 | — | Infrastructure/observability / M |
| [O02 Expose truthful research and paper readiness diagnostics](tasks/O02.md) | P1 / done | S04 | — | Infrastructure/observability / M |
### E10 — Cleanup and maintainability foundations
@ -146,6 +146,8 @@ R06/R08/R09 and the R07 comparison/measurement are complete. The default support
## Completion review — October 28, 2026
**Historical review before the owner resumed performance. Superseded by the [conditional review](../conditional-review.md) and current manifest counts above.**
The owner requested “commit and continue until backlog is complete”. Rechecking the canonical manifest found 97 completed scheduled tasks, seven deferred items and four merged redirects, with no active or otherwise ready tasks. The review preserves deferred status rather than inventing implementation or silently cancelling scope. The earlier explicit performance pause remains in effect while the owner answers the scope clarification.
| Conditional task | Activation requirement | Current outcome |

View file

@ -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 (owner deferred)"]
P08["P08: Reduce measured TypeScript strategy decision overhead (done)"]
end
subgraph E8["E8: Authorized, isolated AI research"]
A01["A01: Add research-only principals and durable job budgets"]
@ -67,7 +67,7 @@ flowchart TD
end
subgraph E9["E9: Migration and operational safeguards"]
O01["O01: Serialize additive schema migrations safely"]
O02["O02: Expose truthful research and paper readiness diagnostics (conditional)"]
O02["O02: Expose truthful research and paper readiness diagnostics (done)"]
end
C04 --> C06
ADR002 --> F01

View file

@ -1,8 +1,8 @@
{
"schema_version": 1,
"plan_revision": "2026-10-28.138",
"plan_revision": "2026-10-28.142",
"repository_base": "b7aeca4",
"plan_status": "scheduled_complete_conditional_work_pending",
"plan_status": "scheduled_complete_conditions_reviewed",
"execution_authorized": true,
"execution_scope": {
"authorized_by": "Owner: commit and continue with the rest of the tasks till 100%",
@ -23,7 +23,14 @@
"pending_policy_decisions": [
"Simultaneous multi-asset mark/risk semantics before multi-asset default activation",
"Conditional DSL/cache/distributed optimization go/no-go"
]
],
"conditional_extension": {
"authorized_by": "Owner: do what ever is best for all of them + resume performace",
"date": "2026-10-28",
"implemented": ["P08", "O02"],
"reviewed_not_selected": ["D04", "P03", "P05", "P06", "CL21"],
"record": "conditional_review"
}
},
"cleanup_scope": {
"requested_on": "2026-10-26",
@ -125,9 +132,9 @@
{
"id": "ADR-008",
"file": "architecture/decisions/008-performance.md",
"status": "approved_for_scheduled_measurements",
"approved_by": "Owner scheduled-completion instruction; conditional optimization gates unchanged",
"approved_on": "2026-10-24"
"status": "approved_for_measured_local_optimization",
"approved_by": "Owner resumed performance and authorized judgment on all seven conditions; P08 implemented, five optional extensions not selected.",
"approved_on": "2026-10-28"
}
],
"epics": [
@ -789,8 +796,13 @@
"branch": null,
"pull_request": null,
"completed_commit": null,
"blocker": "Only after profiling demonstrates repeated identical feature work; use reviewed incremental calculations directly first.",
"release_gates": []
"blocker": "Reopen only for measured repeated identical feature work across actual consumers, preserving prefix and fit-window identity.",
"release_gates": [],
"last_review": {
"date": "2026-10-28",
"disposition": "not_selected",
"reason": "No-go for now: in the instrumented 15/252 baseline, reviewed SMA calculation took 7\u201310 ms across three sessions; copying/freezing took roughly 2.0\u20132.3 seconds. A shared feature cache does not address the measured cost."
}
},
{
"id": "S01",
@ -1805,8 +1817,13 @@
"branch": null,
"pull_request": null,
"completed_commit": null,
"blocker": "Only after measured repeated dataset admission is a material sweep cost; not a prerequisite for parallel trials.",
"release_gates": []
"blocker": "Reopen with a representative durable batch profile that isolates dataset admission/transfer and a bounded lifecycle proposal.",
"release_gates": [],
"last_review": {
"date": "2026-10-28",
"disposition": "not_selected",
"reason": "No-go for now: current measurements are direct warmed sessions, not repeated durable admission profiles. Reusing resident workers would change the proven one-process/one-request cancellation and isolation lifecycle without an attributable sweep benefit."
}
},
{
"id": "P04",
@ -1854,8 +1871,13 @@
"branch": null,
"pull_request": null,
"completed_commit": null,
"blocker": "Only after measured trade-detail payload/query/render cost; simple summary projections ship in R06.",
"release_gates": []
"blocker": "Reopen for a real slow detail workload, preserving complete stable-sequence export.",
"release_gates": [],
"last_review": {
"date": "2026-10-28",
"disposition": "not_selected",
"reason": "No-go for now: experiments already select compact summaries without trade/OHLC blobs; full retained exports exist. No measured detail-query/transfer/render bottleneck was supplied or established by callback measurements."
}
},
{
"id": "P06",
@ -1876,8 +1898,13 @@
"branch": null,
"pull_request": null,
"completed_commit": null,
"blocker": "Owner go/no-go after representative profiling and explicit prototype budget; no fixed 20%/1.5x magic thresholds.",
"release_gates": []
"blocker": "Reopen only with representative callback-bound screening demand, a small supported subset and explicit bounded prototype budget.",
"release_gates": [],
"last_review": {
"date": "2026-10-28",
"disposition": "not_selected",
"reason": "No-go for now: one Rust financial kernel already serves TypeScript callbacks. Local state-handling optimization provides a measured gain without a second strategy representation. Current evidence does not justify the cost and restricted expressiveness of a DSL."
}
},
{
"id": "P07",
@ -1923,7 +1950,7 @@
"epic": "E7",
"priority": "P1",
"severity": "High",
"status": "deferred",
"status": "done",
"dependencies": ["S02", "P07"],
"decision_dependencies": [],
"task_file": "backlog/tasks/P08.md",
@ -1935,9 +1962,18 @@
"assignment": null,
"branch": null,
"pull_request": null,
"completed_commit": null,
"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": []
"completed_commit": "70d173a908eadac53941cc931b1f6cd3ca4070af",
"blocker": null,
"release_gates": [],
"concrete_write_scope": [
"scripts/benchmark-research.ts",
"scripts/benchmark-sma.ts",
"scripts/test/benchmark-sma.test.ts",
"apps/stock/orchestrator/src/strategies/strategy-decision.ts",
"test/integration/strategy-state-copy.test.ts"
],
"completion_evidence": "conditional-review.md",
"integration_state": "accepted"
},
{
"id": "A01",
@ -2082,7 +2118,7 @@
"epic": "E9",
"priority": "P1",
"severity": "High",
"status": "deferred",
"status": "done",
"dependencies": ["S04"],
"decision_dependencies": [],
"task_file": "backlog/tasks/O02.md",
@ -2094,9 +2130,26 @@
"assignment": null,
"branch": null,
"pull_request": null,
"completed_commit": null,
"blocker": "Optional cross-service monitoring expansion; required run diagnostics belong to W01/F07 and paper readiness to S04.",
"release_gates": []
"completed_commit": "8c858b9d5ca4675d064c4a853b0e9575a84872cb",
"blocker": null,
"release_gates": [],
"concrete_write_scope": [
"apps/stock/config/src/contracts/diagnostics.ts",
"apps/stock/orchestrator/src/routes/create-routes.ts",
"apps/stock/orchestrator/src/backtest/BacktestRunner.ts",
"apps/stock/orchestrator/src/backtest/ResearchBacktestPool.ts",
"apps/stock/web-api/src/services/monitoring.service.ts",
"apps/stock/web-api/src/routes/monitoring.routes.ts",
"apps/stock/web-api/src/routes/create-routes.ts",
"apps/stock/web-api/src/types/monitoring.types.ts",
"apps/stock/web-app/src/features/monitoring/",
"libs/core/logger/src/index.ts",
"test/integration/monitoring-readiness.test.ts",
"test/integration/monitoring-readiness-ui.test.tsx",
"libs/core/queue/src/queue.ts"
],
"completion_evidence": "conditional-review.md",
"integration_state": "accepted"
},
{
"id": "CL01",
@ -2906,11 +2959,16 @@
"assignment": null,
"branch": null,
"completed_commit": null,
"blocker": "Conditional: upcoming replay preparation change and explicit owner activation.",
"blocker": "Reopen alongside a concrete replay preparation change that benefits from a private extraction.",
"release_gates": [],
"integration_state": "not_started",
"integration_base": "700ee09c",
"completion_evidence": "orchestrator-engine-cleanup.md"
"completion_evidence": "orchestrator-engine-cleanup.md",
"last_review": {
"date": "2026-10-28",
"disposition": "not_selected",
"reason": "No-go for now: no concrete calendar/timeframe change needs a replay-preparation split. Cosmetic movement of validated financial replay adds regression exposure without delivering a current capability."
}
},
{
"id": "RP01",
@ -9871,14 +9929,18 @@
}
},
"completion_summary": {
"date": "2026-10-24",
"scheduled_complete": 45,
"scheduled_total": 45,
"date": "2026-10-28",
"scheduled_complete": 99,
"scheduled_total": 99,
"scheduled_percent": 100,
"deferred_conditional": 6,
"deferred_conditional": 5,
"merged_redirects": 4,
"implementation_commit": "25b5cbf481e195810bc123ada50ee129a1f55e27",
"scope": "All scheduled work accepted. Deferred gates, unsupported multi-asset policy, real paper/live activation and account migration remain unchanged."
"retained_total": 108,
"implementation_commits": {
"P08": "70d173a908eadac53941cc931b1f6cd3ca4070af",
"O02": "8c858b9d5ca4675d064c4a853b0e9575a84872cb"
},
"scope": "All selected work complete. All seven conditions reviewed; five optional extensions intentionally remain deferred. Performance pause superseded by explicit resumption. Financial policy and paper/live activation gates unchanged."
},
"completion_review": {
"date": "2026-10-28",
@ -9920,6 +9982,126 @@
"build_types_contracts_lint_secrets": "passed",
"native_binary_sha256": "df0ecbd5c3772d7e8aeb0226b40ae290cfaddf9d87fb3a7375f2a31c2acf05e5",
"limits": "No new browser/PostgreSQL suites, performance measurements, real-data research, paper/live activation or independent review in this documentation-only audit. RP32 retains its prior source-scoped 26-test browser gate."
},
"superseded_by": "conditional_review"
},
"conditional_review": {
"date": "2026-10-28",
"authorization": "Owner: do what ever is best for all of them + resume performace",
"scope": "Review all seven remaining conditions. Resume P08 measurement and semantics-preserving optimization; correct truthful diagnostics under O02. Other extensions require demonstrated value, not task-count completion. No paper/live activation or financial policy changes.",
"performance_pause": "Superseded by this explicit owner instruction.",
"reviewer": "Root self-review; no independent agent review claimed.",
"decisions": {
"D04": {
"disposition": "not_selected",
"reason": "No-go for now: in the instrumented 15/252 baseline, reviewed SMA calculation took 7\u201310 ms across three sessions; copying/freezing took roughly 2.0\u20132.3 seconds. A shared feature cache does not address the measured cost.",
"reopen_when": "Reopen only for measured repeated identical feature work across actual consumers, preserving prefix and fit-window identity."
},
"P03": {
"disposition": "not_selected",
"reason": "No-go for now: current measurements are direct warmed sessions, not repeated durable admission profiles. Reusing resident workers would change the proven one-process/one-request cancellation and isolation lifecycle without an attributable sweep benefit.",
"reopen_when": "Reopen with a representative durable batch profile that isolates dataset admission/transfer and a bounded lifecycle proposal."
},
"P05": {
"disposition": "not_selected",
"reason": "No-go for now: experiments already select compact summaries without trade/OHLC blobs; full retained exports exist. No measured detail-query/transfer/render bottleneck was supplied or established by callback measurements.",
"reopen_when": "Reopen for a real slow detail workload, preserving complete stable-sequence export."
},
"P06": {
"disposition": "not_selected",
"reason": "No-go for now: one Rust financial kernel already serves TypeScript callbacks. Local state-handling optimization provides a measured gain without a second strategy representation. Current evidence does not justify the cost and restricted expressiveness of a DSL.",
"reopen_when": "Reopen only with representative callback-bound screening demand, a small supported subset and explicit bounded prototype budget."
},
"CL21": {
"disposition": "not_selected",
"reason": "No-go for now: no concrete calendar/timeframe change needs a replay-preparation split. Cosmetic movement of validated financial replay adds regression exposure without delivering a current capability.",
"reopen_when": "Reopen alongside a concrete replay preparation change that benefits from a private extraction."
}
},
"evidence": "measurements/p08-state-copy.json",
"implemented": {
"P08": "70d173a908eadac53941cc931b1f6cd3ca4070af",
"O02": "8c858b9d5ca4675d064c4a853b0e9575a84872cb"
},
"status": "complete",
"remaining_deferred": ["D04", "P03", "P05", "P06", "CL21"],
"validation": {
"source_commit": "8c858b9d5ca4675d064c4a853b0e9575a84872cb",
"repository_check": {
"command": "CARGO_BUILD_JOBS=2 bun run check",
"passed": true,
"tooling": 171,
"tooling_assertions": 14966,
"utils": 43,
"calculations": 44,
"integration": 1563,
"integration_assertions": 11745,
"integration_skipped": 14,
"rust": 150,
"rust_ignored": 4,
"build_types_contracts_lint_secrets": "passed"
},
"postgres": {
"passed": 284,
"assertions": 2923,
"disposable_only": true
},
"browser_full": {
"passed": 27,
"assertions": 971
},
"browser_committed_release": {
"passed": 2,
"filtered_skips": 25,
"assertions": 16,
"scope": "Affected cancellation/failure and monitoring workflows on committed source after a same-origin production frontend rebuild."
},
"release_regressions": {
"passed": 90,
"assertions": 1383,
"native_sha256": "68f0134e166201cafd773d702c45f8d06870343a7d5e90ffb21df398c36f1cec"
},
"authored_tooling_test_strict_types": "passed via /tmp/stock-bot-p08-tsconfig.json",
"review": "Root self-review; no independent agent review claimed.",
"corrections": [
"Native subprocess tests rerun outside sandbox after IPC timeouts.",
"Browser fixture now permits the exact read-only monitoring paths; prior failure-message expectations now include actual phase.",
"One extra filtered browser invocation initially used a frontend overwritten by the normal local build; rebuilding with NODE_ENV=production and an empty VITE_API_BASE_URL resolved it without source changes.",
"Final cancellation-persistence observer cause corrected and covered by unit regression; affected browser workflows rerun against committed source."
],
"limits": [
"No storage/queue/cold-job throughput claim from direct warmed strategy measurements.",
"Full matrix single-owner timing is noisy; interleaved confirmation is retained separately.",
"No allocation counts, fresh native readiness probe, paper/live activation, real-data experiment, push or PR.",
"Five conditional extensions remain unimplemented and deferred.",
"Disposable PostgreSQL/Redis containers stopped and removed; .env untouched."
],
"logs": [
{
"path": "/tmp/stock-bot-conditional-accepted-check.log",
"sha256": "3df773d9bc099a94129d7c1d5d567bd383ed0772cf260578786f3aac8ebed724"
},
{
"path": "/tmp/stock-bot-conditional-postgres.log",
"sha256": "037a203c2923b29bd9563473154c71c1339220526c466c098a89befc98aaf86b"
},
{
"path": "/tmp/stock-bot-conditional-final-browser.log",
"sha256": "f8d6bdba5cabc5b84449f6987c86292ff7b6e7990a07c270546f999b857c4122"
},
{
"path": "/tmp/stock-bot-conditional-committed-browser-corrected.log",
"sha256": "0e5d1307f25bc53ef30dfc387e8efe9ea8fb431587d0dce9061c7cbcbdef5799"
},
{
"path": "/tmp/stock-bot-conditional-release-tests.log",
"sha256": "2ea1e355736b13b654951a4a6e76db8b182f46760a51940f4e9758a6e46b9284"
},
{
"path": "/tmp/stock-bot-conditional-authored-types.log",
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
]
}
}
}

View file

@ -45,7 +45,7 @@ Parallelism: Deferred; sole replay owner when activated.
- Build native addon; bun test test/integration/native-replay.test.ts test/integration/native-replay-report.test.ts
- Exact event-order/checkpoint equality fixtures
Use isolated worktrees/build outputs and disposable safety databases/Redis only. Never rebaseline financial fixtures to hide changed behavior. Integrator runs repository checks on the combined source. Performance work remains deferred; no speed claims are part of acceptance.
Use isolated worktrees/build outputs and disposable safety databases/Redis only. Never rebaseline financial fixtures to hide changed behavior. Integrator runs repository checks on the combined source. This extraction is not performance work; no speed claims are part of its acceptance.
## Risks and definition of done
@ -53,3 +53,7 @@ Changing economic event ordering during a cosmetic move; intentionally deferred
Done requires scoped tests, independent reviewer acceptance, integration verification, and a focused commit. The manifest owns status and evidence; implementers do not edit it. Root records each completed commit in the next bookkeeping update; the task completion commit includes its tests/reviewer evidence, avoiding self-referential hashes. Unrelated prior CL01–CL13 review status remains unchanged.
## Conditional review — October 28, 2026
No-go for now: no concrete calendar/timeframe change needs a replay-preparation split. Cosmetic movement of validated financial replay adds regression exposure without delivering a current capability. Reopen alongside a concrete replay preparation change that benefits from a private extraction. Status remains **deferred**, not implemented or silently cancelled. The owner authorized judgment on all remaining conditions and explicitly resumed performance work. [Current review](../../conditional-review.md). Earlier audit findings above are historical evidence: F02–F07/S06 already resolved competing financial cores and the old insertion queue; they are not reasons to implement this extension now.

View file

@ -60,3 +60,7 @@ 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.
## Conditional review — October 28, 2026
No-go for now: in the instrumented 15/252 baseline, reviewed SMA calculation took 7–10 ms across three sessions; copying/freezing took roughly 2.0–2.3 seconds. A shared feature cache does not address the measured cost. Reopen only for measured repeated identical feature work across actual consumers, preserving prefix and fit-window identity. Status remains **deferred**, not implemented or silently cancelled. The owner authorized judgment on all remaining conditions and explicitly resumed performance work. [Current review](../../conditional-review.md). Earlier audit findings above are historical evidence: F02–F07/S06 already resolved competing financial cores and the old insertion queue; they are not reasons to implement this extension now.

View file

@ -66,3 +66,11 @@ 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.
## Activated scope — October 28, 2026
Owner authorized judgment on all remaining conditions. Implement a read-only composite snapshot on the existing monitoring API, using the actual research queue, SQL attempts/leases, existing pool/runner state, artifact identity and existing paper readiness. Missing observations remain unavailable/unknown. A readable native binary or a BullMQ worker is **not proof of native execution**: report `unverified-until-run`, rather than launching synthetic jobs or adding a health-probe worker protocol. Research status remains unknown when prerequisites are observed but execution has not been probed. This is a deliberate truthful limitation, not a ready signal.
The UI shows observation time, explicit refresh/loading/error/retry, local run/attempt/strategy phase, expired leases, paper freshness/recovery/halt and live-disabled. Existing deployment-specific readiness remains authoritative; no activation or recovery is performed by monitoring. Capture the runner's actual phase in its existing fenced failure string and reuse logger redaction, without migrations or a second execution history.
Correct unavailable cache/queue/service/metric values; include the research queue and avoid observer-created workers. Remove the hardcoded Redis diagnostic route. Original WEB-02 controls/polling defects and OPS-02 legacy composition paths above are historical: W01/S04/S06 already addressed those paths. No broker, live capability, financial policy or worker lifecycle change. Root self-review and repository/recovery regressions are used in this solo continuation; no independent agent review is claimed.

View file

@ -58,3 +58,7 @@ 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.
## Conditional review — October 28, 2026
No-go for now: current measurements are direct warmed sessions, not repeated durable admission profiles. Reusing resident workers would change the proven one-process/one-request cancellation and isolation lifecycle without an attributable sweep benefit. Reopen with a representative durable batch profile that isolates dataset admission/transfer and a bounded lifecycle proposal. Status remains **deferred**, not implemented or silently cancelled. The owner authorized judgment on all remaining conditions and explicitly resumed performance work. [Current review](../../conditional-review.md). Earlier audit findings above are historical evidence: F02–F07/S06 already resolved competing financial cores and the old insertion queue; they are not reasons to implement this extension now.

View file

@ -63,3 +63,7 @@ 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.
## Conditional review — October 28, 2026
No-go for now: experiments already select compact summaries without trade/OHLC blobs; full retained exports exist. No measured detail-query/transfer/render bottleneck was supplied or established by callback measurements. Reopen for a real slow detail workload, preserving complete stable-sequence export. Status remains **deferred**, not implemented or silently cancelled. The owner authorized judgment on all remaining conditions and explicitly resumed performance work. [Current review](../../conditional-review.md). Earlier audit findings above are historical evidence: F02–F07/S06 already resolved competing financial cores and the old insertion queue; they are not reasons to implement this extension now.

View file

@ -56,3 +56,7 @@ 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.
## Conditional review — October 28, 2026
No-go for now: one Rust financial kernel already serves TypeScript callbacks. Local state-handling optimization provides a measured gain without a second strategy representation. Current evidence does not justify the cost and restricted expressiveness of a DSL. Reopen only with representative callback-bound screening demand, a small supported subset and explicit bounded prototype budget. Status remains **deferred**, not implemented or silently cancelled. The owner authorized judgment on all remaining conditions and explicitly resumed performance work. [Current review](../../conditional-review.md). Earlier audit findings above are historical evidence: F02–F07/S06 already resolved competing financial cores and the old insertion queue; they are not reasons to implement this extension now.

View file

@ -4,13 +4,13 @@ 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). **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.
Scheduling source of truth: [manifest P08](../manifest.json). **Resumed by the owner, 2026-10-28.** Profile and measure before optimization. Exact proposed application scope: `strategies/strategy-decision.ts` strict JSON copying; benchmark tooling in `scripts/benchmark-research.ts` and private `scripts/benchmark-sma.ts`, with focused tests. No SMA arithmetic/state-schema changes or native/durable boundary changes.
## Evidence and root cause
**PER-02 — Verified aggregate cost; individual causes need profiling.** S02's release comparison replays exactly the same financial decisions and IDs. For 10,000 total bars, recorded decisions versus SMA callbacks took 1,091→1,467 ms (5/15, one owner) and 1,018→2,351 ms (15/252, one owner). With ten assets/ten owners, 15/252 took 594→1,681 ms. All 48 timed sessions preserve complete financial hashes; repeat/reversed-owner runs preserve diagnostics. These are warmed synthetic workloads, not durable-job throughput or pure callback/NAPI measurements.
Potential contributors are the [host staging boundary](../../../../apps/stock/orchestrator/src/backtest/strategy-runtime.ts#L205), strict JSON copying/freezing, [per-callback SMA state parsing](../../../../apps/stock/orchestrator/src/strategies/canonical-sma.ts#L128), bounded history and [reviewed trailing calculations](../../../../libs/calculations/src/indicators/window-statistics.ts#L50). The aggregate difference does not attribute cost among them. Larger windows also change decisions and fills; compare each strategy with its own exact recorded control, not the two periods as identical economics.
Potential contributors are the [host staging boundary](../../../../apps/stock/orchestrator/src/strategies/strategy-decision.ts#L154), strict JSON copying/freezing, [per-callback SMA state parsing](../../../../apps/stock/orchestrator/src/strategies/canonical-sma.ts#L90), bounded history and [reviewed trailing calculations](../../../../libs/calculations/src/indicators/window-statistics.ts#L50). The aggregate difference does not attribute cost among them. Larger windows also change decisions and fills; compare each strategy with its own exact recorded control, not the two periods as identical economics.
Raw evidence/harness/source identity: `manifest.json` → `fifteenth_wave_validation.performance`; [roadmap](../../ROADMAP.md#fifteenth-wave-execution--2026-10-23). Retained local harness: `/tmp/stock-bot-wave15.zi3GmP/sma-benchmark.ts`.
@ -33,6 +33,14 @@ Code prerequisites: S02 accepted/integrated, P07 complete. No additional policy
- `sma_recorded_decision_parity` compares identical captured decision IDs and complete financial outputs for 5/15 and 15/252, with 1/1, 10/2 and 10/10 asset/owner shapes. Fresh retries and reversed program order preserve diagnostic/RNG/state hashes. Retain raw repeated measurements and the exact baseline/candidate artifacts.
- Profile identifies the removed cost. Counterbalance baseline/candidate runs on the same host/release addon and configurations; show repeatable end-to-end improvement larger than observed run-to-run variation on both 15/252 owner-dense workloads, with the smaller workloads checked for regression. Do not claim an optimization from changed economics, instrumentation overhead or host drift. If no safe local improvement is demonstrated, hand off the blocker/proposal rather than mark implementation complete.
- Preserve all `canonical-sma`, `strategy-runtime`, `native-replay`, worker and runtime tooling regression tests. Add a focused regression for each changed state/validation path, including retained mutable references, malformed JSON, callback failure after prior owners staged, native rejection and malformed/ambiguous admission feedback as relevant. Accessors must not execute; prototype/cycle/symbol/sparse/non-finite/negative-zero rejection and future-information isolation remain intact. No unstable wall-time assertions in unit tests.
- Strict TypeScript for new test/tooling sources, scoped lint/format, full `bun run check`, final release verification and G2 recovery if worker/durable boundaries change. Independent reviewer signs off both invariants and measurement methodology.
- Strict TypeScript for new test/tooling sources, scoped lint/format, full `bun run check`, final release verification and G2 recovery if worker/durable boundaries change. Root records invariant and measurement self-review for this solo continuation; independent review is not claimed.
Risks: accidental mutable aliasing, skipped validation, changed floating-point crossover arithmetic, committing partial owner state, misleading benchmark attribution. Revert a failed optimization without weakening economic policy or deleting reviewed helpers. Definition of done: focused reviewed patch, passing gates and repeatable exact-economics measurements; root acceptance and explicit commit authorization remain separate.
## Implementation and measurement — October 28, 2026
The existing benchmark command now accepts `--sma` and `--sma --measure`; its private helper retains exact decision tapes, economic/provenance/diagnostic hashes, reversed-owner retries and all six shapes. Strict JSON copying now optionally freezes copied containers during the same traversal; it still checks every descriptor and detaches every alias. No SMA schema, crossover arithmetic, native contract or durable transaction changed.
[Raw measurements](../../measurements/p08-state-copy.json) retain a full ABBA matrix (eight samples per variant/mode/shape) and a separate CPU-2 BAAB confirmation. Full-matrix 15/252 medians: one owner 2,188→2,079 ms (noisy overlap), ten owners 1,534→1,386 ms. Do not advertise the noisy single-owner median as a reliable universal gain. The interleaved confirmation has four samples per variant/shape: one owner 2,422→1,845 ms, ten owners 1,541→1,343 ms; candidate and baseline sample ranges do not overlap in either. Recorded decisions, financial output, diagnostic state/RNG and all configuration hashes match across variants. These are warmed synthetic sessions, not cold jobs, database/queue throughput or pure NAPI crossing timings. No concurrent test/build ran during either retained comparison.
Separate instrumentation identifies copy/freezing as the removed work; it includes timer overhead and makes no allocation-count claim. Small-window full-matrix medians show no measured regression beyond variation. Root self-review checks mutation rejection, owner isolation and commit-after-ack; independent review is not claimed in this solo continuation. Full verification and final release checks are recorded in the manifest once passed.