docs: close third wave and authorize safe backtest submission

This commit is contained in:
Boki 2026-10-22 16:33:37 -04:00
parent 2e851ec351
commit 5eb0985057
3 changed files with 447 additions and 26 deletions

View file

@ -1,8 +1,8 @@
# Revised development roadmap
Baseline `b7aeca4` · reviewed 2026-10-22 · **Second wave committed; O01/P01 continuation authorized; see manifest execution_scope**
Baseline `b7aeca4` · reviewed 2026-10-22 · **Third wave committed; W03 continuation authorized; see manifest execution_scope**
Authorization update: the first and second waves are independently reviewed, validated and committed. The owner's “do all the commits and continue” authorizes the second-wave closeout and continuation with next-ready O01/P01. Other tasks and economic/timing/trust-model decisions remain gated. Third-wave implementation commits, pushes, PRs and trading operations are not authorized.
Authorization update: the first three waves are independently reviewed, validated and committed. The owner's “commit and start the next wave” authorizes the O01/P01 closeout and continuation with next-ready W03. Other tasks and economic/timing/trust-model decisions remain gated. Fourth-wave implementation commits, pushes, PRs and trading operations are not authorized.
## Strategy and review outcome
@ -81,7 +81,7 @@ Completed wave; the table records its original rationale. Exact prompts, paths,
Recommend **3 simultaneous implementers**, reserving one slot for coordination/independent review. Start C01 + C03 + W01; rotate C04 into the first freed slot, or start C04 first if runtime containment is the immediate operational need. These four have no mutual code dependencies and disjoint writable files. Four concurrent implementers are technically possible but not recommended without separate review capacity.
Next wave: O01 and P01 are authorized. F01/D01 still require their ADR approvals. W04 remains blocked on W03/O01; subsequent work is not included in this execution scope.
O01/P01 are committed. W03 is the authorized next workbench task; it separates saving definitions from repeat-safe run submission. F01/D01 still require their ADR approvals. W04 remains blocked on W03; subsequent work is not included in this execution scope.
## Second-wave handoff — 2026-10-22
@ -103,6 +103,30 @@ Native subprocess builds/IPC and fixture networking required sandbox escalation.
Limits: composition guards are not an untrusted-code sandbox; same-bar execution, canonical Rust accounting and owner-aware funding remain future tasks. ADR-002/003/004 still gate F01, and ADR-007 gates AI isolation. No push, PR or trading operation occurred. Subsequent O01/P01 work is tracked separately in the manifest.
## Third-wave handoff — 2026-10-22
O01 and P01 are independently reviewed and `validated_committed`: O01 `bba5aa1`, P01 `2e851ec`. Four implementation/test files were integrated from isolated worktrees under `/tmp/stock-bot-wave3.VjJvWX/`. The owner subsequently authorized W03 continuation.
- **O01:** Startup migrations acquire one transaction-scoped advisory lock on the same client before table initialization, discovery, checks, application and recording. The additive allowlist and SQL scripts are unchanged. Real PostgreSQL tests prove competing-client blocking, SQL/record failure rollback and retry, destructive-script exclusion, and preservation of saved runs, datasets, ledger and checkpoints.
- **P01:** `bun run scripts/benchmark-research.ts` runs a tiny deterministic self-test; `--measure` runs 1k/10k total-bar workloads over 1/10 assets. Three SMA configurations repeat twice per fresh process, with two processes per workload. Source/artifact/runtime/host/seed identities, raw phases, result bytes, RSS and economic hashes are retained. Existing dataset benchmarking is unchanged; no engine or financial behavior changed.
Combined gates passed: `CARGO_BUILD_JOBS=2 bun run check` (58 tooling, 43 utility, 35 calculation, 293 integration and 37 Rust tests; zero failures), plus `bun run test:postgres` (51 tests, 301 assertions). The four new migration cases and four benchmark cases are included in those totals. Explicit ESLint on all four files, standalone strict benchmark TypeScript checking and `git diff --check` also passed. Temporary PostgreSQL/Redis containers and their disposable data were removed afterward; development services were untouched. Worktrees and local measurement artifacts are retained.
Release measurements on Linux/x64, Ryzen 9 9950X3D, Bun 1.2.17 / rustc 1.88.0:
| Total bars / assets | Median whole-trial ms | Median bars/s |
| --- | --- | --- |
| 1,000 / 1 | 20.4 | 48,962 |
| 1,000 / 10 | 17.4 | 57,419 |
| 10,000 / 1 | 193.7 | 51,631 |
| 10,000 / 10 | 167.3 | 59,769 |
Whole-trial timing includes native construction/load/run, JS parsing, validation and hashing, but excludes fresh-process startup and initial dataset preparation (reported separately). All 48 trials reproduced economic hashes. Release addon SHA-256: `324f1e18de495791e9e53c4e36be39d0b165a11e13e9bcd82f5ca2b22d014674`. Raw timings and metadata: `/tmp/stock-bot-wave3.VjJvWX/research-release.json`; durable summary and hashes are in the manifest. The subsequent full check rebuilt the debug addon; its separate identity is also recorded.
These are single-host synthetic baseline measurements, not a speedup claim or financial certification. Reused JS inputs still reload the one-shot native engine each trial; native run includes serialization and logging. Native execution dominates the measured phases, but no internal bottleneck attribution is claimed. Callbacks, shared caches, queue/storage latency, allocation counts and parallel simulation remain explicitly unmeasured. 100k is opt-in and was not run. Linux peak RSS uses `/proc/self/status` VmHWM after Bun's `maxRSS` counter proved unreliable; unsupported platforms report unavailable.
No DSL, cache, scheduler or new service is justified by this wave. Same-bar execution and canonical ownership/funding remain gated future work. O01/P01 were committed with owner approval; no pushes, PRs or trading operations occurred.
## 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.