feat(research): add workspace and evidence-linked finding UI
This commit is contained in:
parent
ee45257507
commit
e3bd708838
21 changed files with 4566 additions and 1379 deletions
|
|
@ -1,8 +1,8 @@
|
|||
# Revised development roadmap
|
||||
|
||||
Baseline `b7aeca4` · execution 2026-10-23 · **R10 committed; R02 catalog/setup validated and awaiting acceptance/commit**
|
||||
Baseline `b7aeca4` · execution 2026-10-24 · **R03 committed; R04 workspace validated and awaiting acceptance/commit**
|
||||
|
||||
Authorization update: the owner requested “commit and continue”. R10 is committed as `8cca0ee`; R02 is authorized under ADR-006. Performance work remains paused. New R02 commits, pushes, PRs and trading/default-engine operations remain outside this continuation’s scope.
|
||||
Authorization update: the owner requested “commit and continue”. R03 is committed as `ee45257`; R04 is implemented under ADR-006. Performance work remains paused. New R04 commits, pushes, PRs and trading/default-engine operations remain outside this continuation’s scope.
|
||||
|
||||
## Strategy and review outcome
|
||||
|
||||
|
|
@ -553,3 +553,18 @@ Exact source hashes, commands and review dispositions are recorded in `manifest.
|
|||
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.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Canonical development backlog
|
||||
|
||||
**First twenty-three waves committed; R03 is validated and uncommitted.** The initial R05 slice is accepted as `618fb9e`; broader R05 remains in progress. R03 adds research projects, revisioned hypotheses/notes/findings and exact retained metric citations through the shared API. R04 supplies the workspace UI next. Performance work remains paused. See [current handoff](../ROADMAP.md#twenty-fourth-wave-handoff--2026-10-23) and manifest execution scope.
|
||||
**First twenty-four waves committed; R04 is validated and uncommitted.** R03 is accepted as `ee45257`. The workspace now connects projects, revisioned narratives, linked strategies and exact saved-run findings through the existing APIs. Broader R05 remains in progress. Performance work remains paused. See [current handoff](../ROADMAP.md#twenty-fifth-wave-handoff--2026-10-24) and manifest execution scope.
|
||||
|
||||
## One source of truth
|
||||
|
||||
|
|
@ -74,8 +74,8 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
|
|||
| --- | --- | --- | --- | --- |
|
||||
| [R01 Persist immutable strategy versions and parameter schemas](tasks/R01.md) | P1 / done | O01, ADR-006 | — | Full-stack research product / M |
|
||||
| [R02 Deliver strategy catalog and version-aware backtest setup](tasks/R02.md) | P1 / done | R01, W03, ADR-006 | W04 | Full-stack research product / M |
|
||||
| [R03 Add projects, hypotheses and evidence-linked findings APIs](tasks/R03.md) | P1 / review | R01, R10, ADR-006 | — | Full-stack research product / M |
|
||||
| [R04 Deliver research workspace and save-findings flow](tasks/R04.md) | P1 / blocked | R03, W02, ADR-006 | W04 | Full-stack research product / M |
|
||||
| [R03 Add projects, hypotheses and evidence-linked findings APIs](tasks/R03.md) | P1 / done | R01, R10, ADR-006 | — | Full-stack research product / M |
|
||||
| [R04 Deliver research workspace and save-findings flow](tasks/R04.md) | P1 / review | R03, W02, ADR-006 | W04 | Full-stack research product / M |
|
||||
| [R05 Freeze complete provenance and cut over durable canonical runs](tasks/R05.md) | P0 / in_progress | F08, S02, R01, R10, D01, W03, C06, ADR-006 | Multi-asset default mark-policy disposition | Full-stack research product / M |
|
||||
| [R06 Create immutable experiments and bounded sweep expansion](tasks/R06.md) | P1 / blocked | R05, ADR-006 | — | Full-stack research product / M |
|
||||
| [R07 Deliver sweep configuration and comparable-result views](tasks/R07.md) | P1 / blocked | R06, ADR-006 | W04 | Full-stack research product / M |
|
||||
|
|
@ -118,4 +118,4 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
|
|||
|
||||
Before any wave: unique IDs; existing task/ADR references; acyclic implementation graph; no scheduled task dependent on merged/deferred work; approvals/readiness; actual file locks; isolated native build outputs/workspace dependencies and test databases. Release gates are checked separately at activation.
|
||||
|
||||
The first twenty-one waves are committed, including R10 (`8cca0ee`). **R02 catalog and versioned setup is validated and awaiting acceptance/commit; performance work remains deferred by the owner.** ADR-006 is approved; R03/R05 prerequisites are integrated but those tasks are outside this wave. R05 is next: verified retained-artifact execution through the existing canonical runtime and durable runner. The multi-asset mark-policy gate still blocks default activation. No default/paper activation, push or PR is included in this continuation.
|
||||
R03 is committed; R04 awaits acceptance/commit after independent review and full integration/browser checks. R12 original-run reproduction is the recommended next product slice, but its current manifest dependency on full R05 remains blocked. Before execution, explicitly scope it to retained, single-asset, same-installed-build inputs and pin guarded reproduction admission without weakening current authorization. R05 source preparation and broader cutover remain incomplete; R06/S06 are not unblocked. Performance and multi-asset/default/paper activation remain excluded.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,8 +6,8 @@ Scheduling source of truth: [manifest entry R04](../manifest.json). No task is a
|
|||
|
||||
## Evidence and root cause
|
||||
|
||||
- **WEB-01 — Verified:** The real backtest list/detail/API/SQL flow already exists. Strategy/project/experiment work should extend it; App strategy/analytics views are placeholders. [apps/stock/web-app/src/app/App.tsx:24](../../../../apps/stock/web-app/src/app/App.tsx#L24); [apps/stock/web-api/src/services/backtest-v2.service.ts:211](../../../../apps/stock/web-api/src/services/backtest-v2.service.ts#L211).
|
||||
- **WEB-04 — Verified:** Existing results snapshot configuration and datasets but do not capture an immutable strategy artifact/engine build/model/seed bundle. Legacy projection can fall back to mutable definition fields. [libs/core/types/src/backtest-run.ts:4](../../../../libs/core/types/src/backtest-run.ts#L4); [apps/stock/web-api/src/services/backtest-result.ts:107](../../../../apps/stock/web-api/src/services/backtest-result.ts#L107).
|
||||
- **WEB-01 — Verified:** The real backtest list/detail/API/SQL flow already exists. Strategy/project/experiment work should extend it; The existing strategy catalog, immutable versions and retained canonical single-asset run path are integrated; this task adds the research workspace around them. [apps/stock/web-app/src/app/App.tsx:24](../../../../apps/stock/web-app/src/app/App.tsx#L24); [apps/stock/web-api/src/services/backtest-v2.service.ts:211](../../../../apps/stock/web-api/src/services/backtest-v2.service.ts#L211).
|
||||
- **WEB-04 — Historical finding, partially resolved by R01/R05:** Retained canonical runs now bind immutable strategy and engine inputs. Legacy projections can still use mutable definition fallbacks; the workspace must preserve each result kind and its evidence limitations. [libs/core/types/src/backtest-run.ts:4](../../../../libs/core/types/src/backtest-run.ts#L4); [apps/stock/web-api/src/services/backtest-result.ts:107](../../../../apps/stock/web-api/src/services/backtest-result.ts#L107).
|
||||
|
||||
## Intended behavior and implementation scope
|
||||
|
||||
|
|
@ -23,10 +23,10 @@ No general workflow framework, browser IDE, multi-tenant identity platform or se
|
|||
|
||||
- apps/stock/web-app/src/features/research/ (new)
|
||||
- apps/stock/web-app/src/app/App.tsx
|
||||
- apps/stock/web-app/src/lib/constants/navigation.ts
|
||||
- apps/stock/web-app/src/lib/constants.ts
|
||||
- apps/stock/web-app/src/features/backtest/BacktestDetailPageV2.tsx
|
||||
|
||||
Write locks: web-research, web-backtest-detail. One agent owns this change. Lock names do not override actual overlapping files.
|
||||
Write locks: web-research, web-backtest-detail. Root coordinates separate workspace and save-finding UI owners; actual file assignments are recorded in the manifest. Lock names do not override actual overlapping files.
|
||||
|
||||
## Dependencies and blockers
|
||||
|
||||
|
|
@ -66,3 +66,17 @@ Keep migrations additive and previous results readable. Do not add a switch that
|
|||
## Handoff
|
||||
|
||||
Report scope changes (if any), fixture expectations, API/schema changes, measurements, remaining limitations and commit/PR references once authorized. Request independent review; only the integration/planning owner may mark the manifest done.
|
||||
|
||||
|
||||
## Implemented surface — 2026-10-24
|
||||
|
||||
- `/research` lists and creates projects; `/research/:projectId` edits metadata, links catalog strategies, and creates or browses hypotheses, notes and findings. Query selectors `hypothesis`/`artifact` plus optional immutable `revision` identify the displayed narrative.
|
||||
- Revisions append with `expectedRevision`. A conflict preserves the draft and requires deliberate history review. Historical revisions and archived projects remain readable. Child writes are blocked when project authority cannot be verified.
|
||||
- Completed matching backtest results offer **Save finding**. Choose an active project, optional exact hypothesis revision, declared content origin and allowlisted measurements. The browser sends reference identities only; R03 resolves values from retained results. Canonical strategy versions come from the original request; legacy results retain their qualifications.
|
||||
- Evidence displays raw and formatted values, units, unavailable reasons, actual financial engine, dataset identity and exact run/version links. Declared AI/human origin is separate from authenticated submitter; citations never validate the narrative.
|
||||
- Pending mutations reject duplicate clicks. Lost, malformed or server-error creation responses freeze the draft; users check saved records before explicitly starting another request. Reads and mutation callbacks reject obsolete navigation responses.
|
||||
- Existing Card/Dialog, strategy parameter form styles, navigation, authentication and APIs are reused. No backend, database, financial or execution contract changed.
|
||||
|
||||
The browser acceptance extends the existing retained canonical execution fixture through project creation, an AI-labelled hypothesis, linked strategy selection, backtest setup/run, exact finding, revision history, reload and archived-project reading. It retains the hand-derived two-fill/equity/fee assertions and verifies that original results stay unchanged. Focused DOM tests exercise failure/empty/loading states, conflicts, unavailable evidence, ambiguous saves, archive races and stale replies.
|
||||
|
||||
Current integration state and exact checks are in `manifest.json` → `twenty_fifth_wave_validation`; this section does not independently change scheduling status. UI origins are declared labels, not authenticated AI identities; agent credentials/execution, experiment management and automated validation remain separate tasks.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue