docs(research): record bounded signal study and close RP21/RP22

This commit is contained in:
Boki 2026-10-27 21:48:50 -04:00
parent b7116473e6
commit 24d20dd5d8
5 changed files with 95 additions and 16 deletions

View file

@ -8,7 +8,7 @@
[manifest.json](manifest.json) owns scheduling metadata: status, priorities, dependencies, ADR approvals, assignments and write locks. Task Markdown owns implementation scope/evidence/acceptance. This index and the [graph](dependencies.mmd) are derived views. Only the planning/integration owner updates scheduling state.
**Current total: 98 retained IDs — 85 done, 1 in progress, 1 blocked, 7 deferred, 4 merged.** RP18 completes the bounded October multi-session pilot; RP01–RP17 add the authorized real-data workflow and its dataset reuse, export and workflow recovery follow-ups. The earlier 68 IDs retain their state. E11 adds seven authorized cleanup tasks and one conditional replay extraction; see the manifest for current scheduling. The original backlog accounted for 55 IDs. F09/P07 added projection/profiling work; the owner deferred P08's TypeScript optimization. Merged records preserve traceability; never execute them separately. Deferred work requires its stated trigger and explicit activation.
**Current total: 98 retained IDs — 87 done, 7 deferred, 4 merged.** RP18 completes the bounded October multi-session pilot; RP01–RP17 add the authorized real-data workflow and its dataset reuse, export and workflow recovery follow-ups. The earlier 68 IDs retain their state. E11 adds seven authorized cleanup tasks and one conditional replay extraction; see the manifest for current scheduling. The original backlog accounted for 55 IDs. F09/P07 added projection/profiling work; the owner deferred P08's TypeScript optimization. Merged records preserve traceability; never execute them separately. Deferred work requires its stated trigger and explicit activation.
States: ready, claimed, in_progress, review, done, blocked, deferred, merged. “Ready” means no code/ADR prerequisite, not execution authority. Implementation dependencies require accepted integration. `release_gates` govern enabling an end-to-end feature, not component coding or integration; conditional gates apply only to the named capability. F05 may integrate before F06, but its replay behavior is not released until F06 proves it.
@ -193,6 +193,6 @@ Owner authorized planning and per-task implementation commits. [Execution plan a
- [RP20: Production research authentication](tasks/RP20.md) — done, `7de497e9`; normal API startup uses the existing research resolver, with actual issued-credential and quota regressions.
- [RP21: Bounded volatility-filter study](tasks/RP21.md) — blocked by RP22; inputs reviewed, original first-admission receipt retained with zero runs; two fixed isolated mean-reversion configurations, retrospective September holdouts and at most ten trials. Reuses existing candidate code.
- [RP21: Bounded volatility-filter study](tasks/RP21.md) — done; ten isolated trials, exact receipt recovery, independently audited results and reopened findings. Both variants lost money on test and whole-window cost runs; credential revoked.
- [RP22: Candidate decimal admission](tasks/RP22.md) — in progress; preserve known-program decimal normalization without changing original research input.
- [RP22: Candidate decimal admission](tasks/RP22.md) — done, `b7116473`; additive SQL33 preserves known-program decimal normalization and exact raw-input receipts.

View file

@ -1,8 +1,8 @@
{
"schema_version": 1,
"plan_revision": "2026-10-27.116",
"plan_revision": "2026-10-27.117",
"repository_base": "b7aeca4",
"plan_status": "candidate_decimal_admission_fix",
"plan_status": "bounded_signal_study_complete",
"execution_authorized": true,
"execution_scope": {
"authorized_by": "Owner: commit and continue with the rest of the tasks till 100%",
@ -3659,7 +3659,7 @@
"epic": "E12",
"priority": "P2",
"severity": "Medium",
"status": "blocked",
"status": "done",
"dependencies": [
"RP20",
"A02",
@ -3676,15 +3676,21 @@
"write_locks": [
"aapl-september-signal-study"
],
"blocker": "SQL32 compares raw minNotionalVolume string with normalized known-program request. First training admission rolled back; zero runs/experiments. Preserve exact receipt.",
"integration_state": "inputs_reviewed_admission_recovery_pending",
"blocker": null,
"integration_state": "validated_external_workflow",
"completion_evidence": "real-data-research.md",
"release_gates": [],
"review_status": "pending",
"review_status": "accepted",
"completed_commit": null,
"authorization": "Owner continuation follows bounded AI signal-study recommendation. At most ten isolated research trials on fixed September partitions. No fabricated human review, paper/live activation or deferred optimization.",
"scope_notes": "Reuse unchanged bundled mean-reversion code in existing isolated-candidate mode; two fixed configurations differ only by volatility filter. No candidate source rewrite. Availability inventory only; no September prices/returns or results inspected. See task for frozen parameters, policy, windows, limits and evidence requirements.",
"integration_base": "2949680b"
"scope_notes": "Completed exact frozen two-variant September study using unchanged bundled MR artifact. No additional tuning, replacement trials, strategy source rewrite or paper/live activation. See evidence for retrospective source/availability and short-holdout limitations.",
"integration_base": "2949680b",
"reviewer": "/root/review_recovery_changes",
"planning_commit": "2949680b",
"execution_claim_commit": "86013538",
"execution_fix_commit": "b7116473e6902e52d5ffcb89b2ccaa77cf9951c0",
"artifact_directory": ".data/research-pilots/aapl-202409-signals/",
"review_notes": "Ten isolated trials completed once; original raw input/body/key/preview hash and four acknowledged resources preserved across RP22 recovery. Independent input (25,078), financial (49,406) and closure (513) assertions passed; all 42 stored scalar references (34 distinct run/metric pairs) reconcile. Seven real web views reopened; saved run rows unchanged. Final risk section reopening is distinct from numerical native-artifact checks. Dedicated credential revoked and actual token request rejected with 401. Both test and whole-window cost returns negative; no alpha/deployment claim."
},
{
"id": "RP22",
@ -3692,7 +3698,7 @@
"epic": "E12",
"priority": "P1",
"severity": "High",
"status": "in_progress",
"status": "done",
"dependencies": [
"A02",
"RP17"
@ -3705,12 +3711,17 @@
"candidate-parameter-sql-admission"
],
"blocker": null,
"integration_state": "planned",
"review_status": "pending",
"completed_commit": null,
"integration_state": "accepted",
"review_status": "accepted",
"completed_commit": "b7116473e6902e52d5ffcb89b2ccaa77cf9951c0",
"completion_evidence": "real-data-research.md",
"release_gates": [],
"authorization": "Necessary regression fix discovered during authorized RP21 execution; preserve frozen strategy/financial policy and exact failed receipt."
"authorization": "Necessary regression fix discovered during authorized RP21 execution; preserve frozen strategy/financial policy and exact failed receipt.",
"reviewer": "/root/review_recovery_changes",
"planning_commit": "b51612e5",
"branch": "rp22/candidate-decimal",
"worktree": "/tmp/stock-bot-rp22-decimal",
"review_notes": "Known-program strict fixed-eight comparison only; existing admission/financial guards and raw inputs preserved. Final PostgreSQL gate passed 14 tests / 310 assertions; actual AI fixture explicitly advanced to SQL33 and passed 4 / 178. Integration passed 1,382 tests with 14 existing conditional skips. Types/contracts/lint/format/secret/diff passed; no build during frozen study. Normal runner verified exact installed migration (already registered by dev startup), zero study runs/receipts and unchanged build before exact recovery."
}
],
"review_note": "Independent skeptical revision: four superseded tasks retain stable IDs; deferred work is not a dependency of scheduled tasks. Release gates are distinct from implementation prerequisites.",

View file

@ -58,3 +58,5 @@ Relevant paths: `apps/stock/orchestrator/src/strategies/canonical-mean-reversion
Availability-only inventory on October 27 read timestamps/counts/null-volume counts, not prices or returns: September contains 20 dates, each 79 raw rows from 13:30 through 20:00 UTC. Strict session capture must establish that the selected 78 rows are valid. September was chosen from coverage before its price inspection, but is earlier than the already inspected October pilots: this is **predeclared retrospective holdout research**, not prospective validation after October or a guarantee against global selection bias. Fixed AAPL selection and a dataset captured in 2026 are also retrospective. The small partitions cannot establish durable alpha.
[Nasdaq's Labor Day notice](https://www.nasdaqtrader.com/TraderNews.aspx?id=ETA2024-49), [2024 calendar](https://www.nasdaqtrader.com/content/technicalsupport/2024tradingcalendar.pdf) and [hours](https://www.nasdaq.com/market-activity/stock-market-holiday-schedule) support the declared sessions. An action-free September is an inference from [Apple's dividend/split history](https://investor.apple.com/dividend-history/), not a certified action feed. [EOD's intraday documentation](https://eodhd.com/financial-apis/intraday-historical-data-api) describes UTC bar starts and delayed finalization/corrections: interval-end availability is a simulated zero-delay assumption, not observed vendor arrival.
Accepted October 27, 2026 (America/Toronto): ten single-attempt isolated trials completed with the exact frozen artifact, policy and partitions. RP22 fixed a SQL comparison defect before the first experiment existed; explicit receipt-backed continuation reused the original acknowledged resources, raw input, key and preview hash. Both variants had negative net test and whole-window cost results. Independent input, financial and closure audits passed 25,078 / 49,406 / 513 assertions. Seven actual web views reopened, results stayed unchanged, and the dedicated credential was revoked and rejected with 401. No new strategy code, extra trials or deployment. [Execution evidence](../../real-data-research.md#rp21--bounded-volatility-filter-study) records findings, identities and limits; the original predeclaration above remains unchanged.

View file

@ -18,3 +18,5 @@ Acceptance/tests:
- After review/commit, apply through the normal migration runner's lock/transaction. Reopen the study's original receipt state, retry only the exact idempotent stopped request and continue from saved acknowledged resources. Never restart the entire cycle, recreate its hypothesis/family/version, alter risk/parameters, or exceed ten trials.
Exclusions: general SQL parameter engine, signal changes, migration history rewrites, deleting/replacing research artifacts, new candidate/version IDs for recovery, paper/live activation, performance work. Regression risk is weakened direct SQL validation or string coercion in arbitrary strategy schemas. Compare independently with the actual TypeScript parser; retain the original failed receipt as evidence.
Accepted October 27, 2026: planning `b51612e5`, implementation `b7116473`. Independent review accepted strict known-program normalization and receipt recovery. Strengthened direct/startup/AI PostgreSQL checks passed 14 tests / 310 assertions; the AI fixture was then explicitly advanced to SQL33 and reran 4 / 178. Integration passed 1,382 tests, with 14 existing conditional skips. Application/authored-test types, contracts, lint, formatting, secret audit and diff checks passed. No build changed RP21's retained worker/native/sandbox bytes. Normal runner verification confirmed the exact installed function and zero study runs before the unchanged request was recovered. [Evidence and limitations](../../real-data-research.md#rp22--decimal-admission-and-exact-receipt-recovery).

View file

@ -353,3 +353,67 @@ Validation:
Two new database assertions initially used the wrong existing contracts: admission is 202 rather than 201, and trial ownership uses `research_agent_id` while experiment submission uses `submission_principal`. Both were corrected against the route and SQL28 contracts; no application change followed. Logs: `/tmp/stock-bot-rp20-baseline.log`, `/tmp/stock-bot-rp20-independent-security.log`, `/tmp/stock-bot-rp20-check.log`, `/tmp/stock-bot-rp20-postgres.log`, `/tmp/stock-bot-rp20-postgres-final.log`, `/tmp/stock-bot-rp20-postgres-accepted.log`, `/tmp/stock-bot-rp20-root-types.log` and `/tmp/stock-bot-rp20-root-lint.log`.
Next, [RP21](backlog/tasks/RP21.md) predeclares a September volatility-filter comparison using the existing bundled mean-reversion candidate and at most ten runs. Only timestamps, counts and missing-volume counts were inspected for that window so far; no September price/return analysis or research submission occurred. Reusing the already-tested isolated artifact avoids new strategy code. The plan labels the earlier-than-October window as retrospective holdout research and keeps all seven conditional tasks deferred.
## RP21 — Bounded volatility-filter study
Completed October 27, 2026 (America/Toronto; runtime receipts extend into October 28 UTC). The predeclaration was committed in `2949680b`; execution claim/source freeze was `86013538`. Both candidate versions use identical existing mean-reversion bundle bytes in OS isolation, with only `regimeFilter` differing. No strategy, indicator, financial-policy or performance optimization was implemented for this study.
The source capture contains 1,580 rows. Exactly 20 session-close null-volume markers fall outside declared half-open sessions; all 1,560 selected bars remain unchanged and pass strict OHLCV/grid validation. Repeated API preparation produces the same dataset. The package and numeric rules were frozen before September prices were captured. September precedes the previously inspected October pilot, so this is retrospective holdout research, not prospective validation or proof against global selection bias.
| Retained identity | Value |
| --- | --- |
| Dataset | `f116a5d8107fe1dba62d7e019167d56df75cc634e3b6b601e5962d39b36e9804` |
| Raw capture SHA256 | `fe26c5981caef9e74a5ce896b6dc428e30fbac204e572bd107b67b0703ba83f9` |
| Strategy source revision | `86013538a15a9153b721ea99ddcad4c6b6beaede` |
| Shared candidate artifact SHA256 | `83a4a9c99dd779a02370efd00a8374f279d5121068950201cdd8cb45245f04d6` |
| Native binary SHA256 | `df0ecbd5c3772d7e8aeb0226b40ae290cfaddf9d87fb3a7375f2a31c2acf05e5` |
| Project / template | `47b266ab-7b26-43a1-afcd-05549a42ea6a` / `58101664-11cd-4a4b-b1a2-6f50aa0d819d` |
| Filtered / control versions | `dd1d183f-fbda-4fd6-85f9-15deab39c79e` / `cb90aeff-9cc9-4ae1-abcd-27b827e724d3` |
| Filtered / control validations | `711c3582-b7ff-4f1b-9530-d481b4e5b3ad` / `54f0528c-fdf4-46ab-a836-ec00950942aa` |
| Filtered / control cost experiments | `e92b2e25-faf4-40c7-8b79-e41722d96a7c` / `7fe11ce2-cd76-481c-aa97-d78ea55f362e` |
| Summary finding | `9a06b519-3b40-4a34-a2ff-56cef093c594` |
All **ten trials completed once**, with no manual retry or replacement run. Each variant used one training run, independent validation/test accounts, and baseline/stressed whole-window costs. Training evaluated September 4–16, validation September 17–23 and test September 24–30; every phase used its declared preceding session as warmup. Each singleton training selection froze its own parameters, rather than selecting between the two variants before holdouts.
The following are native net returns, displayed as percentages (stored metrics are fractions):
| Phase | Volatility filter | Unfiltered control | Complete reporting periods |
| --- | ---: | ---: | ---: |
| Training | −0.245725% | −0.279616% | 8 |
| Validation | +0.052139% | +0.052139% | 4 |
| Test | −0.007529% | −0.008730% | 4 |
| Whole-window baseline costs | −0.201115% | −0.236207% | 18 |
| Whole-window stressed costs | −0.802065% | −0.886521% | 18 |
Filtered/control test equity was `9999.24714560` / `9999.12700558` from capital `10000`. Validation economics match; test executions differ slightly despite equal 12-fill counts. Whole-window baseline fills numbered 48 / 52, with fees `42.92498589` / `46.45098852`. Baseline gross realized P&L was `22.81348996` / `22.83027744`: the filtered variant's higher net result in that window reflects lower assumed fees despite slightly lower gross P&L. This is descriptive accounting, not proof of predictive value.
Within each variant, the baseline and stress scenarios have matching executed timestamps, sides, quantities and instruments, with different prices/fees. All retained terminal marked holdings are zero and final daily/drawdown halt flags are false. Final snapshots do not establish every earlier halt or rejection. No liquidation was invented. Phase accounts reset; returns are not a compounded portfolio. Reporting periods are opening-to-opening, with terminal partial periods, not exchange-close daily returns. Four complete periods per holdout and retrospective single-asset selection do not establish significance, robust alpha or useful annualized performance. The test interval is now inspected; no new tuning/search was authorized by these results.
Three AI-authored, unvalidated findings were saved through the dedicated research credential: two sealed-report findings and the cross-variant conclusion. Their 42 stored scalar references represent 34 distinct run/metric pairs. The credential was revoked after the final write, and its actual budget request returned 401. No paper/live deployment or additional experiment was activated.
Independent `/root/review_recovery_changes` accepted file-only audits of **25,078 input**, **49,406 financial/result**, and **513 closure assertions**. These reconcile exact fixed-eight fills, fees, released basis, ownership, cash/equity/marks, exposure bounds, package/build/policy identities, phase slices and report hashes, single-attempt run inventory, receipt recovery and all evidence references. File audits do not independently prove absence of unrelated database writes or certify vendor availability/action assumptions.
Actual Chromium reopened both test results and fills, both sealed reports and both cost experiments, plus the [project and summary finding](http://localhost:5173/research/47b266ab-7b26-43a1-afcd-05549a42ea6a). It checked report hashes, 30 visible summary evidence links and unchanged saved run rows. The final-risk **section** survived result reload; numerical flags were verified separately from retained native artifacts. The browser blocked all non-read API requests except authentication.
Runtime evidence remains in ignored `.data/research-pilots/aapl-202409-signals/`: immutable predeclaration/package/source, original and continuation journals, requests/results, reopened reports, findings, revocation proof, browser record and independent audit scripts/reports. `execution-status.json` and `execution-summary.json` index the completed work. Source/availability limitations remain those in the committed RP21 task and `evidence.json`.
Pre-execution gates passed: 53 strategy/package/cycle tests / 367 assertions, 14 actual sandbox tests / 58 assertions, and four actual AI workflow tests / 178 assertions using a disposable PostgreSQL database. The first read-only sandbox identity attempt was denied by filesystem permissions and succeeded with the permitted rerun. A helper's wrong validation argument was corrected before any package/data write. No host-execution fallback or rebuild occurred. Logs: `/tmp/stock-bot-rp21-preflight-{strategy,sandbox,ai-workflow}.log`, `rp21-execution.log`, `rp21-recovery.log`, `rp21-close.log` and `rp21-browser.log`, all under `/tmp/stock-bot-`. The initial real admission failure is explained below.
## RP22 — Decimal admission and exact receipt recovery
The first real filtered training submission returned HTTP 500. PostgreSQL's SQL32 guard compared raw `minNotionalVolume: "0"` against the known program's normalized `"0.00000000"`. Existing workflow fixtures supplied already-normalized parameters and missed this valid-input failure. Read-only inspection of the exact principal/key and template established **zero committed experiments and zero runs**; the client preserved its stopped receipt. No candidate outcome was replaced or hidden.
Plan `b51612e5`, implementation `b7116473`. Additive migration33 retains original input/preview hashes and all other guards. It normalizes only the known mean-reversion parameter for comparison, matching the existing plain fixed-eight grammar/range and negative-zero behavior. Arbitrary candidate strings remain literal; malformed, excessive-precision, out-of-range or negative nonzero values are rejected without rounding. Previous migrations and financial engine semantics remain unchanged.
The running development API had already registered migration33 by the time the explicit normal-runner verification executed, consistent with its watch-mode startup. Verification retained the exact installed function and migration hashes, unchanged worker/native identity and zero study runs/receipt before recovery. No historical rows were rewritten.
The original journal and script were preserved. A reviewed local continuation reopened and verified the four acknowledged resources (hypothesis, family, project link, version), returned their saved acknowledgements without new writes, and separately marked them in a new exclusive fsynced journal. Before retrying, it required the same original training body, key and preview hash. Existing `runResearchCycle` then performed the remaining ordinary admissions; its original recipe, numeric parameters, raw `"0"`, ten-trial bound and Rust financial policy stayed frozen. There was no blind CLI restart or new filtered version.
Verification:
- Direct candidate/default and startup migration regressions demonstrate SQL32 rejection with no row changes, then exact-body/key/hash success and replay after SQL33, strict paired-invalid-value rejection, arbitrary-string preservation and migration reapplication without history changes.
- Final combined PostgreSQL gate: **14 passed / 310 assertions**. Independent review noticed the AI fixture initially installed only through SQL32; after adding SQL33 to that fixture, its actual isolated/native workflow reran **4 passed / 178 assertions**. These overlapping runs are not additive test totals.
- Integration: **1,382 passed / 14 existing conditional skips**, 10,415 assertions. Application/authored-test types, contracts, strict lint, formatting, secret audit and diff checks passed. Repository builds and the complete build-driving `check` command were intentionally not rerun during the frozen study; installed worker/native/sandbox bytes stayed unchanged. No Rust source changed.
- Independent source and recovery review accepted the correction and requested the stronger malformed-value tests and explicit AI fixture migration above. The disposable PostgreSQL container was stopped after all gates.
Logs: `/tmp/stock-bot-rp22-postgres.log` (initial 10 / 123), `rp22-postgres-final.log`, `rp22-ai-sql33.log`, `rp22-integration.log`, `rp22-types.log`, `rp22-lint.log`, `rp22-format.log` and `rp22-apply.log`, all under `/tmp/stock-bot-`. All seven conditional tasks remain deferred. RP21 and RP22 are complete; no further study was admitted automatically.