docs: close P08 and O02 and record conditional no-go decisions
This commit is contained in:
parent
8c858b9d5c
commit
1a9f07b285
13 changed files with 323 additions and 43 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue