# O02 — Expose truthful research and paper readiness diagnostics Parent epic: E9. Priority/severity: P1 / High. Relative complexity: M. Recommended specialization: Infrastructure/observability. Scheduling source of truth: [manifest entry O02](../manifest.json). No task is authorized until the plan is approved. Dependencies and decision references below describe the design; the manifest controls current readiness. ## Evidence and root cause - **OPS-02 — Needs Investigation:** Paper/live operational readiness is not demonstrated end-to-end. Live is deliberately disabled; preserve that gate until feed, reconciliation and broker-specific recovery are verified. [apps/stock/orchestrator/src/core/ModeManager.ts:33](../../../../apps/stock/orchestrator/src/core/ModeManager.ts#L33); [apps/stock/orchestrator/src/container.ts:152](../../../../apps/stock/orchestrator/src/container.ts#L152). - **WEB-02 — Verified:** Detail exposes native-unsupported pause/resume controls, omits cancel wiring, and overlapping polling/selection can apply stale responses. [apps/stock/web-app/src/features/backtest/BacktestDetailPageV2.tsx:379](../../../../apps/stock/web-app/src/features/backtest/BacktestDetailPageV2.tsx#L379); [apps/stock/orchestrator/src/backtest/RustBacktestAdapter.ts:160](../../../../apps/stock/orchestrator/src/backtest/RustBacktestAdapter.ts#L160). - **KEEP-02 — Verified:** Preserve frozen/hash-verified historical snapshots and fenced durable runner attempts; extend them instead of creating a second job engine. [apps/stock/orchestrator/src/data/historical-dataset.ts:98](../../../../apps/stock/orchestrator/src/data/historical-dataset.ts#L98); [apps/stock/orchestrator/src/backtest/BacktestRunner.ts:190](../../../../apps/stock/orchestrator/src/backtest/BacktestRunner.ts#L190). ## Intended behavior and implementation scope Report actual worker/queue/lease, engine version/capability, dataset load failure, paper feed freshness and recovery/halt state. Replace unmeasured zeros/always-healthy assumptions with unknown/unavailable. Attach run/attempt/strategy IDs to diagnostics; avoid a new telemetry stack. Measurable benefit: Makes failures diagnosable from the primary product. ## Exclusions No speculative distributed infrastructure or weakened correctness gates. ## Likely files and ownership - apps/stock/web-api/src/routes/monitoring.routes.ts - apps/stock/web-api/src/services/ - apps/stock/orchestrator/src/api/rest/ - apps/stock/web-app/src/features/monitoring/ Write locks: readiness-api. One agent owns this change. Lock names do not override actual overlapping files. ## Dependencies and blockers Implementation requires [S04](S04.md) integrated. No additional economic-policy approval is needed for this narrowly scoped task. Deferred: Optional cross-service monitoring expansion; required run diagnostics belong to W01/F07 and paper readiness to S04. Parallel eligibility: only with disjoint actual files and reserved write locks; read FIRST-WAVE.md for the initial exact ownership boundaries. ## Acceptance criteria - Missing orchestrator/native worker/DB or stale feed cannot report ready. - Run failure includes phase and actionable cause, with secrets excluded. - Research availability and paper readiness are separate indicators; live-disabled is explicit. ## Mandatory tests - dependency_unavailable_readiness, stale_feed_status, failed_attempt_diagnostics, no_secret_logs. - API/UI tests show unknown versus measured zero and retryable error. Apply the relevant [quality gates](../../QUALITY-GATES.md); submit exact commands, outcomes and skipped checks. Named cases above are required regression scenarios, not claims that those tests already exist. ## Regression risks and rollback Performance measurements can hide semantic changes; require economic hash equivalence. Keep migrations additive and previous results readable. Do not add a switch that restores a correctness defect. Versioned cutover/migration is required only when persisted contracts or active engines change; never silently fall back to old economics. ## Web/API contract and user states - API: Extend current health/monitoring and run diagnostics contracts; no separate monitoring API silo. - Backend/data dependencies: Persisted attempts and real service probes; no additional time-series platform. - Loading/error/empty behavior: Unknown, degraded, stale and disconnected states; actionable retry; do not display fake healthy cards. - User-facing completion is demonstrated by the acceptance criteria and interaction tests above; a backend-only implementation is insufficient where a UI is in scope. ## 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.