feat(research): add canonical session reporting and analytics
This commit is contained in:
parent
1e164450c3
commit
3838295eec
28 changed files with 2402 additions and 47 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Revised development roadmap
|
||||
|
||||
Baseline `b7aeca4` · execution 2026-10-23 · **F09/P07 committed; F08 in progress**
|
||||
Baseline `b7aeca4` · execution 2026-10-23 · **F09/P07 committed; F08 validated, uncommitted**
|
||||
|
||||
Authorization update: the owner accepted the validated performance work and requested commit plus backlog continuation. F09/P07 are committed as `e3bd722`; F08 historical reporting is now authorized under ADR-002/003/004. No other ADR or multi-asset mark policy is approved. New implementation commits, pushes, PRs and trading/default-engine operations remain outside this continuation's scope.
|
||||
|
||||
|
|
@ -317,6 +317,29 @@ Account-session samples follow all equal-time observations without changing the
|
|||
|
||||
F08 adds a canonical analytics DTO beside the existing result contract. It does not fabricate the legacy DTO's per-position mark/average/P&L fields or infer round trips from fills. R05 retains persisted/public-result migration and default cutover. Existing readers/UI remain compatibility gates. No new financial policy, cache/DSL, journal deletion or unrelated per-step performance change is included.
|
||||
|
||||
**Validated handoff:** F08 is `review` / `validated_uncommitted`. Root integrated all 22 owner files with exact independently reviewed hashes and added a real native → worker → analytics composition test. The planning commit is `1e16445`; no F08 implementation commit has been made.
|
||||
|
||||
- Rust records account-session equity after equal-time observations and unions actual occupied intervals, including open positions at termination. Restore reconstructs the same facts without changing financial event IDs, checkpoints or existing trace/projection output.
|
||||
- Native `report()` and the existing worker transport expose the versioned facts. The additive TypeScript adapter reuses reviewed calculations with explicit annualization/risk-free policy, partial-period exclusion and nullable unsupported metrics. Shared calculations retain old defaults for old callers; exactly constant returns and zero terminal-equity CAGR now have pinned edge-case tests.
|
||||
- Repository build, typecheck, contract, audit and lint gates passed, with 72 tooling, 43 utility, 44 calculation and 144 Rust tests. Four existing manual Rust benchmarks remain ignored. The initial integration run exposed missing explicit hold decisions in the new composition fixture; after that test-only correction, **375 integration tests / 3,345 assertions passed**. Strict test TypeScript, scoped ESLint/Prettier/rustfmt and diff checks passed. Disposable PostgreSQL/Redis recovery suites passed **58 tests / 345 assertions** before and after integration. The release addon passed **39 focused native/worker/analytics tests / 703 assertions**. Counts overlap; browser/Python boundaries did not change and those suites were not rerun.
|
||||
|
||||
Release measurements used six synthetic workloads with **10,000 total bars**, one asset/owner or ten assets/two owners, and no-trade/sparse/turnover strategies. The first candidate appeared 33–44% slower than the early baseline, including unchanged TypeScript callback/JSON phases. Shared host load varied materially. A contemporaneous rerun of the exact unchanged F09 release reproduced that slowdown; 128 relevant control source files match `e3bd722`. All complete result and financial hashes agree. Retain both sets of evidence; this is not a speedup claim.
|
||||
|
||||
| Workload | Early F09 median | Contemporaneous F09 control | F08 median | F08 vs control |
|
||||
| --- | ---: | ---: | ---: | ---: |
|
||||
| No trade, 1 asset / 1 owner | 722 ms | 1,050 ms | 1,037 ms | −1.2% |
|
||||
| No trade, 10 assets / 2 owners | 301 ms | 422 ms | 413 ms | −2.2% |
|
||||
| Sparse, 1 asset / 1 owner | 788 ms | 1,137 ms | 1,125 ms | −1.0% |
|
||||
| Sparse, 10 assets / 2 owners | 425 ms | 589 ms | 582 ms | −1.3% |
|
||||
| Turnover, 1 asset / 1 owner | 1,425 ms | 1,994 ms | 2,009 ms | +0.7% |
|
||||
| Turnover, 10 assets / 2 owners | 1,820 ms | 2,432 ms | 2,426 ms | −0.3% |
|
||||
|
||||
Each median has four fresh-session samples across two processes. A separate counterbalanced comparison of projection/report output passed all **48 sessions**, exact repeated report/analytics hashes and an independent integer-cent oracle. Removing reporting fields and normalizing the format discriminator to `projection` yields the identical complete projection. Report finalization medians were 0.24–6.77 ms higher; analytics took 0.50–1.28 ms. These fixtures have only one partial account period: they measure export/occupancy and minimal analytics, not long histories of session statistics, durable research throughput or empty NAPI cost. There is no demonstrated material replay regression on these workloads, and no stable-host SLA is claimed.
|
||||
|
||||
Raw samples, source/artifact hashes, commands and review evidence are in `manifest.json` → `thirteenth_wave_validation`, with retained files under `/tmp/stock-bot-wave13.KfvceG/`. Only the two exact disposable test containers were stopped; development services were untouched. Source worktrees and logs remain.
|
||||
|
||||
Limits: sampled drawdown is not intraday maximum; marks are last available without per-session freshness certification; benchmark-dependent and round-trip statistics remain null with reasons. Sequential equal-time marks can still latch intermediate risk halts. R05 retains its owner policy gate and public/persisted result cutover. **Next after acceptance: S01 stateful TypeScript strategy decisions**, requiring ADR-005 approval; R01/R11 require ADR-006. No pending decision, default cutover, push, PR or trading operation was implicitly approved.
|
||||
|
||||
## Deferred and rejected
|
||||
|
||||
Conditional: shared feature cache D04; cross-trial resident datasets P03; large-detail pagination/storage P05; tiny DSL P06; expanded cross-service monitoring O02. Each has a measured/real-need trigger and is not a prerequisite for scheduled work.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue