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

@ -537,3 +537,19 @@ The initial aggregate check exposed stale pure-contract allowlists and lint issu
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.