docs: close P08 and O02 and record conditional no-go decisions
This commit is contained in:
parent
8c858b9d5c
commit
1a9f07b285
13 changed files with 323 additions and 43 deletions
54
docs/development/conditional-review.md
Normal file
54
docs/development/conditional-review.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# Conditional backlog review — October 28, 2026
|
||||
|
||||
The owner authorized judgment on all seven remaining conditions and explicitly resumed performance. This review uses the existing task IDs. Rust still owns all financial semantics; TypeScript remains the strategy and product language. No trading activation, financial-policy change, DSL, worker-lifecycle change or new framework is included.
|
||||
|
||||
## Decisions
|
||||
|
||||
| Task | Decision | Evidence and benefit |
|
||||
| --- | --- | --- |
|
||||
| P08 | Implement the local runtime optimization and retain its benchmark | Strict descriptor-checked JSON copy/freezing is expensive; fuse those passes without changing author state, decisions or acknowledgements. |
|
||||
| O02 | Implement truthful read-only diagnostics in the existing API/UI | Legacy monitoring fabricated zero measurements and omitted the research queue. Expose actual observations and explicit unknowns, not readiness inferred from HTTP liveness. |
|
||||
| D04 | No-go for now; deferred | SMA calculation consumed only 7–10 ms across three instrumented sessions, versus roughly 2.0–2.3 s in state copying/freezing. A feature cache does not address that bottleneck. Reopen for measured identical feature work across real consumers. |
|
||||
| P03 | No-go for now; deferred | No durable-batch profile isolates repeated dataset admission. Preserve one-request process isolation and hard cancellation; do not infer resident-worker benefit from direct warmed sessions. |
|
||||
| P05 | No-go for now; deferred | `experiments.service.ts` already selects compact metadata without trade/OHLC arrays; complete retained exports exist. Reopen against an actual slow detail query/render workload. |
|
||||
| P06 | No-go for now; deferred | Both execution modes would already share the Rust kernel; the old competing-accounting finding is resolved. A measured local TS improvement is simpler than introducing another strategy representation. Reopen for a concrete screening workload, small useful subset and bounded prototype budget. |
|
||||
| CL21 | No-go for now; deferred | No upcoming calendar/timeframe edit needs a private replay split. Keep validated replay intact until an actual change benefits from extraction. |
|
||||
|
||||
“No-go for now” does not mean implemented, cancelled forever, or proven incapable of improving future workloads. Task status and exact reopen conditions remain in the [manifest](backlog/manifest.json).
|
||||
|
||||
## P08 measurements and preserved behavior
|
||||
|
||||
Run `bun run scripts/benchmark-research.ts --sma --measure` after a matching release addon build. Without `--measure`, it performs a smaller parity smoke check. The command rejects incompatible session/profile selections and invalid topology/periods. Ten-assets/two-owners means eight replayed but untraded assets, **not** equivalent strategy work to ten owners. Every full workload has **10,000 total bars**.
|
||||
|
||||
[Retained raw samples and identities](measurements/p08-state-copy.json) include a full baseline/candidate/candidate/baseline matrix, eight samples per variant/mode/shape, and a separate interleaved candidate/baseline/baseline/candidate confirmation on CPU 2. Native SHA256: `68f0134e166201cafd773d702c45f8d06870343a7d5e90ffb21df398c36f1cec`. Source, runtime, configuration, dataset, decision tape and complete economic hashes are retained. No concurrent test/build ran during these retained comparisons.
|
||||
|
||||
| 15/252 workload | Full matrix baseline → candidate median | Interleaved confirmation baseline → candidate median |
|
||||
| --- | --- | --- |
|
||||
| One asset / one owner | 2,188 → 2,079 ms | 2,422 → 1,845 ms |
|
||||
| Ten assets / ten owners | 1,534 → 1,386 ms | 1,541 → 1,343 ms |
|
||||
|
||||
The full-matrix single-owner distributions overlap substantially because of host variation. Its 5% median is not a reliable general performance promise. In the confirmation, four candidate and four baseline samples have nonoverlapping ranges in both workloads. The full matrix also checks shorter windows and the sparse-owner topology. These are synthetic warmed sessions, **not** durable-job latency, storage throughput, cold-start SLAs, or isolated NAPI crossing costs.
|
||||
|
||||
Separate coarse instrumentation identified copying/freezing, not arithmetic, as the useful local target. It includes timer overhead; allocation counts are not measured. The patch removes descriptor-map intermediates and the second recursive traversal by freezing each detached container when copying finishes. It still validates descriptors, prototypes, finite numbers, negative zero, symbols, sparse arrays and cycles. Getters never execute. Aliases detach independently; author-owned objects remain unfrozen. Owner state/RNG/diagnostics still commit only after valid native acknowledgement. All retained comparisons preserve exact financial and diagnostic hashes; there is no TypeScript accounting oracle.
|
||||
|
||||
## O02 diagnostic semantics
|
||||
|
||||
- Orchestrator `GET /api/diagnostics` reads existing pool/attempt state, local artifact identity and existing paper status. It launches no worker and performs no activation, recovery or feed operation.
|
||||
- Web API `GET /api/system/monitoring/readiness` observes PostgreSQL attempt leases, the actual research queue and the fixed configured orchestrator origin. It forwards the original credential with redirects disabled and a timeout. Connection errors/credentials are not echoed. Set `ORCHESTRATOR_URL` to the fixed orchestrator HTTP origin if it is not configured.
|
||||
- Research prerequisites can be unavailable or unknown. A BullMQ worker/readable binary does not prove native execution. `unverified-until-run` is explicit; each real run retains its existing build/admission validation. No synthetic probe engine or new worker protocol is introduced.
|
||||
- The monitoring card shows observation time, explicit refresh/loading/error/retry, unknown versus measured zero, local run/attempt/strategy phase, expired SQL leases, paper feed/recovery/halt and live-disabled. An older successful snapshot is removed before a refresh; unmounted requests cannot update a new view. Deployment-specific paper readiness remains authoritative.
|
||||
- Existing fenced failure strings now retain the actual supervisor phase and reuse logger redaction. No database migration, ledger/event change or additional execution history is required. Historical error strings remain readable.
|
||||
- Cache key counts, request/error metrics, remote uptime and liveness-only service health remain unknown when unmeasured. Queue inspection creates no workers, includes research, and returns unknown counts on failure. The hardcoded localhost Redis test route is removed.
|
||||
|
||||
Root performed the scope/invariant review in this solo continuation; no independent agent review is claimed. Final verification and completion state are recorded in the manifest. Existing unsupported multi-asset default policy, paper/live activation and real account migration gates remain unchanged.
|
||||
|
||||
## Completion and verification
|
||||
|
||||
**99 done / 5 deferred / 4 merged = 108 retained IDs.** No selected task remains active. Commits: P08 `70d173a9`; O02 `8c858b9d`.
|
||||
|
||||
- Full `bun run check`: 171 tooling, 43 utility, 44 calculation, 1,563 integration and 150 Rust tests passed; 14 existing integration skips and four ignored Rust tests remain. Build, source/contracts types, lint and secrets audit passed.
|
||||
- Disposable PostgreSQL/Redis: 284 tests / 2,923 assertions passed, including failure recovery, fencing, isolation and paper accounting. Both containers were stopped and removed.
|
||||
- Production Chromium: all 27 workflows / 971 assertions passed. After the final cancellation-notification correction, the two affected browser workflows passed again on committed source and the release addon. An extra filtered invocation first used a frontend overwritten by the normal development build; the same-origin rebuild fixed the fixture configuration without source changes.
|
||||
- Final matching release addon: 90 focused regressions / 1,383 assertions passed. Its SHA256 matches the artifact used for measurements. Authored tooling/tests pass strict TypeScript separately.
|
||||
|
||||
The initial sandbox IPC run and initial browser expectation/allowlist failures were corrected; they are not reported as passing runs. Exact commands, log hashes, review limits and source commits are in the manifest. No pushes, PRs, real-data research or paper/live activation occurred.
|
||||
Loading…
Add table
Add a link
Reference in a new issue