601 lines
112 KiB
Markdown
601 lines
112 KiB
Markdown
# Revised development roadmap
|
||
|
||
Baseline `b7aeca4` · execution 2026-10-24 · **R12 committed; retained-input R06/R07 experiment components validated and uncommitted**
|
||
|
||
Authorization update: the owner requested “comit and continue”. R12 is committed as `30accfc`; **34/45 scheduled tasks are committed**. R06/R07 components use the accepted retained-input R05 runner with pinned preview, atomic admission and same-experiment UI contracts. Full R05 remains partial; this slice excludes failed-trial retry, cross-experiment comparisons and all performance work. New-wave commits, pushes, PRs and trading/default-engine operations remain outside this continuation's scope.
|
||
|
||
## Strategy and review outcome
|
||
|
||
Use TypeScript for strategies, research and the web product; one Rust kernel owns money, risk, matching and replay. Preserve durable decisions/checkpoints, transactional execution, frozen datasets, reviewed calculations and failure-oriented tests.
|
||
|
||
The skeptical review established 43 scheduled tasks, 5 conditional tasks and 4 merged redirects. F09/P07/P08 added three IDs; the owner subsequently deferred P08. The current plan has **45 scheduled + 6 deferred/conditional + 4 merged = 55 retained IDs**. See [review findings and dispositions](REVIEW.md), [complete index](backlog/README.md) and [canonical manifest](backlog/manifest.json).
|
||
|
||
The existing web workbench improves during engine migration. Legacy results remain labelled; fixing controls or terminal valuation does not make same-bar economics trustworthy. C06 blocks shared-runtime legacy research rather than building another soon-to-be-retired simulator runtime.
|
||
|
||
## Decisions to approve
|
||
|
||
| Decision | Direction | Approval |
|
||
| --- | --- | --- |
|
||
| [ADR-001](architecture/decisions/001-ownership.md) | TS product/strategy code; Rust financial authority; retain monolith and workers | User-mandated |
|
||
| [ADR-002](architecture/decisions/002-financial-policy.md) | Maintained checked decimal; 8-place half-up postings; authoritative remaining cost; owner books from day one; initial cash-funded long-only account | Approved by owner, 2026-10-22 |
|
||
| [ADR-003](architecture/decisions/003-time-and-datasets.md) | Availability/event phases; open-only next-interval matching; explicit zero-latency convention; mark-open terminal policy; account risk-session clock | Approved by owner, 2026-10-22 |
|
||
| [ADR-004](architecture/decisions/004-strategy-boundary.md) | NAPI pull sessions in existing workers; tagged decision barriers; IPC for untrusted code; no embedded JS | Approved by owner, 2026-10-22 |
|
||
| [ADR-005](architecture/decisions/005-durable-cutover.md) | One Rust transition kernel; resident research state; private staged paper state under existing SQL transactions | Approved by owner continuation, 2026-10-23; paper activation separately gated |
|
||
| [ADR-006](architecture/decisions/006-research-product.md) | Existing API/queue/database; immutable versions, provenance and evidence retention; no laboratory framework | Approved by owner continuation, 2026-10-23 |
|
||
| [ADR-007](architecture/decisions/007-ai-boundary.md) | Isolated untrusted code, research-only permissions/budgets; human-only paper promotion; live disabled | Explicit trust-model approval |
|
||
| [ADR-008](architecture/decisions/008-performance.md) | Measure actual paths; cursor replay and bounded trials; caching/DSL only when measured | Plan approval; later optimization go/no-go |
|
||
|
||
Long-only is the approved first canonical model, not deletion of short history or a silent change to current paper accounts. Short/margin support still needs a separate approved borrowing policy and fixtures. C01/C03/C04/W01 preserve the legacy behavior described in their task scopes.
|
||
|
||
**Pre-default multi-asset risk decision:** F06 review confirms existing ordered mark transitions can latch an intermediate portfolio loss/drawdown halt even when simultaneous offsetting moves leave final equity unchanged. Additive F06/F07 work can proceed under the current deterministic policy, but R05 must not enable canonical multi-asset default research until the owner explicitly accepts the disclosed versioned approximation or approves a coordinated atomic-mark correction with fixtures. Determinism alone does not resolve this modeling issue.
|
||
|
||
## Milestones
|
||
|
||
| Milestone | Tasks | Exit criterion |
|
||
| --- | --- | --- |
|
||
| M0: safe interim behavior | C01/C02/C03/C04/C06; O01; P01 | Scoped terminal/funding/input fixes; failed init cleans up; shared-runtime research rejected; migration lock and honest baseline measurements |
|
||
| M1: usable current workbench | W01–W04 | Save, submit, cancel, inspect and reopen tested in browser; unsupported controls hidden; legacy economic limitations visible |
|
||
| M2: canonical Rust/TS research | F01/F02/F04–F09, D01, S01/S02; R01/R10/W03/C06 then R05; P07 measurements | Owner-aware finance, deterministic replay, compact results, one TS strategy and retained input provenance work through durable runs |
|
||
| M3: useful research product | R02/R03/R04/R11/R12 | Catalog/workspace/dataset selection and original reproduction; metadata/UI proceed alongside engine work |
|
||
| M4: batch research and validation | R06–R09, P04; S05 when ready | Bounded sweeps, summary comparisons, OOS/reset-segment walk-forward and measured worker scaling; regime panels only with S05 |
|
||
| M5: paper parity and AI research | S03/S04, A01–A04 | Recovery parity, operator readiness, isolated bounded AI experiments and evidence-linked human paper promotion |
|
||
| M6: remove duplicates / optional speed | S06; conditional D04/P03/P05/P06/O02 | Retire duplicate economics only after cutover proof; optional work requires demonstrated need |
|
||
|
||
Rows are outcomes, not a sequential waterfall. S03 does not wait for research UI or statistical reporting; basic experiments do not wait for regime models or feature caches.
|
||
|
||
## Critical path and parallel lanes
|
||
|
||
```mermaid
|
||
flowchart LR
|
||
F01[Contract + economic fixtures] --> F02[Owned ledger] --> F04[Risk + reservations] --> F05[Matcher]
|
||
F05 --> F06[Deterministic cursor replay]
|
||
D01[Availability-aware eligible datasets] --> F06
|
||
P01[Existing-path measurements] --> F06
|
||
F06 --> F07[Bounded NAPI sessions] --> S01[TS decisions] --> S02[One SMA]
|
||
F07 --> F09[Compact financial projections] --> F08
|
||
F07 --> P07[Representative replay profiling]
|
||
C02[Boundary integrity] --> F07
|
||
F06 --> F08[Canonical projections + reviewed TS statistics]
|
||
S02 --> R05[Durable canonical runs]
|
||
F08 --> R05
|
||
PRODUCT[Versions / retained artifacts / safe submission] --> R05
|
||
C06[Runtime containment] --> R05
|
||
R05 --> R06[Bounded experiments] --> P04[Measured parallel trials]
|
||
R06 --> R08[Chronological validation]
|
||
R06 --> A01[Research authorization] --> A02[Untrusted code isolation]
|
||
R08 --> A03[AI evidence loop]
|
||
A02 --> A03
|
||
S01 --> S03[Durable Rust paper adapter]
|
||
```
|
||
|
||
The full [dependency graph](backlog/dependencies.mmd) includes all code and decision gates. Solid task edges are implementation prerequisites. Dotted task edges are release/conditional gates, not blockers to integrating component work.
|
||
|
||
After approval, run one financial-core owner alongside one web/product owner and one data/benchmark/metadata owner. Serialize shared DTOs, migration registry, worker protocol and actual overlapping files. Core tasks F01/F02/F04/F05 must not be split among agents simultaneously.
|
||
|
||
## First wave: four independent assignments
|
||
|
||
Completed wave; the table records its original rationale. Exact prompts, paths, commands, commit references and verification results: [FIRST-WAVE.md](FIRST-WAVE.md).
|
||
|
||
| Task | Why now | Ownership / unlock |
|
||
| --- | --- | --- |
|
||
| [C01](backlog/tasks/C01.md) | Final native equity currently omits liquidation costs | Legacy Rust engine/results only; preserves a known arithmetic fixture for migration |
|
||
| [C03](backlog/tasks/C03.md) | Existing gross-capital guard ignores fee liability | TS execution model only; safer interim paper behavior without a new financing model |
|
||
| [C04](backlog/tasks/C04.md) | Partially initialized runtime can retain resources | ModeManager lifecycle only; unlocks C06 containment |
|
||
| [W01](backlog/tasks/W01.md) | Current user-facing cancellation/status can mislead | Frontend controls/hooks only; unlocks W02 and the tested workbench |
|
||
|
||
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.
|
||
|
||
O01/P01, W03 and W04 are committed. W04 adds validated real-browser end-to-end verification of the existing workbench. F01/D01 passed integrated validation and are committed; F02/D02 passed integrated validation and await acceptance/commit, while subsequent tasks remain prerequisite-gated.
|
||
|
||
## Second-wave handoff — 2026-10-22
|
||
|
||
All three tasks are `done` / `validated_committed` following owner approval: C02 `ee670a3`, C06 `43ffb54`, W02 `fe00ecd`. Worktrees are retained under `/tmp/stock-bot-wave2.M9vHDK/`.
|
||
|
||
| Task | Implemented and verified |
|
||
| --- | --- |
|
||
| C02 | Whole-load native validation preserves previously admitted data on any invalid row. Indexed errors cover malformed rows, OHLCV/VWAP, timestamps and unsupported types. 1001ms/1999ms remain distinct. Identical/conflicting duplicates and decreasing timestamps now reject explicitly; optional VWAP and zero volume remain accepted. |
|
||
| C06 | Default paper composition uses native research. Legacy TS requires explicit `role: 'research-only'`; startup and both exposed mode initializers reject cross-role activation before effects. Real paper account/ledger/checkpoint hashes and lifecycle stay unchanged through native success/cancel/failure jobs, and the paper feed continues afterward. No second execution framework was added. |
|
||
| W02 | Saved configuration and dataset evidence are distinguished from mutable legacy display fallbacks. Missing artifact/build versions stay unknown; known metric placeholders are unavailable while measured TS zeros remain visible. Limitations appear beside performance, and mutable legacy capital cannot fabricate cash profit. No stored results or financial calculations were rewritten. |
|
||
|
||
Combined integration gates:
|
||
|
||
- `CARGO_BUILD_JOBS=2 bun run check`: passed all gates; 54 tooling, 43 utility, 35 calculation, 293 integration and 37 Rust tests, with no failures. Build, typecheck, contracts, lint and secret audit passed. The 47 native bridge cases are included in integration, not an additional count.
|
||
- `bun run test:postgres` against disposable `stock_bot_safety` PostgreSQL and Redis DB15: 47 passed, 267 assertions. Includes two real-ledger research-isolation regressions. Temporary fixture containers were removed after validation; development databases/services were untouched.
|
||
- `git diff --check`: passed. All 21 authored implementation/test files match reviewed worktrees; the rebuilt integration addon hash is in the manifest.
|
||
|
||
Native subprocess builds/IPC and fixture networking required sandbox escalation. Existing Rust/frontend build warnings remain. Explicit linting of the old W01 test harness still reports its unchanged test-only curly findings; the repository lint gate and new scoped code checks pass. No real-browser E2E coverage is claimed here.
|
||
|
||
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.
|
||
|
||
## Fourth-wave handoff — 2026-10-22
|
||
|
||
W03 is independently reviewed and `validated_committed` as `9b9403e` following owner approval. Backend and frontend contributors used separate worktrees under `/tmp/stock-bot-wave4.iEBUTZ/` with a pinned API contract. All 18 implementation/test files match their reviewed versions.
|
||
|
||
- **Save / Save and run:** Web saves explicitly send `autoStart:false`. Save and run keeps the saved definition and original submission body/key through rejection or a lost response; retry does not save another definition. Immediate ref guards prevent duplicate clicks. Close waits for an unresolved definition write; closing after saving refreshes the list. Detail submissions have separate errors, explicit retry controls and late-navigation guards.
|
||
- **Durable admission:** `Idempotency-Key` is scoped to the existing verified operator or service principal, not a caller-supplied identity or browser-session nonce. A normalized intent fingerprint distinguishes retries from conflicts. Parent-row locking, immutable request snapshots and dispatch insertion remain in one transaction; the unique principal/key constraint also covers concurrent submissions across different definitions. Matching retries return the original run; changed intent returns 409 with existing 202/Location success behavior.
|
||
- **Migration / compatibility:** New additive `14-backtest-submission.sql` is admitted by O01's serialized startup runner. Legacy NULL-key rows remain readable. Omitted `autoStart` retains legacy auto-start, and keyless clients retain non-idempotent behavior. New web paths opt into explicit save and keyed submission. No financial simulation or paper-state behavior changed.
|
||
|
||
Combined validation:
|
||
|
||
- `CARGO_BUILD_JOBS=2 bun run check`: all gates passed; 60 tooling, 43 utility, 35 calculation, 310 integration and 37 Rust tests; zero failures. The 36 DOM interaction cases and 12 security cases are included in these totals, not additional suites.
|
||
- `bun run test:postgres`: 58 tests, 345 assertions, zero failures against disposable PostgreSQL/Redis, including a final rerun after the combined build. A database barrier proves both cross-definition contenders reach INSERT before release; tests verify one run/outbox, rollback/retry, numbering, principal separation, cookie renewal, frozen snapshots and preserved legacy rows.
|
||
- Explicit frontend typecheck, application-source lint, production build and `git diff --check` passed. Existing Rust/frontend warnings and the unchanged 12 curly findings in the old DOM test harness remain; the repository lint gate passes.
|
||
|
||
Independent review caught and corrected premature list refresh while saving and a submission error hidden after changing selected runs; dedicated real-component/route regressions cover both. Local logs and hashes are recorded in the manifest. Disposable test containers and their recreatable fixture data were removed; development services were untouched. Worktrees are retained.
|
||
|
||
Limits: UI retry identities are component-lifetime state, not recovery across reload/navigation. Definition POST response loss is not covered by run-submission idempotency. Operator/service scopes are the existing single-operator security model, not new user accounts or AI authorization. DOM tests do not prove browser layout, virtualized rows or full browser/API execution; that is W04. Existing native economic limitations remain visible and unchanged.
|
||
|
||
W03 was committed with owner approval; no push, PR or trading operation occurred. W04's subsequent execution is recorded below; canonical Rust finance still requires ADR-002/003/004 approval.
|
||
|
||
## Fifth-wave handoff — 2026-10-22
|
||
|
||
W04 is independently reviewed and `validated_committed` as `550d8b7` on base `95842c3`, following owner approval. The sole implementation owner used `/tmp/stock-bot-wave5.t2GVG7/w04`; the independent reviewer accepted the frozen five-file implementation and reran all browser cases. Integration and pre-commit verification preserved all five hashes. No production application source, financial behavior or business API changed.
|
||
|
||
- **Real product path:** Chromium uses the built frontend, authenticated existing routes/websocket projection, SQL repository, durable dispatcher and worker against isolated fixtures. Save-only creates no run/outbox; explicit submission, persisted progress, unsupported-control absence, completion, trades, limitations, frozen inputs and reopening survive navigation/reload.
|
||
- **Failure and race evidence:** Separate cases cover cancellation acknowledgement versus worker settlement, failed and zero-trade results, missing results/run, network failure/retry, actual client websocket disconnect/reconnect, and a delayed real API response after switching selected runs. The stale-response assertion waits for the exact old request to finish or fail before inspecting the selected run.
|
||
- **Native smoke:** The existing Rust adapter/subprocess executes 70 synthetic bars, persists native results and dataset provenance, and renders trades/reopened results. Fixed lifecycle fixture outputs are UI test data, not an alternate financial simulator or correctness oracle.
|
||
- **Harness:** `bun run test:e2e` requires explicit disposable `stock_bot_safety*` PostgreSQL, Redis DB15, a local build/addon and explicitly installed Chromium. It rebuilds the UI in production mode with same-origin API routing. It blocks external browser requests and unrelated fixture API routes, isolates schemas/queues/listeners, and reports prerequisite/readiness/cleanup failures instead of skipping tests. Playwright 1.53.2 is now an explicit dependency; no additional runner framework was introduced.
|
||
|
||
Combined validation:
|
||
|
||
- `CARGO_BUILD_JOBS=2 bun run check`: all gates passed; 60 tooling, 43 utility, 35 calculation, 310 integration and 37 Rust tests, zero failures. Build, typecheck, contracts, lint and secret audit passed.
|
||
- `bun run test:postgres`: 58 tests, 345 assertions, zero failures against disposable PostgreSQL/Redis after integration.
|
||
- `bun run test:e2e`: 4 tests, 42 assertions, zero failures on the final main-workspace build (18.99s). Author and independent reviewer also passed all four cases on the frozen implementation. These are additional gates, not included in the repository-check totals.
|
||
- Standalone strict TypeScript and explicit ESLint passed for all three new harness files. Frozen offline dependency installation passed. Missing fixture settings, unsafe PostgreSQL/Redis databases and a missing browser installation each failed explicitly before execution.
|
||
|
||
Logs, five reviewed file hashes and native artifact identities are recorded in the manifest. Exact disposable PostgreSQL/Redis containers and their recreatable fixture data, including leftovers from aborted diagnostic attempts, were removed after validation. Development services were untouched; worktree and local logs are retained. W04 was committed with owner approval; no push, PR or trading operation occurred.
|
||
|
||
Limits: Chromium only (138.0.7204.23). A standalone probe reproduced a Bun 1.2.17 server-initiated websocket close/reconnect shutdown hang; final coverage uses an actual client-initiated disconnect and does not suppress server cleanup failures or claim server-initiated shutdown coverage. An author-reported first clean-worktree build had a browser/logger type-resolution ordering failure; a retry and the combined check passed, but no fix or reproducible diagnosis is claimed. Existing build warnings remain. UI fixtures and native smoke do not certify same-bar execution, canonical accounting, ownership or funding semantics.
|
||
|
||
At the fifth-wave closeout, the readiness review found 32 remaining scheduled tasks and no ungated candidate. The owner subsequently explicitly approved ADR-002/003/004, unblocking F01/D01; that approval is separate from test completion or the earlier generic continuation request. R01 still requires ADR-006. Optimization/deferred work is not a substitute for prerequisite completion.
|
||
|
||
## Sixth-wave handoff — 2026-10-22
|
||
|
||
F01 and D01 are independently accepted and `done` / `validated_committed` in `b4af840`. Base `243e9ab`; isolated worktrees under `/tmp/stock-bot-wave6.uIuYHz/`. Financial and dataset owners implemented in parallel, with an independent read-only reviewer; the integrator merged their common types exports.
|
||
|
||
- **F01:** Pinned maintained decimal dependency; checked exact decimal ingress, fixed-8 half-away posting, bounded arithmetic, versioned Rust/TypeScript contracts, owner/decision identities and hand-derived economic fixtures. Strategy intents cannot parse as internal financial mutations. Safe integer, Unicode, strict decimal, overflow and wire-roundtrip regressions pass. The snapshot is only an economic projection. F02 still owns actual ledger/dedup transitions and operation-specific proportional basis arithmetic; generic multiply/divide was deliberately not introduced.
|
||
- **D01:** Additive v2 normalizer retains interval/event/availability time, source sequence, explicit versioned calendars, execution-series selection, universe/action coverage and limitations. Hash-verified v1 conversion retains its parent hash and makes unverifiable legacy VWAP unknown. DST/half-days, delayed availability, conflicts, overlapping intervals, parent-hash syntax and prefix stability are tested. Unsupported action/adjusted execution data rejects; unknown coverage remains exploratory. Initial intraday support requires full-duration session-contained bars.
|
||
|
||
Combined validation passed:
|
||
|
||
- `CARGO_BUILD_JOBS=2 bun run check`: 60 tooling, 43 utility, 35 calculation, 334 integration and 44 Rust tests, zero failures. Build, typecheck, contracts, lint and secret audit passed. The initial sandbox attempt failed native spawning/worker checks; the escalated full rerun passed.
|
||
- Final focused rerun after formatting two JSON fixtures: 35 TypeScript tests / 601 assertions and 44 Rust tests, zero failures. Parsed fixture values match the independently reviewed source exactly.
|
||
- Standalone strict TypeScript, explicit scoped ESLint, scoped Prettier and `git diff --check` passed. Reviewed hashes match except the deliberate shared-export merge and documented formatting-only differences. Full hashes, logs and independently rebuilt addon identities are in the manifest.
|
||
|
||
No PostgreSQL/Redis or Chromium rerun was needed for these additive, unused contracts: SQL, APIs, UI and current execution paths did not change. No throughput certification is claimed. Existing build warnings remain; isolated clean builds needed existing dependency builds/retries, without a build-system fix.
|
||
|
||
Only the verified stalled sandbox test processes were stopped after the successful rerun. No user services or data were removed; worktrees and logs remain available.
|
||
|
||
Existing v1 snapshots and financial runtimes remain unchanged. F01 is not a working canonical ledger; D01 prefix tests are not F06 replay enforcement. The subsequent owner request authorized the F01/D01 commit and F02/D02 continuation, not a push, PR or trading operation.
|
||
|
||
## Seventh-wave handoff — 2026-10-22
|
||
|
||
F02/D02 were independently accepted and subsequently committed as `b65accc` at owner request. Base `b4af840`; isolated worktrees under `/tmp/stock-bot-wave7.UIkAQD/`. Financial and data owners implemented in parallel; an independent reviewer checked both; root integrated all ten reviewed files with matching hashes.
|
||
|
||
- **F02:** Owner-keyed quantity, remaining basis, realized P&L and fees; exact rational intermediates rounded once into the maintained decimal posting type. Fee-inclusive funding, wrong-owner disposal, overflow and identity conflicts reject atomically. Command/fill aliases return original replay-labelled receipts, including after intervening operations. Explicit market marks remain separate from fill prices; owner-level marked postings reconcile to account equity. Same-session boundary repetition is an accepted no-op, not a false session-change effect. Ledger-only checkpoints retain and validate ordered receipts by replay; ordinary transitions touch only affected state.
|
||
- **D02:** Existing EOD `1m`/`5m`/`1h` Mongo collections now feed the common research storage admission path. Unix-second timestamps/listing identities validate; supported-provider capability reports distinguish configuration/connectivity from coverage. Default QuestDB priority remains, explicit provider selection is available at the storage API, and missing/error ranges never switch to daily/synthetic data. Real writer/read/normalizer composition and repeated legacy native runs are tested on synthetic provider records; HTTP/Mongo transport alone is replaced.
|
||
|
||
Combined validation:
|
||
|
||
- `CARGO_BUILD_JOBS=2 bun run check`: 60 tooling, 43 utility, 35 calculation, 342 integration and 59 Rust tests passed, zero failures. Build, typecheck, contracts, lint and secret audit passed. One Rust test is intentionally ignored by the ordinary suite because it is a manually invoked release measurement.
|
||
- Independent review: 22 financial Rust tests passed; 36 intraday/ingestion/dataset tests with 264 assertions passed. These overlap the combined totals, not additional independent cases.
|
||
- Standalone strict TypeScript including the real ingestion import graph, explicit scoped ESLint, Prettier, scoped rustfmt and `git diff --check` passed. Cargo.toml line endings were normalized alongside its pinned dependency additions; no dependency upgrades occurred. Only num-bigint was newly added to the lockfile.
|
||
- A repeatable release ledger workload runs 1k/10k prebuilt commands over one owner/asset or three owners/four assets, with three repeats and full state/effect byte equality. Transition, checkpoint-copy and restore times are recorded separately. Detailed raw measurements/build identities are in the manifest; these are not end-to-end backtest throughput or a speedup claim. Receipt memory and restore work grow with history; compaction is not implemented.
|
||
|
||
The manual release measurement also passed on the final integrated checkout (1 test, zero failures), with identical repeatability checksums to the author build. It is additional validation, not a skipped correctness test.
|
||
|
||
Limits: no F04 reservation/portfolio-risk policy, matcher, F06 replay, native session API, SQL/paper cutover, order/strategy/RNG session restoration or canonical-engine release. D02's provider selector is not a web/run-configuration control; no Mongo server-conformance, range-completeness or live-availability claim. Provider delayed-finalization caveats and the explicit bar-close simulation assumption are retained in the task evidence. PostgreSQL/Redis and Chromium suites were not rerun because their persistence/API/UI boundaries did not change. Existing build warnings remain.
|
||
|
||
Only exact identified stalled D02 sandbox test/worker processes were terminated after the successful escalated rerun; no development services/data were changed. Worktrees and logs remain available. The subsequent owner request authorized the seventh-wave commit and **F04 central cash reservations and portfolio risk enforcement**. No push, PR or trading operation occurred. Product/AI work remains subject to its unapproved ADRs.
|
||
|
||
## Eighth-wave handoff — 2026-10-22
|
||
|
||
F04 is independently accepted and `review` / `validated_uncommitted`. Base `b65accc`; isolated worktree `/tmp/stock-bot-wave8.pKzr7p/f04`. One owner implemented five financial files, two read-only reviewers accepted them, and root integrated exactly matching hashes. See [execution policy clarifications](backlog/tasks/F04.md#execution-policy-clarifications).
|
||
|
||
- **RiskAccount** privately owns the existing Ledger. Explicit and target-derived normalized orders share funded admission; strategy-owned sells cannot borrow inventory or credit anticipated proceeds. Fill-time checks account for other reservations, adverse gaps and split-fill rounding; rejection releases the remainder without changing prior fills. Commission is computed from exact quantity × price × rate, rounded once.
|
||
- Portfolio quantity/exposure uses owner-book rounding, including pending buys. Increasing risk requires fresh marks across held/pending assets. Reductions remain possible during stale data and marked-loss halts. Explicit account boundaries reset daily state only; drawdown peak/halt persists through rollover and restore. Instance-bound operator reset records its baseline, separate from strategy input.
|
||
- Recorded accepted/rejected outcomes and fill aliases replay without reapplying effects or moving the clock. Checkpoints reconstruct and verify risk/ledger state, reservations and receipts. Overflow/malformed internal commands remain atomic errors, not ordinary risk rejections. Future adapters must honor the outer replay flag before publishing nested financial effects.
|
||
|
||
Validation: `CARGO_BUILD_JOBS=2 bun run check` passed build/types/contracts/lint/audit plus 60 tooling, 43 utility, 35 calculation, 342 integration and 77 Rust tests. Independent risk suites passed 18 cases; the broader financial suite passed 40 (overlapping totals). Two manual benchmarks are excluded from ordinary Rust runs; the new risk release benchmark was separately executed successfully in both author and integrated checkouts. Scoped rustfmt, diff checks and manifest DAG/readiness validation passed. Existing repository-wide rustfmt and planning-manifest Prettier style deviations were confirmed outside this change's formatting scope; no unrelated formatting rewrite.
|
||
|
||
The narrow release workload uses 1k/10k prebuilt mark/admit/partial-fill/release commands, three repeats, one active owner/asset or two active owners/four assets. Full checkpoint/outcome bytes and restored checkpoints match. Integrated 10k transition time was approximately 42–45ms single and 55–56ms multi, excluding build/loading/serialization; checkpoint and restore are measured separately. Only zero/one live reservation is exercised. This is not full backtest throughput or a scaling guarantee: normal risk checks scan retained book keys and live commitments with ordered-map costs; retained journal memory/restore work grows with history. Raw commands, logs, artifact/source hashes and measurements are in the manifest.
|
||
|
||
Limits: active legacy engines unchanged; no F05 matcher, target expansion/mode coordination, limit/TIF/capacity eligibility, F06 calendar/replay, F07 native sessions, paper/SQL cutover or full strategy/replay/RNG recovery. Operator capability is API separation, not untrusted-code security. PostgreSQL/Redis, browser and Python suites were not rerun because those boundaries did not change. No services/data were removed. No new-wave commit, push, PR or trading operation. Next after acceptance/commit: **F05 matching and order lifecycle on the canonical ledger/risk facade**; replay release remains gated by F06.
|
||
|
||
## Ninth-wave handoff — 2026-10-22
|
||
|
||
F05 is independently reviewed and `review` / `validated_uncommitted`. Its isolated worktree `/tmp/stock-bot-wave9.P8EKsc/f05` uses base `b65accc` plus the five exact F04 prerequisite files. The owner accepted continuation without requesting a prerequisite commit. One financial owner implemented; execution and quant reviewers accepted the final source; root integrated exactly matching hashes. See [F05 execution policies](backlog/tasks/F05.md#execution-policy-clarifications).
|
||
|
||
- **MatchingAccount** privately owns RiskAccount, with no competing ledger, fee or funding logic. Open-only and quote execution have explicit spread/slippage rounding, limit crossing, latency, session eligibility and shared liquidity. IOC/FOK/DAY/GTC transitions, partial fills, cancellation, rejection and terminal cancellation are deterministic. No synthetic end-of-run liquidation is introduced.
|
||
- Owner-scoped absolute targets account for holdings and live commitments. Omitted assets remain unchanged; repeated targets preserve partial orders. Changed targets cancel only the owner's relevant commitments before risk-checked replacement. Declared target-array order is priority, not an atomic portfolio rebalance. Target and explicit-order modes cannot be mixed for an owner.
|
||
- Structural batch validation precedes mutation. Physical execution identity prevents capacity reuse under changed delivery keys; delayed quotes retain their physical time and cannot fill orders that were not yet eligible. Exact retries replay original receipts without republishing nested effects. Checkpoints reconstruct matching, risk and ledger state. Unexpected numerical failure records the committed prefix and makes the attempt terminal; adapters must fail the run, never publish successful metrics from that prefix.
|
||
- Admission uses a coordinator revision, distinct from the nested ledger snapshot revision. F06 must honor that token, physical event timing and failure contract; it must not restamp missed opens. Full replay/strategy/RNG session restoration remains later work.
|
||
|
||
Combined validation: `CARGO_BUILD_JOBS=2 bun run check` passed build/types/contracts/lint/audit plus 60 tooling, 43 utility, 35 calculation, 342 integration and **106 Rust tests**, zero failures. The 29 matching regressions also passed independently in both reviews (overlapping totals). Three manual benchmarks are ignored by the ordinary Rust suite; the new matching release measurement passed separately in both author and integrated builds. Scoped rustfmt, diff checks and final manifest/source verification passed.
|
||
|
||
The narrow release workload uses 1k/10k execution events and fills, each preceded by a submit (2k/20k coordinator commands plus setup), over one owner/asset or two owners/two assets, with three repeats. Integrated 10k apply time was 214–235ms single and 234–238ms multi. Apply includes fixture construction/assertions/outcome collection; checkpoint copying is separate, and restore includes cloning its checkpoint input. Serialization is outside these timers. Exact economics, checkpoint/outcome repeatability and restored checkpoint equality are asserted. Serialized checkpoint plus returned outcomes are approximately 12.6MB/128MB at 1k/10k; this is not RSS. Retained journals grow with history. These are component measurements, not end-to-end backtest throughput, a speedup claim or a reason to introduce caching/compaction prematurely. Full raw rows and artifact/source identities are in the manifest.
|
||
|
||
Limits: active legacy simulator and NAPI unchanged; no replay scheduler, paper/SQL cutover or full session restore. Checkpoints validate consistency, not authenticity or arbitrary-code security. PostgreSQL/Redis, browser and Python suites were not rerun because their boundaries did not change. Existing build warnings remain. No services/data removed; worktree/logs retained. **F04/F05 remain uncommitted. Next after acceptance: F06 deterministic availability-aware replay**, still the release gate for this matcher. No commit, push, PR or trading operation occurred.
|
||
|
||
## Tenth-wave handoff — 2026-10-22
|
||
|
||
F04/F05 were accepted and committed as `ccf333c` at owner request, superseding their uncommitted handoff status above. F06 is independently reviewed and `review` / `validated_uncommitted`. Isolated worktree `/tmp/stock-bot-wave10.8uCLfa/f06` starts at that commit. One implementation owner wrote three replay files; independent timing/execution and quant/performance reviewers accepted the frozen source; root integrated exactly matching hashes. See [F06 execution clarifications](backlog/tasks/F06.md#execution-handoff-clarifications).
|
||
|
||
- **Replay** owns MatchingAccount and one sorted immutable event vector. Available observations use an index prefix rather than repeated history copies. Declared cadence produces one synchronized barrier per timestamp; exact due owners submit against the matching admission revision. Missing/stale feature inputs remain explicit. Prepared input/config ordering is canonicalized; file permutations preserve trace/checkpoint bytes.
|
||
- Only the pinned execution series provides open opportunities, marks and liquidity derived from the physically latest completed available volume. Warmup cannot trade; terminal observations mark only. Late prior closes cannot overwrite a physically newer open even when their timestamps tie. True retained session opens are never restamped for mid-session starts. Risk-session boundaries are a separate explicit clock.
|
||
- Exact canonical input/config content, not an unverified label, binds checkpoints. Restore reconstructs event prefixes and fixed decision submissions, then verifies the full state. Both submission-time and automatic-event financial failures preserve terminal diagnostic prefixes without producing a successful run. Strategy-state/RNG recomputation remains F07/S01.
|
||
|
||
Combined validation: `CARGO_BUILD_JOBS=2 bun run check` passed build/types/contracts/lint/audit plus 60 tooling, 43 utility, 35 calculation, 342 integration and **131 Rust tests**, zero failures. The **25 replay regressions** passed independently; the timing reviewer also ran the full frozen test binary. Four manual benchmarks are ignored by ordinary Rust runs; the new release replay measurement passed in both author and integrated checkouts. Scoped rustfmt, diff, task DAG/readiness and final source/artifact checks passed.
|
||
|
||
Release measurement: one/two assets, 1k/10k/100k execution bars plus one cadence-only row, three repeats each, one buy/fill per run. Full checkpoint bytes repeat exactly; independent expected cash/equity and restored checkpoints match. Integrated 100k load was 76–85ms and traversal 0.91–1.11s. Load includes canonicalization, validation, sorting and exact binding serialization; traversal includes financial marks/journals and the fixture decision. Input generation/cloning and output serialization are excluded. Checkpoint copying and full restore are timed separately. At 100k the serialized checkpoint is approximately 429MB, not RSS. Receipt history is retained; no compaction or cross-trial cache was introduced. This is not order-heavy, TS/NAPI, batch or storage throughput, nor a baseline speedup claim. Raw rows and hashes are in the manifest.
|
||
|
||
**Material model restriction:** existing sequential equal-time marks can latch intermediate portfolio loss/drawdown despite unchanged final synchronized equity. The implementation exposes this limitation and pins a permutation regression. R05's multi-asset default activation requires explicit owner acceptance or an approved coordinated atomic-mark correction. F06 acceptance does not waive that gate.
|
||
|
||
Other limits: trusted internal prepared bars only; F07 must verify/adapt frozen D01 inputs and preserve provenance/model limitations. Quote replay and abutting sessions explicitly reject. Event budget bounds count, not wall time. Active legacy simulator, native API, SQL/paper and web paths are unchanged; no PostgreSQL/Redis, browser or Python rerun was needed. Existing build warnings remain. No services/data removed; worktree/logs retained. **F06 remains uncommitted. Next after acceptance: F07 native pull-session/dataset adapter**; F08 result projection may follow with coordinated contract ownership. No push, PR, trading operation or further task implementation occurred.
|
||
|
||
## Eleventh-wave handoff — 2026-10-23
|
||
|
||
F06 was accepted and committed as `417a7bd` at owner request, superseding its uncommitted handoff status above. F07 was independently reviewed, validated and subsequently committed as `e3635f2` at owner request. Isolated worktree `/tmp/stock-bot-wave11.l8cJnN/f07` starts at the F06 commit. One native/worker owner implemented; a second owner supplied three disjoint benchmark files reviewed by root. Independent boundary/lifecycle and data/quant reviews accepted the boundary. Root integrated 22 matching source/test files. See [F07 clarifications](backlog/tasks/F07.md#execution-handoff-clarifications).
|
||
|
||
- **FinancialReplaySession:** thin NAPI export over one ReplayHost/F06 core; strict identity/version envelopes, event-count-bounded progress/decision/complete/failed steps, synchronized admission revisions, complete-batch submission, terminal success gate and disposal. One read-only observation-range accessor avoids checkpoint copies. The exact host is tested against direct Rust Replay with identical barriers, outcomes and receipts; TS uses the same frozen fixture and independent arithmetic.
|
||
- **TypeScript/worker:** existing D01 validator verifies actual data and derived eligibility/limitations. Numeric ingress expands scientific notation and rejects unsupported precision without rounding. Calendars, execution feed and availability are retained. Callbacks receive only shared immutable published deltas and financial views. Exceptions submit no partial batch; worker results must match captured identity/policy. Existing process cancellation, crash, wait-for-close and lease protections remain.
|
||
- **Scope:** fixed trace and fixture callbacks only, not S01 production strategy state/RNG or a DSL. The legacy request, durable runner default and paper/live behavior are unchanged. Exact architecture tests permit only the worker and its helper to reach native replay; shared schemas still cannot import native/data/services.
|
||
|
||
Final validation: `CARGO_BUILD_JOBS=2 bun run check` passed build/types/contracts/lint/audit plus **63 tooling, 43 utility, 35 calculation, 353 integration and 133 Rust tests**, zero failures. Four earlier manual Rust measurements remain intentionally ignored by the ordinary suite. Independent frozen-artifact review ran 69 focused TS tests and 29 replay-related Rust cases (overlapping totals). Disposable PostgreSQL/Redis suites passed **58 tests / 345 assertions** before and after integration. Release-addon replay/binding tests passed **17 tests / 120 assertions**. Extra strict TypeScript for affected scripts/tests, scoped ESLint, rustfmt and diff checks passed. Explicit lint of the normally ignored architecture test confirms the same 13 pre-existing curly-style errors at HEAD and in the worktree; no new ones. The clean isolated build initially needed the existing logger prerequisite built manually; no build-system rewrite.
|
||
|
||
Release measurement: 1k/10k total bars, one asset/owner or ten assets/two owners, two fresh processes with two fresh native sessions each; alternate one-unit buy/sell targets. Full normalized results match across repeats, reverse callback order and debug/release profiles. Independent integer-cent cash/equity/basis/fee/fill checks pass. At 10k, release whole-trial times were **2.65–2.93s single / 3.51–3.61s multi**; finalization alone was **0.89–1.03s / 1.34–1.40s**. Final receipt payloads were approximately **66.7MB / 103.6MB**, not RSS. Cold imports and detached dataset verification, mapping, session load, real advance/submit/decision timings, bytes and process RSS are recorded separately in the manifest/logs. This is order-heavy component conformance throughput, not empty-crossing overhead, a production research benchmark, an isolated-host SLA or a legacy-engine speedup. No cache, batch pool, compaction or DSL was introduced.
|
||
|
||
Limits remain explicit: trusted host interface, not an untrusted-code sandbox; native prepared input does not independently authenticate D01. Quote/abutting-session replay remains unsupported; event count is not a wall-time guarantee. Sequential equal-time marks can still latch intermediate risk halts; R05's owner policy gate remains unresolved. Full receipts are retained and serialized; F08 can use these measurements when designing canonical results without prematurely adding a general storage framework.
|
||
|
||
Only the two named disposable fixture containers and their recreatable synthetic data were removed; development services were untouched. Worktree/logs retained. Browser/Python suites were not rerun because those boundaries did not change. **F07 is committed. Next recommended: F08 canonical metrics/result projections**, now code/ADR-ready but not yet authorized. S01 requires ADR-005 approval. No push, PR, default cutover or trading operation occurred.
|
||
|
||
## Twelfth-wave handoff — 2026-10-23
|
||
|
||
Two focused performance stories replace a broad optimization request: [F09](backlog/tasks/F09.md) emits compact authoritative terminal values/owned fills with optional complete diagnostics; [P07](backlog/tasks/P07.md) profiles no-trade, sparse and high-turnover workloads using the existing harness. F08 consumes F09 and later adds explicit session sampling/exposure/statistical policies. No session-close values are inferred from risk baselines, and fills are not relabelled completed trades.
|
||
|
||
Base `19e9dad`; isolated worktrees under `/tmp/stock-bot-wave12.F9Rlh4/`. One native/result contract owner, one disjoint benchmark owner, root planning/integration and independent review. Baseline profiling was measured on F07; compact comparisons used the accepted F09 contract. Internal journals/recovery, legacy/default paths and all mark-policy release gates remain. No framework, DSL, cache, worker-pool or web-pagination expansion.
|
||
|
||
Both stories are independently reviewed and `review` / `validated_uncommitted`. Root integrated 14 source/test files with exact reviewed hashes. F09's accepted contract was overlaid into P07's isolated worktree before compact comparison work; neither owner independently changed the other's contract.
|
||
|
||
- **F09:** native `project()` returns the existing authoritative ledger valuation and actual owned fills copied from committed commands/effects. It skips replay aliases and retains separate gross cash movement and fee postings, signed owner contributions and residual cost basis. Typed serialization borrows journal facts; no checkpoint copying, financial replay or TypeScript accounting is introduced. Complete-state/identity/format/cancellation guards cover the compact path. Full `finalize()` output, defaults, internal journals and recovery are preserved.
|
||
- **P07:** the existing harness now selects no-trade, sparse and turnover profiles with identical callback cadence, plus trace/projection/both output. It records native-finalization, decoding, validation and disposal separately. Comparisons require the same dataset, policy, strategy, artifact, terminal view and actual fill facts. Full per-format hashes remain independent; no TypeScript valuation is fabricated to compare formats. A 200,000-fill regression prevents a benchmark-only JavaScript argument-limit failure.
|
||
|
||
Validation: full `CARGO_BUILD_JOBS=2 bun run check` passed build/types/contracts/lint/audit, 63 tooling, 43 utility, 35 calculation, 359 integration and **136 Rust tests**, zero failures; four existing manual benchmarks remain intentionally ignored. After the final benchmark files were integrated, all **72 tooling tests / 10,184 assertions** passed. Extra strict test/script TypeScript, scoped ESLint, rustfmt and diff checks passed. Disposable PostgreSQL/Redis suites passed **58 tests / 345 assertions** before and after integration. Independent debug and integrated release native/worker checks each passed **23 tests / 198 assertions**. These focused tests overlap larger suites. No browser/Python rerun was needed for unchanged boundaries.
|
||
|
||
Paired release results below use identical frozen source and addon `d98308d0…`, two fresh processes with two fresh native sessions each, including reversed callback order. Numbers are median **replay/decision/finalization/disposal time**, excluding native construction and benchmark-only oracle/hash work. Bars are total across assets. Preparation/imports, whole-trial time, all phase timings, RSS, hashes and raw report paths are recorded in the manifest. This is synthetic component conformance throughput on a shared host, not durable-job latency or an isolated-host SLA.
|
||
|
||
| Total bars | Profile | Assets / owners | Full trace | Compact | Reduction |
|
||
| --- | --- | --- | ---: | ---: | ---: |
|
||
| 10,000 | No trade | 1 / 1 | 1.142s | 0.744s | 34.9% |
|
||
| 10,000 | No trade | 10 / 2 | 0.599s | 0.296s | 50.7% |
|
||
| 10,000 | Sparse | 1 / 1 | 1.184s | 0.835s | 29.5% |
|
||
| 10,000 | Sparse | 10 / 2 | 0.720s | 0.419s | 41.8% |
|
||
| 10,000 | Turnover | 1 / 1 | 2.105s | 1.467s | 30.3% |
|
||
| 10,000 | Turnover | 10 / 2 | 2.598s | 1.804s | 30.6% |
|
||
| 100,000 | Sparse | 1 / 1 | 11.918s | 8.097s | 32.1% |
|
||
| 100,000 | Sparse | 10 / 2 | 7.312s | 4.245s | 41.9% |
|
||
| 100,000 | Turnover | 1 / 1 | 21.027s | 14.821s | 29.5% |
|
||
| 100,000 | Turnover | 10 / 2 | 26.501s | 18.743s | 29.3% |
|
||
|
||
Every selected comparison passed independent economic oracles, complete result repeatability and common financial equality. All six 10k diagnostic hashes also match the historical F07 baseline. That intermediate extended harness's source bodies were not retained, only their hashes, so historical timings are contextual; speedup claims use the final paired source, which is archived with all 21 changed files as measured. Final planning edits follow the measurements; application source remains identical. No 100k no-trade run is claimed.
|
||
|
||
At 10k turnover, output falls from **66.7MB to 9.8MB** single and **103.6MB to 19.4MB** multi. At 100k turnover it falls from 672MB/1.044GB to 98.6MB/195.8MB. Full diagnostics remain available; this is an export reduction, not deletion of retained history. Compact 10k advance/submit accounts for 70–88% of run time. Those mixed timers should be profiled before selecting another optimization. Fixture TS decisions take only 0.9–3.5%; these results do not justify a DSL. Compact schema validation and disposal remain measured costs; removing checks or recovery history is not the next step.
|
||
|
||
Only the two exact disposable fixture containers and their synthetic data were removed; development services were untouched. Worktrees, logs and measured-source archive remain available. No commits, pushes, PRs, default cutover or trading operation occurred. **Next after acceptance: F08 historical equity/session/exposure and versioned statistics**, with explicit sampling conventions. S01 and product/AI work retain their pending ADR gates; the equal-time multi-asset risk-mark restriction remains unresolved.
|
||
|
||
## Thirteenth-wave execution — 2026-10-23
|
||
|
||
F09/P07 were accepted and committed as `e3bd722`, superseding their uncommitted handoff above. [F08](backlog/tasks/F08.md#execution-contract--2026-10-23) is the next code/ADR-ready story. Isolated worktrees start at that commit under `/tmp/stock-bot-wave13.KfvceG/`.
|
||
|
||
Root pinned the reporting contract after Rust and quantitative review. One owner implements the native reporting accumulator/wire; a disjoint owner implements reviewed statistics and the additive analytics adapter. The accepted native schema is passed to the consumer before integration. An independent reviewer checks sampling, financial invariants and undefined-statistic handling.
|
||
|
||
Account-session samples follow all equal-time observations without changing the earlier risk reset or financial event indexes. Partial session returns remain visible but are excluded from full-period annualized ratios. Exposure counts the union of actual occupied intervals over elapsed calendar time, including open positions through termination. Statistical policy explicitly records annualization/risk-free conventions and unavailable benchmark/round-trip metrics; no hidden 2%/252 defaults are introduced for canonical reports.
|
||
|
||
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.
|
||
|
||
## Fourteenth-wave execution — 2026-10-23
|
||
|
||
F08 was accepted and committed as `3838295`, superseding its uncommitted handoff above. S01 is the next satisfied task under ADR-004/005. Isolated runtime and verification worktrees start at that commit under `/tmp/stock-bot-wave14.JYfazy/`; root owns planning/integration and a separate reviewer checks the result.
|
||
|
||
[S01's execution contract](backlog/tasks/S01.md#execution-contract--2026-10-23) pins one shared pull loop, typed synchronous state-in/state-out strategy programs, per-owner observation/decision/RNG cursors, atomic staging around native submission and truthful admission feedback. Different strategy cadences must not lose another owner's observations. Rust remains the only financial authority.
|
||
|
||
Recovery deliberately follows the current research job boundary: restart the whole attempt from frozen inputs and original initial states/seeds. TS snapshots are diagnostic; no incomplete mid-run resume or new native checkpoint transport. S02 owns the first real strategy and trusted worker composition; S03 preserves durable paper integration, R05 the default/public-result cutover. The active legacy registry, SQL/paper state and web runner remain unchanged.
|
||
|
||
**Validated handoff:** S01 is `review` / `validated_uncommitted`. Eight author/verification files were integrated with exact independently reviewed hashes. Root added the permanent author type-test gate. The source bundle and raw logs remain under `/tmp/stock-bot-wave14.JYfazy/`; the manifest owns the precise validation record.
|
||
|
||
Callbacks now receive frozen prefix observations, isolated typed state/positions and scoped per-owner randomness. Every due callback uses the same native portfolio view; all next states/intents are staged before admission and all feedback is validated before one committed-state swap. Rejections advance state and carry actual Rust order status. Late callback failures, ambiguous native submissions and malformed feedback dispose the attempt and retain the last confirmed diagnostic state. The original conformance driver uses the same extracted pull loop with unchanged IDs and financial hashes.
|
||
|
||
Review caught two boundary defects before integration: unhandled Promise rejections from invalid async callbacks, and empty feedback envelopes accepted by `z.unknown()` fields. Narrow fixes observe actual Promise rejection without awaiting/invoking arbitrary thenables and require present object-valued feedback tags. Regression tests cover both, including foreign-realm Promises and failure after real native admission. No Rust semantics, worker protocol, SQL or legacy registry implementation changed.
|
||
|
||
Full `CARGO_BUILD_JOBS=2 bun run check` passed build/typecheck/contracts/audit/lint plus **78 tooling, 43 utility, 44 calculation, 390 integration and 144 Rust tests**, with four existing manual Rust measurements ignored. Extra strict test TypeScript, scoped ESLint/Prettier and diff checks passed. The initial temporary strict config lacked its root-relative Bun type lookup; fixing that external config resolved it without source changes. Disposable PostgreSQL/Redis suites passed **58 tests / 345 assertions**; final release tests passed **43 tests / 568 assertions**. Independent native verification contributed 15 scenarios / 249 assertions, overlapping the integrated totals. Browser and Python boundaries did not change and those suites were not rerun.
|
||
|
||
The unchanged conformance CLI passed all six 10k workloads with identical complete result/economic hashes and the same release native artifact as F08. Historical wall-time changes track shared-host load; they are not an extraction speedup claim. A separate counterbalanced benchmark compared stateful programs with **replay of their exact captured decisions**, including IDs. This avoids treating different identity/payload sizes as callback cost.
|
||
|
||
| 10,000 total bars | Recorded decisions | Stateful programs | Added wall time |
|
||
| --- | ---: | ---: | ---: |
|
||
| No trade, 1 asset / 1 owner | 861 ms | 949 ms | 88 ms / 10.3% |
|
||
| No trade, 10 assets / 2 owners | 357 ms | 372 ms | 14 ms / 4.0% |
|
||
| Sparse, 1 asset / 1 owner | 908 ms | 1,050 ms | 143 ms / 15.7% |
|
||
| Sparse, 10 assets / 2 owners | 511 ms | 527 ms | 16 ms / 3.1% |
|
||
| Turnover, 1 asset / 1 owner | 1,569 ms | 1,881 ms | 313 ms / 19.9% |
|
||
| Turnover, 10 assets / 2 owners | 1,925 ms | 2,212 ms | 287 ms / 14.9% |
|
||
|
||
All **48 timed sessions** match complete financial hashes; repeated/reversed program order preserves diagnostic state/RNG hashes. Each fresh child first captures a reference trace, so timed sessions are in a warmed process. Medians have four samples per mode. Wall time includes construction, state validation/staging, callbacks, admission feedback, finalization and disposal; post-run oracle/hash work is separate. Each callback updates four scalar fields and draws once. This is neither pure callback overhead nor complex-strategy, database/queue or cold-start throughput. The measured 3.1–19.9% overhead is retained as a profiling baseline, without removing correctness checks or introducing a DSL/cache.
|
||
|
||
Only the two exact disposable fixture containers were stopped; development services were untouched. Worktrees, archives and measurements remain. **Next after acceptance: S02**, port one SMA strategy and wire its explicit trusted version into the existing worker. Its handoff distinguishes indicator state reconstruction from unsupported native mid-run resume. R05 still owns durable/public-result activation; paper migration and other pending decisions remain separately gated. No S01 commit, push, PR or trading operation occurred.
|
||
|
||
## Fifteenth-wave execution — 2026-10-23
|
||
|
||
S01 is accepted and committed as `2bcadbd`, superseding its uncommitted handoff above. S02 now has satisfied prerequisites. Isolated strategy and worker worktrees start at that commit under `/tmp/stock-bot-wave15.zi3GmP/`; root owns integration and a separate reviewer checks both changes.
|
||
|
||
[S02's pinned contract](backlog/tasks/S02.md#execution-contract--2026-10-23) defines an explicit long-only SMA version with reviewed crossover arithmetic, owner-budget whole-share sizing, prefix-safe history and native freshness checks. The existing worker accepts only reviewed built-in selections and binds returned strategy provenance to the captured request. Legacy readers/factories, financial Rust semantics and active web/paper paths stay intact. No generic registry, source-code transport, feature framework or incomplete checkpoint resume is introduced.
|
||
|
||
S03 is code/ADR-ready but outside this wave. R05 retains durable canonical/default activation and its multi-asset policy gate; R01/R11 require ADR-006. No pending policy was implicitly approved.
|
||
|
||
**Validated handoff:** S02 is `review` / `validated_uncommitted`. Ten integrated source/test files match the independently reviewed hashes. `sma-crossover-long-only/v1` uses the existing aliases and reviewed crossover helper, exact whole-share budget sizing, bounded JSON state and explicit availability/freshness rules. The legacy long/short strategy stays intact. The existing child worker locally runs trusted programs over the canonical Rust session; the parent detaches input and checks exact effective selections plus native identity/policy/format. No callback source, module path, TS financial engine or default/paper activation was added.
|
||
|
||
The independent next-open fixture buys ten shares at5 and sells at2, with0.7 total fees and9969.3 terminal equity from10000. Further tests cover warmup entry sizing, delayed older bars, equality, stale inputs, unaffordable fees/gaps, same-order partial fills, owner attribution, JSON reconstruction and full retry. Worker tests reject altered provenance/economics, malformed/duplicate output and crashes, and preserve hard cancellation even after a result arrives before child close.
|
||
|
||
`CARGO_BUILD_JOBS=2 bun run check` passed build/types/contracts/audit/lint plus **78 tooling, 43 utility, 44 calculation, 432 integration and 144 Rust tests**; four existing manual Rust measurements remain ignored. Dedicated test/fixture strict TypeScript and scoped lint/format/diff checks passed. Disposable PostgreSQL/Redis: **58 tests /345 assertions**. Final release tests: **48 /175**. Built `dist/native-worker.js` matches direct execution in trace, projection and report formats. Browser/Python boundaries did not change and were not rerun.
|
||
|
||
The worker owner's second elevated test run waited for approval and was aborted; root took over final validation after an explicit handoff. Root's restricted IPC run also stalled and was stopped, then passed unrestricted. Fixture correction uses a mutable detached dataset for the mutation test; schema `.min(1)` retains runtime nonempty validation without requiring a tuple input type. No economic failure was hidden by those environment/type corrections. Only the two exact disposable test containers were stopped.
|
||
|
||
The unchanged release addon is `6fe9dae…`. A paired benchmark compares actual SMA programs with replay of their **exact captured decisions**, including IDs. All **48 timed sessions** preserve complete financial hashes; repeated/reversed program order preserves diagnostics.
|
||
|
||
| 10,000 total bars | Recorded decisions | SMA callbacks | Added wall time |
|
||
| --- | ---: | ---: | ---: |
|
||
| SMA5/15, 1 asset /1 owner | 1,091 ms | 1,467 ms | 376 ms /34.5% |
|
||
| SMA5/15, 10 assets /2 owners | 410 ms | 478 ms | 69 ms /16.8% |
|
||
| SMA5/15, 10 assets /10 owners | 624 ms | 916 ms | 292 ms /46.8% |
|
||
| SMA15/252, 1 asset /1 owner | 1,018 ms | 2,351 ms | 1,333 ms /130.9% |
|
||
| SMA15/252, 10 assets /2 owners | 409 ms | 636 ms | 227 ms /55.5% |
|
||
| SMA15/252, 10 assets /10 owners | 594 ms | 1,681 ms | 1,087 ms /183.1% |
|
||
|
||
Each median has four samples across two processes, after an untimed reference capture. Imports/preparation are separate. Ten-assets/two-owners trades only two assets; the other eight still replay. Single-asset runs have9999 decisions and10000 advance calls; ten-assets/two-owners has1998 decisions/1000 calls, and ten-owners has9990 decisions/1000 calls. Warmup proportions and fills also differ. Cross-shape ratios do not isolate scaling. This is warmed direct-runtime throughput, not durable jobs, worker IPC, pure callbacks or NAPI cost; no speedup is claimed for S02.
|
||
|
||
The long-window decision/state phase accounts for roughly51–62% of wall time in the owner-dense cases, but cloning, freezing, schema validation, trailing calculation and allocation costs are not yet separated. [P08](backlog/tasks/P08.md) is the recommended next task **after S02 acceptance**, to profile and reduce that measured cost while preserving all strict-state and financial invariants. It is planned, not started. Immutable code artifacts remain R01/R05 work; no label-only reproduction guarantee is claimed. All raw evidence, exact commands, source archive and hashes are in `manifest.json` → `fifteenth_wave_validation` and `/tmp/stock-bot-wave15.zi3GmP/`. No new implementation commit, push, PR or trading operation occurred.
|
||
|
||
## Sixteenth-wave execution — 2026-10-23
|
||
|
||
S02 was accepted and committed as `ca5abdd`. The owner then explicitly stopped performance work and requested the remaining backlog. P08 is deferred; its initial inspection made no application changes and ran no profiling or benchmarks.
|
||
|
||
S03 is the next highest-priority code/ADR-ready task. [Its pinned execution contract](backlog/tasks/S03.md#execution-contract--2026-10-23) covers a stateless native transaction adapter, versioned SQL custody and actual strategy-state/RNG/batch-intent recovery. Native and durable owners use separate worktrees based on `ca5abdd` under `/tmp/stock-bot-wave16.kgaZm4/`; independent review checks the contract before integration.
|
||
|
||
Preserve existing row locks, journal context, idempotency and rollback behavior. Canonical next-event timing and immutable policy differ explicitly from legacy execution; refuse implicit account conversion. Retain failed native prefixes atomically as terminal, and keep notification delivery separate from financial commit. No performance work, default switch, paper feed activation or other pending ADR approval is included. S04 owns feed readiness; R01/R11 still require ADR-006.
|
||
|
||
**Validated handoff:** S03 is `review` / `validated_uncommitted`. Twenty-two source/test files are integrated with recorded hashes and independent G1/G2 signoff. `stageFinancialTransaction` restores private state and applies the existing Rust matcher. Its ordered financial views are reconstructed through the same risk reducer and checked against the authoritative result. Replayed commands return their original outcome with the current checkpoint and no new effect journal.
|
||
|
||
The canonical host uses the existing PostgreSQL account row lock. It commits all due owners' state/RNG/checkpoints and one complete batch intent together, then dispatches the batch in a separate transaction. Native snapshots, per-effect views, journals, input status and admission feedback commit atomically. Mixed-cadence owners retain their unconsumed observations. The shared decision helper preserves S01 research behavior. One additive migration stores complete canonical batches; legacy accounts explicitly refuse canonical envelopes and retain their existing execution path.
|
||
|
||
Coverage includes competing hosts, SQL rollback, lost acknowledgements, frozen callback inputs, all four time-in-force policies, risk reservations, stale quotes, exact quote-cursor decisions, and terminal failures during both admission and execution. A real SMA program matches uninterrupted state and journals after repeated replacement. Four separate-process kill cases cover decision staging, checkpoint commit, admission commit and fill/fee commit; recovery matches uninterrupted execution exactly.
|
||
|
||
`CARGO_BUILD_JOBS=2 bun run check` passed build/types/contracts/audit/lint plus **82 tooling, 43 utility, 44 calculation, 432 integration and 150 Rust tests**. Four existing manual Rust measurements remain ignored. The complete disposable PostgreSQL/Redis suite passed **81 tests / 545 assertions**. Extra strict TypeScript exposed only test fixture typing issues; these were corrected without changing application behavior, then strict test compilation, scoped format/lint and **38 targeted tests / 281 assertions** passed. Browser/Python boundaries were unchanged and their suites were not rerun. No profiling, optimization or benchmark run occurred.
|
||
|
||
The native addon was built and verified against this checkout's debug library for the full gates, then rebuilt in release mode. Another **38 tests / 366 assertions** passed against the final release addon; no timing measurements were performed. Source archives, exact commands/hashes and logs are recorded in `manifest.json` → `sixteenth_wave_validation` and `/tmp/stock-bot-wave16.kgaZm4/`. Only the two exact disposable test containers were stopped; development services, worktrees and logs were retained.
|
||
|
||
Limits remain explicit: trusted SQL custody, new canonical account IDs, execution-series observations only, immutable declared program metadata rather than retained code artifacts, and invalid queued inputs that fail closed until diagnosed. Rust validates opaque financial receipts before each financial transition; startup alone is not a full receipt audit. **Next after acceptance/commit: S04**, feed scheduling, auxiliary observation manifests and operator readiness. S05 is independently code/ADR-ready; R01/R11 still require ADR-006. S03 does not activate paper/live execution or switch existing web/research defaults. No S03 commit, push or PR was created.
|
||
|
||
## 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.
|
||
|
||
Deferred economics: short/margin/borrow, multicurrency, full corporate actions, intrabar stops/OCO, detailed market impact and live brokers. Reject unsupported datasets/orders explicitly. The model is not generalized by pretending unsupported behavior exists.
|
||
|
||
Later product/research: embedded IDE, advanced optimizers, generalized ML training, Monte Carlo significance tooling. Basic immutable versions, chronological validation and evidence links are not deferred.
|
||
|
||
Rejected: competing TS/web simulators, wholesale Rust rewrite, hand-written decimal engine, new service/message bus/workflow framework, generic signal DSL, compatibility switches that re-enable defects, deleting reviewed calculations because they are currently unused. Keep existing local environment-file policy; no WCAG or cosmetic-dashboard scope here.
|
||
|
||
## Execution governance
|
||
|
||
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.
|
||
|
||
|
||
## Eighteenth-wave execution — 2026-10-23
|
||
|
||
S04 is accepted and committed as `75abae2`, superseding its uncommitted handoff above. S05 proceeds under its [pinned execution contract](backlog/tasks/S05.md#execution-contract--2026-10-23). Root owns shared selection/dispatch, integration and durable restart coverage; separate strategy and native-verification owners use worktrees under `/tmp/stock-bot-wave18.V1G17v/`, with independent review.
|
||
|
||
One new long-only mean-reversion program composes explicit trend/momentum/reversion filters and fixed per-observation volatility gating. Both regime/no-regime modes share warmup. Native target reconciliation handles partial entries and persistent exits; no TS accounting or Rust financial changes. R08 remains the gate for performance conclusions. Performance engineering, services, default cutover and trading activation remain out of scope.
|
||
|
||
|
||
**Validated handoff:** S05 is `review` / `validated_uncommitted`. Twenty source/test/config files integrate one small canonical dispatcher, a distinct versioned mean-reversion program, shared exact desired-share sizing, native/worker verification and one durable restart regression. SMA calculations/checkpoint semantics and Rust financial code are unchanged. Independent G1/G2 review accepted the integrated source and public malformed-selection tests; strict final test types passed.
|
||
|
||
The [comparison example](../../apps/stock/orchestrator/examples/canonical-regime-research.ts) creates four explicit requests: volatility filter on/off under baseline and caller-supplied alternative costs. Inputs, versions, seeds and policies accompany native reports. It adds no experiment scheduler or optimizer. Periods count observed bars; volatility is not elapsed-time normalized. Initial owner budgets size desired shares and do not guarantee realized spend through gaps/fees. R08 remains necessary before conclusions about trading performance.
|
||
|
||
Validation: `bun run check` passed build/source/contracts, 82 tooling, 43 utility, 44 calculation, 479 integration and 150 Rust tests (four manual ignored), plus lint. The final added public-schema matrix passed separately. Full disposable PostgreSQL/Redis suite: **105 tests / 728 assertions**. Final strict new-test types, scoped lint/format and diff checks passed. **98 tests / 580 assertions** passed against the final release addon, including the added matrix, worker reports, SMA regressions and durable recovery. Exact commands, hashes and logs are recorded in `manifest.json` → `eighteenth_wave_validation` and `/tmp/stock-bot-wave18.V1G17v/`.
|
||
|
||
Only the two exact disposable test containers and identified sandbox-stalled verifier test processes were stopped; development resources, worktrees and logs remain. No S05 commit, push, PR, optimization, benchmark measurement, default cutover or trading activation occurred. Next after acceptance/commit: **R01 immutable strategy versions and R11 dataset workbench integration**, subject to the pending [ADR-006 research-product decision](architecture/decisions/006-research-product.md). Performance work remains deferred.
|
||
|
||
|
||
## Nineteenth-wave execution — 2026-10-23
|
||
|
||
S05 is accepted and committed as `6a67ae8`, superseding its uncommitted handoff above. Owner continuation approves the explicitly linked ADR-006 research-product direction. R11 is the next focused vertical slice; R01 is ready but outside this wave. Backend and frontend worktrees under `/tmp/stock-bot-wave19.do4GnG/` reserve disjoint files. Root owns contracts, composition, source forwarding and browser integration; review is independent.
|
||
|
||
The workbench will select exact retained v1 datasets or explicit source requests through the existing durable runner. Metadata listing does not certify bar integrity or calendar coverage. V2 datasets remain visibly unsupported until R05; existing economics warnings remain. No new service, default engine cutover, trading activation, profiling or benchmark work.
|
||
|
||
|
||
**Validated handoff:** R11 is `review` / `validated_uncommitted`. Twenty-four source/test files add a metadata-only retained dataset catalog, exact hash selection shared by creation and Settings, explicit source forwarding through the existing runner, and run-specific preparation/pinned status. Intraday UTC milliseconds survive save/reopen. Missing/unsupported metadata stays visible; source mode remains independent of catalog availability. Save and submit validate exact compatibility; concurrent partial updates serialize under the existing backtest row lock. Accepted idempotent submissions still return their original receipt before checking current templates/catalog state.
|
||
|
||
Independent G1/G2 review accepted the final changes. Repository checks passed 498 integration and 150 Rust tests (four manual ignored), plus build/source/contracts, 82 tooling, 43 utility, 44 calculation and lint gates. The final row-lock fix passed the full disposable PostgreSQL/Redis suite: **111 tests / 792 assertions**. Final release-addon focused coverage: **94 tests / 596 assertions**. Final browser coverage: **6 workflows / 66 assertions**, including real native frozen-hash reuse/reopen/trades, exact intraday save/reopen, mismatch rejection before dispatch and source unpinned-to-pinned display. Strict changed-test types and scoped lint/format/diff checks passed. Exact commands, source hashes and logs are in `manifest.json` → `nineteenth_wave_validation` and `/tmp/stock-bot-wave19.do4GnG/`.
|
||
|
||
The catalog does not certify full content integrity or calendar coverage. Current web economics remain legacy/qualified; v2 entries remain unsupported until R05. No financial Rust change, schema migration, new service, performance measurement, default cutover or trading activation. The final release addon matches this checkout's release library. Both exact disposable fixtures were stopped; development resources, logs and worktrees remain. No R11 commit, push or PR. **Next after acceptance/commit: R01 immutable strategy versions**, now ready under approved ADR-006.
|
||
|
||
|
||
## Twentieth-wave execution — 2026-10-23
|
||
|
||
R11 is accepted and committed as `b106c1c`. R01 adds immutable strategy versions, retained bundles/locks, exact parameter validation and audited review. Root owns shared contracts/composition/seeding and integration; backend and offline packaging owners use disjoint worktrees under `/tmp/stock-bot-wave20.XIW6lx/`, with independent review.
|
||
|
||
R01 deliberately exposes no version-based execution. R02 catalog/forms can proceed before R05, but actual version submission requires R05 retained-artifact verification/execution. Candidate uploads remain non-runnable until A02. Existing legacy execution stays qualified and rejects unsupported catalog version references. No performance work, new service, engine cutover or trading activation.
|
||
|
||
|
||
**Validated handoff:** R01 is `review` / `validated_uncommitted`. Thirty source/config/migration/test files retain immutable bundled-JS versions and dependency locks, source/build identity, scalar parameter schemas with exact canonical validators, stable built-in families, lineage and operator review events. Metadata projection omits content; artifact retrieval verifies exact hashes. Publish/clone idempotency and archive/concurrent-edit behavior use existing SQL transactions. Credential proof excludes development bypass only for new catalog mutations. No candidate code compiles or executes in the API. Offline packaging/seeding commands are documented in [R01](backlog/tasks/R01.md#validated-handoff--2026-10-23).
|
||
|
||
Independent G1/G2/security review accepted the final implementation. Validation: build/source/contracts, 93 tooling, 43 utility, 44 calculation, 509 integration and 150 Rust tests (four manual ignored), plus lint. Full disposable PostgreSQL/Redis suite: **122 tests / 903 assertions**. Release-addon focused strategy/API suite: **65 tests / 377 assertions**, plus the final contract edge case. Browser regressions: **6 workflows / 66 assertions**. Strict new-test/script types and scoped lint/format/diff checks passed. Initial allowlist/lint/declaration errors were corrected; the browser contract boundary now builds from current type source after a combined-suite generated-file read failure. Exact commands and evidence are recorded in `manifest.json` → `twentieth_wave_validation` and `/tmp/stock-bot-wave20.XIW6lx/`.
|
||
|
||
All catalog versions remain non-runnable until retained-artifact execution is integrated; approval does not enable execution. Original TypeScript source/full-run provenance are not claimed by the bundled-JS catalog. Current legacy workflows remain qualified and reject unsupported catalog version IDs. No financial Rust changes, default cutover, real catalog seeding, trading activation, profiling or benchmarks. The release addon matches the checkout library; both exact test fixtures were stopped. No R01 commit, push or PR. **Next after acceptance/commit: R10 evidence retention; R02 catalog screens are also eligible with disjoint ownership.**
|
||
|
||
## Twenty-first-wave handoff — 2026-10-23
|
||
|
||
R01 accepted and committed as `4a2e5ad`. R10 is independently reviewed and `validated_uncommitted`; isolated API/database and frontend worktrees are retained under `/tmp/stock-bot-wave21.u7PX8e/`. All 20 implementation/test files match reviewed hashes.
|
||
|
||
- **Retained evidence:** Migration 17 replaces definition/run/result deletion cascades with restrictions and protects runs, results and frozen datasets from destructive writes. Immutable run identity/receipt/snapshot/bound dataset fields are guarded; normal progress, lease recovery, cancellation, completion and initial binding remain writable. Legacy pending NULL snapshots still backfill once. Existing R01 artifact/checksum custody is reused.
|
||
- **Template archive/restore:** The API serializes archive, edit, delete and new-run admission on the parent row. Templates with any run return 409 on deletion, with count and archive guidance; runless/missing deletion retains 204 compatibility. Idempotent accepted receipt replay precedes archive checks. A database admission trigger also covers direct repository creation. Accepted work continues after archive; no separate run-archive lifecycle or purge framework.
|
||
- **Workbench:** Confirmation-backed archive/restore, archived list filter/badge, viewable read-only settings and disabled fresh submissions. Active cancellation, selected results/trades and ambiguous submission keys survive archive; delayed navigation/filter responses cannot overwrite current state. Archived saved URLs reopen normally.
|
||
- **Validation:** Full repository gates passed: 93 tooling, 43 utility, 44 calculation, 520 integration and 150 Rust tests (4 manual ignored), plus build/types/contracts/lint/secrets. Real PostgreSQL/Redis: 131 tests / 987 assertions. Chromium: 7 workflows / 79 assertions, including archive during admitted execution/cancellation and restored submission. Strict new/modern changed tests and scoped formatting/lint passed. Full commands/logs/hashes are in the canonical manifest.
|
||
|
||
The initial sandbox run could not support native worker IPC or fixture network access; full checks were rerun successfully outside it. Optional broad strict legacy harness checks retain pre-existing errors, recorded in the manifest. Release addon is restored and matches the prior wave hash; Rust code and financial semantics were unchanged. Disposable fixture containers were removed; development services were untouched. No performance work, new R10 commit, push, PR or trading/default activation.
|
||
|
||
Legacy economic/provenance limitations remain explicit; retaining evidence does not certify its economics or create missing version history. Next: R02 strategy catalog UI and version-aware setup. R05 still owns retained-artifact execution and canonical durable cutover.
|
||
|
||
|
||
## Twenty-second-wave handoff — 2026-10-23
|
||
|
||
R10 is accepted and committed as `8cca0ee`, superseding its uncommitted handoff above. R02 is `review` / `validated_uncommitted`. Thirty-nine implementation/shared-contract/migration/test files were integrated from isolated backend/frontend owners and root browser/fixture integration, with independent review. Worktrees/logs remain under `/tmp/stock-bot-wave22.fPRkAC/`.
|
||
|
||
- **Catalog and versions:** Browse/create/edit/archive strategy families; select immutable versions; clone with frozen retry identity; compare retained bundled JavaScript/schema/identities as escaped text. Parameter forms preserve omission, explicit empty strings, false, zero, typed enums and decimal strings, and require exact server validation. Version-linked execution/deployment history remains explicitly unavailable.
|
||
- **Saved backtest setups:** Migration 18 retains exact version IDs and normalized parameters separately from execution settings. Create, save, reopen and edit catalog setups in the existing workbench. Archive/restore resets visible parameter state and validation together. Legacy pacing stays out of strict catalog settings. Existing supported legacy strategies retain their qualified independent workflow.
|
||
- **Admission boundary:** Every catalog version remains non-runnable, including approved built-ins. API, direct repository and SQL gates reject before run/outbox creation; accepted legacy receipts still replay first. No legacy alias fallback, catalog/legacy mode conversion, browser code execution or fabricated provenance.
|
||
- **Validation:** Full checks passed: 93 tooling, 43 utility, 44 calculation, **541 integration** and **150 Rust** tests (4 manual ignored), plus build/source/contracts/lint/secrets. Full disposable PostgreSQL/Redis: **137 tests / 1052 assertions**. Final unfiltered Chromium suite: **8 workflows / 117 assertions**, including catalog selection/save/reopen/edit/archive/clone and existing native/frozen-dataset workflows. Strict new/modern changed tests and scoped lint/format/diff checks pass. Exact commands, source hashes and limitations are in `manifest.json` → `twenty_second_wave_validation`.
|
||
|
||
The browser gate exposed intermittent Chromium control-pipe loss across serial launches, not a financial assertion failure. Isolated workflows passed. The fixture now shares one suite-owned Chromium process while giving each workflow a fresh context/server/schema/queue; the complete suite passed without retries. Production workers are unchanged. The release addon matches the prior wave and checkout library; no Rust financial semantics changed. Both exact disposable containers were stopped; development services were untouched.
|
||
|
||
No new R02 commit, push, PR, performance work or trading/default activation. **Next after acceptance/commit: R05**, connecting verified retained executable identity and canonical reports to durable runs. Start with a trusted-built-in single-asset vertical slice; do not certify a retained hash while executing an unrelated current built-in. Candidate execution remains gated by A02 and multi-asset default by the explicit mark-policy decision. R03 research metadata is also ready for disjoint work, but does not unlock catalog execution.
|
||
|
||
## Twenty-third-wave handoff — 2026-10-23
|
||
|
||
R02 is accepted and committed as `d929db7`. The initial R05 vertical slice is independently reviewed and `partial_validated_uncommitted`; R05 remains **in_progress**. Fifty-four implementation/contract/migration/test files connect approved retained built-ins, eligible single-series v2 datasets and explicit financial/reporting settings to the existing durable Rust runner. Isolated worker, durable and frontend worktrees plus evidence remain under `/tmp/stock-bot-wave23.D3gFzn/`.
|
||
|
||
- **Executable provenance:** Admission freezes exact retained package/lock bytes, version/review, parameters, dataset hash, seed, financial/time/reporting policies and worker/native/runtime build identities. The child verifies and imports the retained bundle; it never substitutes a current built-in by name. Approval/archive changes serialize with admission; accepted receipts and snapshots remain usable afterward.
|
||
- **Durability:** One queue/runner/repository lifecycle handles leases, heartbeats, fencing, cancellation/reaping and atomic results. Corrupt data, wrong builds or a non-native runner fail without provider/legacy fallback. Migration 19 preserves retention and adds versioned canonical results without rewriting old rows.
|
||
- **Workbench:** Review built-ins, save exact canonical settings against a retained dataset, submit, inspect canonical Rust balances/owners/fills/metrics/provenance, and reopen results. Exact UTC/DST warmup boundaries survive save/admission. Zeros and unavailable reasons are preserved; fills do not become invented round trips. Cross-parent results and late navigation replies are rejected; canonical positive drawdowns use correct severity colours.
|
||
- **Validation:** All relevant gates passed across the recorded commands: build/source/contracts/secrets; 93 tooling, 43 utility, 44 calculation, **576 final integration** and **150 Rust** tests (4 manual ignored); full PostgreSQL/Redis **150 tests / 1154 assertions**, plus **13 final release-admission/durability tests / 106 assertions**; Chromium **9 workflows / 164 assertions**. The canonical browser fixture proves two expected fills, `9969.30000000` equity, exact saved provenance and zero provider reads. Final strict new-test/script checks, application lint, modern test lint, formatting and diff checks passed.
|
||
|
||
The initial aggregate check exposed stale pure-contract allowlists and lint issues; those were corrected and affected gates rerun. Optional lint over all touched old fixtures still reports eight existing curly-rule errors in two files changed only to apply migration 19; no suppressions or unrelated cleanup. Full commands, review dispositions and exact source hashes are in `manifest.json` → `twenty_third_wave_validation`. The release addon equals the prior wave/checkout release hash; Rust financial code is unchanged. Both exact disposable fixture containers were stopped; no development/production state was seeded or migrated.
|
||
|
||
Deployment requires the existing native research runner (`useRustEngine: true`) and matching immutable build files. Capability is input/artifact validation, not worker health. An incompatible deployment fails an accepted run; historical build restoration belongs to R12. [R05](backlog/tasks/R05.md#first-vertical-slice--2026-10-23) documents the explicit offline v2 import and remaining source-preparation contract. No candidate/multi-asset/default activation, benchmark or performance work, new-wave commit, push or PR.
|
||
|
||
**Next after acceptance/commit: R03 research projects, hypotheses and evidence-linked findings APIs.** It is independently ready and adds useful research workflow without pretending full R05 is finished. R05's source-to-v2 preparation and broader cutover remain tracked; R06/S06 dependencies are not released by this partial milestone.
|
||
|
||
## Twenty-fourth-wave handoff — 2026-10-23
|
||
|
||
The initial R05 slice is accepted and committed as `618fb9e`; full R05 remains **in_progress**. R03 is independently reviewed and `validated_uncommitted`. Eighteen implementation/shared-contract/migration/test files add the research metadata APIs. Persistence and HTTP agents worked in isolated worktrees under `/tmp/stock-bot-wave24.3Qsd1y/`; root owned contracts, evidence resolution, composition and integration.
|
||
|
||
- **Research organization:** Projects can organize existing strategies, hypotheses and notes/findings. Project edits and real membership changes advance revision identity. Hypothesis/artifact edits append immutable narratives with explicit authorship; stale edits return 409. Archive/restore preserves prior narratives and cited results, with actor/time recorded.
|
||
- **Evidence:** Findings cite known scalar paths on exact completed retained runs, optionally binding the retained strategy version. The existing result reader supplies canonical or qualified legacy values; no copied metric truth or simulator was introduced. Null reasons, genuine zeros, units and result limitations are preserved. SQL references protect retained results and prevent later additions to an old revision's evidence set.
|
||
- **Authorship:** Verified operator/service submitter is separate from declared human/AI/unknown content origin. A service cannot claim human authorship. All prose remains unvalidated; a citation does not certify a conclusion. No AI credential, code execution or review framework was added.
|
||
- **Correctness fixes during review:** Evidence resolution now uses the active transaction connection, avoiding deadlock when the pool has one connection. Corrupt retained storage produces a sanitized server error with its diagnostic cause, rather than blaming a valid client request. Project membership changes also preserve actor attribution and optimistic revision identity.
|
||
- **Validation:** `bun run check` passed all gates, including **590 integration** and **150 Rust** tests (4 manual ignored), plus build/source/contracts/secrets/lint, 93 tooling, 43 utility and 44 calculation tests. Full disposable PostgreSQL/Redis: **159 tests / 1279 assertions**. Existing Chromium workflows: **9 / 164 assertions**, including actual retained canonical execution/reopen. Strict changed-test types, scoped formatting/test lint and diff checks passed. No research UI is claimed by these browser regressions; that is R04.
|
||
|
||
Exact source hashes, commands and review dispositions are recorded in `manifest.json` → `twenty_fourth_wave_validation`. The release addon matches the previous wave and checkout release library; Rust financial source is unchanged. After the interruption, all 18 implementation hashes were reverified and both disposable containers were confirmed removed. Development/production services and data were untouched; worktrees and logs remain for review.
|
||
|
||
R03's [implemented API contract](backlog/tasks/R03.md#implemented-contract--2026-10-23) documents revision inputs, archive/error behavior and evidence limitations. Initial metadata POSTs use ordinary creation semantics, so clients must handle ambiguous responses without blind retries. No R03 commit, push, PR, new simulator, performance work or trading/default activation.
|
||
|
||
**Next after acceptance/commit: R04 — research workspace and save-findings UI**, consuming these same APIs. R05's remaining source preparation and wider cutover are still tracked; R06/S06 gates remain intact.
|
||
|
||
## Twenty-fifth-wave handoff — 2026-10-24
|
||
|
||
R03 is accepted and committed as `ee45257`. R04 is independently reviewed and `validated_uncommitted`. Seventeen implementation/test files add the web research workspace while retaining existing APIs, persistence and financial semantics. Two UI agents worked in isolated worktrees under `/tmp/stock-bot-wave25.X7zzoe/`; root owned shared browser contracts, navigation, evidence display and browser integration.
|
||
|
||
- **Workspace:** Create/edit/archive projects, link catalog strategies, create hypotheses and notes, and view or revise immutable narratives. History URLs retain exact revision IDs. Archived projects remain readable. Declared AI/human authorship is separate from authenticated submitter, and prose stays unvalidated.
|
||
- **Findings:** Completed matching results offer a project/hypothesis/metric selector. Only reference identities are submitted; R03 resolves actual measurements. Display includes raw values, units, unavailable reasons, financial engine, dataset and exact run/version links. Existing findings keep their references when prose changes; legacy evidence remains qualified.
|
||
- **Failure behavior:** Duplicate clicks, late navigation responses, lost save responses, malformed success envelopes and stale revision conflicts have focused coverage. Ambiguous creation freezes the draft until explicit review/new request. Review caught and fixed draft loss during failed project refresh and same-entry discard behavior.
|
||
- **Validation:** Build/types/contracts/secrets, **628 integration**, **150 Rust** (4 manual ignored), 93 tooling, 43 utility and 44 calculation tests passed. Two new curly-rule lint issues were fixed and final source/test lint passed. Final focused UI/client tests: **38 / 207 assertions**. Strict changed-test types and formatting/diff checks passed. Real Chromium/PostgreSQL/Redis: **9 workflows / 184 assertions**. The expanded canonical browser fixture covers project → linked strategy → retained run → exact finding → revision/reload/archive → unchanged original result, preserving the expected two fills, `9969.30000000` equity and `0.70000000` fees.
|
||
|
||
The initial sandbox check stalled on native-worker IPC; permitted checks passed. Browser development caught a fixture endpoint allowlist omission and a test that read history before the revision response committed; both were corrected, and the final full suite passed without retries. The full standalone SQL suite was not rerun because backend/schema sources are unchanged; real browser fixtures exercise the existing research API and database. The release addon matches the previous wave and checkout release library. Exact hashes, commands, review and cleanup are recorded in `manifest.json` → `twenty_fifth_wave_validation`.
|
||
|
||
No backend financial authority, second evidence store or creation-receipt framework was added. Initial metadata creation still cannot guarantee exactly-once semantics across an ambiguous response; the UI makes this explicit. No performance work, new-wave commit, push, PR, candidate execution, default/multi-asset activation or trading operation occurred.
|
||
|
||
**Recommended next product slice: R12 original-run reproduction**, limited to already-retained inputs and a supported installed build. The current manifest still blocks R12 on full R05. Before implementation, record its narrower component prerequisite and pin lineage/admission/current-approval rules; migration 19 presently binds ordinary admission to current template settings, so snapshot copying alone is insufficient. Keep R05 incomplete, R06/S06 gated, and historical build provisioning/source preparation outside that slice.
|
||
|
||
## Twenty-sixth-wave handoff — 2026-10-24
|
||
|
||
R04 is accepted and committed as `e3bd708`. R12 is independently reviewed and `validated_uncommitted`. Twenty-six implementation/test files add original reproduction through the existing durable runner, retained artifacts and financial engine. Backend/frontend agents used disjoint worktrees under `/tmp/stock-bot-wave26.38tu9A/`; root owned shared contracts, comparison, migrations/fixtures and browser integration.
|
||
|
||
- **Original versus current:** the run detail previews the original dataset, immutable strategy version, parameters, financial policies and build. Reproduce original creates a new linked run; ordinary submission continues to use current template settings. Missing inputs or unsupported builds remain explicit, with old results readable.
|
||
- **Guarded admission:** authenticated preview/POST/comparison routes preserve the original economic request. Only new run/session/account identities and current approval of the original version change. Migration 21 enforces immutable lineage, retained identity and source-copy guards. Accepted idempotency receipts precede current eligibility checks; no provider or current-code fallback.
|
||
- **Comparison:** versioned server-side hashes cover the complete validated request, Rust financial envelope and canonical analytics. Normalize only admission identity; retain actual market sessions, owner/order/fill IDs, monetary strings, null reasons and ordered arrays. No second accounting implementation.
|
||
- **UI reliability:** ambiguous submissions retain the same intent/key; late responses cannot navigate away from a newer selection. Lineage and match/mismatch diagnostics survive reload. The existing controls test now restores its own ResizeObserver harness correctly.
|
||
- **Validation:** full repository check passed, including **662 integration and 150 Rust tests** (4 manual Rust ignored), build/source/contracts/secrets/lint and 93 tooling/43 utility/44 calculation tests. Full PostgreSQL/Redis: **169 tests / 1376 assertions**. Chromium: **9 workflows / 215 assertions**, including actual original-versus-current execution and receipt replay. Focused SQL: **10 / 97**; independent UI: **106 / 555**; independent HTTP/hash: **10 / 96**. Strict changed-test types, scoped lint/format and diff checks passed.
|
||
- **Recorded identity:** source archive/hash and all 26 authored file hashes are in `manifest.json` → `twenty_sixth_wave_validation`. Release addon SHA256 `ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103` matches the previous wave; no Rust semantics changed. Both exact disposable test containers were stopped; development services were untouched.
|
||
|
||
Scope is completed retained canonical single-asset trusted built-ins on the same installed build. Hash agreement proves matching retained economic outputs, not statistical validity or profitability. Historical executable provisioning, provider-to-v2 preparation, candidate isolation and multi-asset/default cutover are not included. R05 remains partial; R06/S06 remain blocked. No performance optimization, profiling, benchmark, new-wave commit, push, PR or trading operation occurred.
|
||
|
||
**Recommended next wave:** an R06 retained-input experiment component, then a focused R07 sweep UI against pinned APIs. One immutable strategy version, eligible single-asset dataset, installed build and fixed policies; deterministic bounded parameter grids expand into the existing durable runs/outbox. Independent review confirms provider preparation is not required for those retained inputs. Before execution, record component prerequisites without marking full R05/R06 complete or silently releasing R06/R07/S06. Experiment admission needs its own SQL guard against the immutable manifest; do not mutate templates per trial or misuse reproduction lineage. Failed retry must preserve diagnostics and fencing; if omitted initially, leave R06 partial. No parallel worker scheduler or performance work. Root owns contracts/browser integration; one backend owner and one frontend owner can work with an independent reviewer.
|
||
|
||
## Twenty-seventh-wave handoff — 2026-10-24
|
||
|
||
R12 is accepted and committed as `30accfc`. R06/R07 retained-input components are independently reviewed and `partial_validated_uncommitted`; both full tasks remain in progress. Thirty-five implementation/test files deliver the first bounded experiment workflow through the existing APIs, durable runs and authoritative Rust engine. Backend/frontend worktrees are under `/tmp/stock-bot-wave27.iR6JOC/`; root owned shared contracts, composition, existing fixtures and browser acceptance.
|
||
|
||
- **Usable research flow:** start from a saved canonical backtest or Experiments, enter a named parameter grid, preview the exact retained dataset/version/window/build/policies, submit and inspect every candidate. Detail shows scalar metrics, units/null reasons, failures, missing/incomparable outcomes and exact saved-run links. Explicit refresh, cancellation and reopening are supported.
|
||
- **One execution path:** at most 100 trials are atomically admitted with the experiment receipt and existing dispatch outbox. Only validated strategy parameters and new run/account/session identities vary. All combinations must pass retained schema and built-in cross-field validation; normalized duplicates and reserved keys reject. No template rewrite loop, second scheduler, accounting logic or runner rewrite.
|
||
- **Reproducible admission:** the submit body commits to its preview hash, including current review/build and retained manifest. Drift rejects before persistence. Accepted receipts replay before current eligibility checks. SQL22 protects immutable experiment/trial identity, exact request reconstruction, current approval and retained inputs; ordinary/reproduction admission behavior is preserved.
|
||
- **Truthful outcomes:** cancellation latches and stops pending trials while existing workers acknowledge active cancellation. Terminal results remain unchanged. Detail counts come from the same loaded trial rows; comparison validates complete v1 statistical conventions and compact financial identity/policy. Summaries read selected JSON fields without financial/trade/OHLC/return arrays and do not recalculate economics.
|
||
- **Validation:** full repository check passed **696 integration and 150 Rust tests** (4 manual Rust ignored), plus 93 tooling / 43 utility / 44 calculation tests and build/source/contracts/secrets/lint. Full disposable PostgreSQL/Redis: **179 tests / 1508 assertions**. Full Chromium: **10 workflows / 258 assertions**, including actual varied-parameter native trials, rendered returns, receipt replay, post-admission template changes, standalone reproduction of an experiment trial, cancellation and reopening. The initial new browser selector included nested option text; correcting the selector resolved the test without production changes. Scoped strict types, lint, formatting and diff checks passed.
|
||
- **Independent review:** all 14 agent-owned hashes verified. Combined experiment contract/API/UI tests independently passed 34/230; isolated PostgreSQL/native 10/132 evidence reviewed. Review corrected pre-parser reserved-key loss, normalized duplicates, count/read consistency, full provenance comparisons, cancellation fencing, owned-link draft loss and retained timeframe rendering.
|
||
- **Recorded identity:** the manifest holds all 35 source/test hashes and archive identity. Release addon SHA256 `ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103` matches the previous wave. Both exact disposable containers were stopped; development services were untouched.
|
||
|
||
Full R06 remains incomplete until failed-trial retry preserves prior diagnostics and passes stale-attempt fencing tests. R07 broader comparisons/table measurement remain outstanding; all performance work stays paused. R05 provider preparation and broader cutover remain partial; R08/A01/S06 are not silently released. No candidate/multi-asset/default/paper/live/AI execution, new-wave commit, push or PR occurred. Editor retry state lives in the current page; saved experiments and accepted receipts are durable. Hash/provenance agreement does not establish strategy merit.
|
||
|
||
**Next after acceptance/commit: complete R06 failed-trial retry** using the same immutable logical run and existing attempts/outbox. Append prior diagnostics before clearing active errors; reject retries with stored results or completed/cancelled state, retain old-attempt fencing and add a focused UI action only after the backend contract passes. Performance remains paused.
|