stock-bot/docs/development/backlog/tasks/RP01.md

17 lines
2.1 KiB
Markdown

# RP01 — Inspect stored market-data coverage and quality
Parent: E12. Priority P1. Complexity M. Authorized by the owner's request to implement the real-data research workflow.
Outcome: the stored-EOD preparation UI shows available instruments/timeframes/date coverage and diagnostics for an explicit UTC window before requiring complete dataset metadata.
Evidence: `DatasetPreparation.tsx` currently begins with metadata JSON; `prepareStoredDataset` calls the strict historical reader, which rejects an invalid row before returning a preview. The read-only October 26 pilot again found 22 null-volume rows in 1,816 AAPL five-minute records. Quality inspection must not weaken execution admission.
Scope: browser-safe shared contracts, fixed EOD Mongo collection coverage and window inspection, existing dataset routes, separate stored-mode inspector, focused API/domain/UI regressions. Show unknown identity/timestamps, malformed OHLCV and duplicates truthfully. No implicit filtering, metadata inference, row caps, writes, cache, financial changes or research-agent permission expansion. Existing strict preview/retain remains authoritative.
Dependencies: accepted CL05/CL06/CL17. Agent lock: stored-source contracts/service/routes/UI and new tests. Can run beside cache corrections and pilot preparation.
Acceptance: actual stored coverage is inspectable; empty/error/loading/cancel states work; changing input fences late responses; full requested range is diagnosed; no source or research records are written; a clean diagnostic never implies execution eligibility. In-flight Mongo cancellation limitations are explicit.
Tests: source inspection domain/HTTP and production component tests; existing stored/prepared dataset suites; shared contract/browser bundle tests; read-only actual Mongo smoke; typecheck/lint; repository and browser integration gates. Independent backend and frontend review before completion.
Risk: falsely claiming complete sessions, losing UTC range identity, stale UI results, or bypassing strict preparation. Root owns manifest status and commit evidence in `real-data-research.md`.