feat(research): add projects and revisioned evidence-linked findings

This commit is contained in:
Boki 2026-10-23 23:38:47 -04:00
parent 618fb9e33c
commit ee45257507
22 changed files with 2947 additions and 17 deletions

View file

@ -1,16 +1,16 @@
{
"schema_version": 1,
"plan_revision": "2026-10-23.50",
"plan_revision": "2026-10-23.52",
"repository_base": "b7aeca4",
"plan_status": "twenty_third_wave_partial_validated",
"plan_status": "twenty_fourth_wave_validated",
"execution_authorized": true,
"execution_scope": {
"authorized_by": "User: commit and continue after validated R02 handoff; R02 committed d929db707a4894096b8b31ebd25c5e39d15289c1.",
"authorized_by": "User: commit and continue after R05 partial handoff naming R03; R05 slice committed 618fb9e33cebc1fde4869eb1f975a12c55bd9b94.",
"tasks": [
"R05"
"R03"
],
"permissions": [
"R05 trusted-built-in single-asset retained-v2 vertical slice, isolated implementation, correctness tests, cross-agent review and planning updates"
"R03 research metadata/evidence APIs, isolated implementation, correctness tests, independent review and planning updates"
],
"excluded": [
"performance_profiling_or_optimization",
@ -23,7 +23,9 @@
"candidate_execution",
"provider_to_v2_inference",
"multi_asset_activation",
"other_backlog_tasks"
"other_backlog_tasks",
"R04_workspace_UI",
"AI_execution_or_credentials"
],
"pending_policy_decisions": [
"ADR-007",
@ -1500,7 +1502,7 @@
"epic": "E6",
"priority": "P1",
"severity": "High",
"status": "ready",
"status": "review",
"dependencies": [
"R01",
"R10"
@ -1521,12 +1523,34 @@
"research-api"
],
"parallel_policy": "Allowed only with satisfied dependencies/approvals and disjoint write locks AND actual files; see agents/integration.md.",
"assignment": null,
"assignment": "/root",
"branch": null,
"pull_request": null,
"completed_commit": null,
"blocker": null,
"release_gates": []
"release_gates": [],
"integration_base": "618fb9e33cebc1fde4869eb1f975a12c55bd9b94",
"integration_state": "validated_uncommitted",
"worktree": "/home/boki/repos/stock-bot",
"implementation_slices": [
{
"owner": "/root",
"scope": "Shared pure research DTOs, evidence projection, fixture/composition integration and planning"
},
{
"owner": "/root/r03_persistence",
"worktree": "/tmp/stock-bot-wave24.3Qsd1y/persistence",
"scope": "Migration20, research metadata service and PostgreSQL tests"
},
{
"owner": "/root/r03_http",
"worktree": "/tmp/stock-bot-wave24.3Qsd1y/http",
"scope": "Research route adapter and HTTP boundary tests"
}
],
"reviewed_by": "/root/r03_contract_review",
"review_notes": "Independent review accepted metadata/revision/evidence contracts, persistence and HTTP boundaries after transaction-client forwarding and retained-corruption error fixes. Full repository, SQL and existing browser gates pass.",
"verification_reference": "ROADMAP.md#twenty-fourth-wave-handoff--2026-10-23"
},
{
"id": "R04",
@ -1604,7 +1628,7 @@
"release_gates": [
"Explicit owner disposition of the simultaneous multi-asset mark/risk policy before canonical default activation"
],
"integration_state": "partial_validated_uncommitted",
"integration_state": "partial_validated_committed",
"integration_base": "d929db707a4894096b8b31ebd25c5e39d15289c1",
"worktree": "/home/boki/repos/stock-bot",
"implementation_slices": [
@ -1634,7 +1658,8 @@
"/root/s04_feed_audit"
],
"verification_reference": "ROADMAP.md#twenty-third-wave-handoff--2026-10-23",
"review_notes": "Reviewed retained-builtin/single-asset vertical slice only. Full R05 remains in progress; provider-to-v2 preparation and broader cutover are not claimed. Corrected warmup clock, series/rate/decimal admission mismatches, concurrent approval proof, UI parent identity and drawdown severity."
"review_notes": "Reviewed retained-builtin/single-asset vertical slice only. Full R05 remains in progress; provider-to-v2 preparation and broader cutover are not claimed. Corrected warmup clock, series/rate/decimal admission mismatches, concurrent approval proof, UI parent identity and drawdown severity.",
"partial_commit": "618fb9e33cebc1fde4869eb1f975a12c55bd9b94"
},
{
"id": "R06",
@ -7210,5 +7235,100 @@
],
"cleanup": "Both exact --rm disposable PostgreSQL/Redis containers stopped; development services untouched. Worktrees and evidence logs retained.",
"next": "After acceptance/commit, R03 research projects, hypotheses and evidence-linked findings APIs is independently ready. Keep R05 in progress until explicit source-v2 preparation and broader cutover scope are completed; R06/S06 remain blocked."
},
"twenty_fourth_wave": [
"R03"
],
"twenty_fourth_wave_base": "618fb9e33cebc1fde4869eb1f975a12c55bd9b94",
"twenty_fourth_wave_notes": [
"Metadata and retained-evidence APIs only; no R04 UI or AI execution/credentials. Narratives remain unvalidated; citations resolve existing retained results, not copied metrics.",
"R05 stays in progress after accepted single-asset slice. Performance work remains paused."
],
"twenty_fourth_wave_validation": {
"state": "validated_uncommitted",
"log_directory": "/tmp/stock-bot-wave24.3Qsd1y",
"integration_base": "618fb9e33cebc1fde4869eb1f975a12c55bd9b94",
"source_archive": "/tmp/stock-bot-wave24.3Qsd1y/r03-integrated-source.tar",
"source_archive_sha256": "645d9d80a574b1e590023c601aca563f18101ef19b0aafbd03181159665e8d32",
"source_file_count": 18,
"source_sha256": {
"apps/stock/config/package.json": "d2f8581c02e16c90fa5154ed9a1223bc26256ec4c6e29146d5d454cba5fe435e",
"apps/stock/config/src/contracts/research.ts": "60b41535e9ce81a538013e6299dc363a68826eab0d969dfd492de1c1376cfb6e",
"apps/stock/web-api/src/migrations/migration-runner.ts": "a3a8d885af0a5b6c3e1d1193101a3370fcd10c867443e13012ecb384f3b629cf",
"apps/stock/web-api/src/routes/create-routes.ts": "5c2faa9e0f5825d0615ded19af9952281349c43651fd3c47b6e10e6b7e4526c5",
"apps/stock/web-api/src/routes/research.routes.ts": "2a3805186faa5fb3f339c8183834e30038c98f7ca01f6ede8b9a247c559f1990",
"apps/stock/web-api/src/services/backtest-v2.service.ts": "7f64f0244fd18e33bf50f99b960aab2c6e985615513e1d85367e8a1ce5a45e68",
"apps/stock/web-api/src/services/research-errors.ts": "db90da45c8f4a091e3f113d50c6435d4283161995e7570f3cae05a626e745995",
"apps/stock/web-api/src/services/research-evidence.ts": "7174448d404ec90249bcc83b8b1c178e393ede1aaf74f95c6cc8914031a34179",
"apps/stock/web-api/src/services/research.service.ts": "f8436942a22bcbec0e40a7109e28d84459e4994568b54c564f1393146bc8a589",
"database/postgres/init/20-research-workspace.sql": "c9202c23f218c6aa55ee44e6c25ae966cf90cb7e00b21352bac256b393048ec5",
"libs/core/types/src/index.ts": "631c900226aef3bf3cc79e605d1f2cc28df5bbab6b3823595da090faad1303f2",
"libs/core/types/src/research.ts": "5fd981488ac18edacbd92e1fe9e254afe27ef1388f5ef391f9fbda07a3bbe9c7",
"scripts/test/architecture.test.ts": "0f30d5c99544e8420f75711f1a3c47d194c6d74b7bc0592a14b89c8d50a1ee58",
"test/e2e/fixture.ts": "8c2c7c12d1b84adcded82e384065b12c1857e567fd302e2c9b46e71644e52ca1",
"test/integration/research-api.test.ts": "c628c25d070bd613a34fe7edb593fee996cde74e8bec2f460620be91937220c4",
"test/integration/research-evidence.test.ts": "f3cf3a2aa73b6dfc4e2944cbecd3a6db574ac3be9220b9bfccddb4bdb23f20cb",
"test/postgres/migration-runner.test.ts": "b71a74cd4acf4c55dcbcad11a03ebaeefcaa7fcb70a01a0c8291ff1a91c47d27",
"test/postgres/research-workspace.test.ts": "680a650516ccc9c91179119f5d357618a23b9b909b1310e6ee86ce8cdbd77452"
},
"checks": [
{
"command": "CARGO_BUILD_JOBS=2 bun run check",
"log": "/tmp/stock-bot-wave24.3Qsd1y/check.log",
"outcome": "All repository checks passed: build/source/contracts/secrets/lint; 93 tooling, 43 utility, 44 calculation, 590 integration and 150 Rust tests. Four manual Rust tests remain ignored."
},
{
"command": "PIPELINE_TEST_DATABASE_URL=<disposable PG> BACKTEST_TEST_REDIS_URL=<dedicated Redis /15> bun run test:postgres",
"log": "/tmp/stock-bot-wave24.3Qsd1y/postgres.log",
"outcome": "159 tests / 1279 assertions passed across 18 files. Includes new research citations/revisions, one-connection pool, actual canonical execution, legacy conversion, SQL integrity, concurrent revisions/archive and upgrade/reapply preservation."
},
{
"command": "CARGO_BUILD_JOBS=2 bun run --cwd apps/stock/engine build:release",
"log": "/tmp/stock-bot-wave24.3Qsd1y/native-release.log",
"outcome": "Release addon restored; SHA256 ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103 matches checkout release library and previous wave. No Rust financial source changes."
},
{
"command": "PIPELINE_TEST_DATABASE_URL=<disposable PG> BACKTEST_TEST_REDIS_URL=<dedicated Redis /15> bun run test:e2e",
"log": "/tmp/stock-bot-wave24.3Qsd1y/e2e.log",
"outcome": "All 9 existing workflows / 164 assertions passed with migration20 and research routes installed, including retained canonical execution/reopen, legacy results, archive and cancellation. Research workspace UI itself remains R04."
},
{
"command": "node_modules/.bin/tsc --project /tmp/stock-bot-wave24.3Qsd1y/tests-tsconfig.json --noEmit",
"log": "/tmp/stock-bot-wave24.3Qsd1y/strict-tests.log",
"outcome": "Strict new/changed test and dependent source types passed."
},
{
"command": "node_modules/.bin/prettier --check <changed TypeScript/JSON>; node_modules/.bin/eslint <changed tests> --max-warnings 0; git diff --check",
"log": "/tmp/stock-bot-wave24.3Qsd1y/scoped-format.log",
"outcome": "Passed scoped formatting, test lint and diff checks; test lint log is scoped-test-lint.log."
},
{
"command": "bun test test/integration/research-api.test.ts (isolated HTTP worktree)",
"log": "/tmp/stock-bot-wave24.3Qsd1y/http-tests-final.log",
"outcome": "10 tests / 197 assertions passed, including sanitized500 for valid citation of corrupt retained storage. Also covered by full root integration gate."
},
{
"command": "PIPELINE_TEST_DATABASE_URL=<disposable PG> bun test test/postgres/research-workspace.test.ts (isolated persistence worktree)",
"log": "/tmp/stock-bot-wave24.3Qsd1y/persistence-postgres-final.log",
"outcome": "9 tests / 121 assertions passed; also covered by full root SQL gate."
}
],
"reviews": [
{
"reviewer": "/root/r03_contract_review",
"scope": "Pinned shared contracts, root resolver/result query seam, persistence/SQL and HTTP adapter",
"outcome": "Accepted. Corrected nested pool deadlock by forwarding active client, preserved actor metadata, and classified corrupt retained-result validation as sanitized500 rather than client400. Reviewed final source and observed scoped passing logs; root ran combined gates."
}
],
"limitations": [
"R03 is API/data scope only. R04 owns project/hypothesis/finding screens and the browser save-finding workflow.",
"Narratives always remain unvalidated. EvidenceState referenced is not narrative validation; submittedBy is verified operator/service while contentOrigin is declared human/ai/unknown. No authenticated model identity or AI execution credentials added.",
"Only known scalar metric paths on completed retained results are citeable. Canonical/legacy reporting adapters remain distinct; legacy economics retain existing limitations and null metrics remain unavailable.",
"Revision edits use expectedRevision; archive/history are retained. Ordinary metadata create POSTs have no submission receipt and must not be blindly retried after an ambiguous response.",
"No source-v2 preparation, candidate execution, multi-asset/default activation, paper/live operations or new financial simulator. Partial R05 remains in progress.",
"No profiling/optimization/benchmarks, new-wave commit, push or PR. No production/development schema or data mutation."
],
"cleanup": "Both exact --rm PostgreSQL/Redis fixtures stopped. After interruption, docker ps -a --filter name=stock-bot-research-workspace returned no containers. All 18 source hashes reverified unchanged. Worktrees and logs retained; development services untouched.",
"next": "After acceptance/commit, R04 research workspace and evidence-linked save-finding UI. Keep R05 partial and R06/S06 gated. Performance remains paused."
}
}