# R07 — Deliver sweep configuration and comparable-result views Parent epic: E6. Priority/severity: P1 / High. Relative complexity: M. Recommended specialization: Full-stack research product. Scheduling source of truth: [manifest entry R07](../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 - **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). - **FIN-07 — Verified:** Daily return grouping, Sharpe/Sortino conventions and placeholder exposure/VaR produce incomparable or misleading native metrics. [apps/stock/engine/src/backtest/simple_results.rs:374](../../../../apps/stock/engine/src/backtest/simple_results.rs#L374); [apps/stock/engine/src/backtest/simple_results.rs:542](../../../../apps/stock/engine/src/backtest/simple_results.rs#L542). - **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). ## Intended behavior and implementation scope Deliver experiment preview/progress/comparison directly on R06 APIs. Accept an existing frozen dataset ID and show its manifest; R11's picker is optional convenience, not a prerequisite. A project/workspace link is optional; users need not build project metadata before comparing a sweep. Reuse current charts/metrics and R06 summary projection. ## Exclusions No general workflow framework, browser IDE, multi-tenant identity platform or second simulator. ## Likely files and ownership - apps/stock/web-app/src/features/experiments/ (new) - apps/stock/web-app/src/features/backtest/components/ - apps/stock/web-app/src/components/ui/DataTable/ Write locks: web-experiments. One agent owns this change. Lock names do not override actual overlapping files. ## Dependencies and blockers Component implementation may proceed against root-pinned R06 DTOs; activation requires integrated retained-input R06 admission/results. Full R06 failed-retry work is independent of this component and no retry action is exposed. Architecture decisions: ADR-006. Agents may not independently amend their policies. Feature activation/release gates: [W04](W04.md). These do not block implementing or integrating this component against its own tests. Parallel eligibility: only with disjoint actual files and reserved write locks; read FIRST-WAVE.md for the initial exact ownership boundaries. ## Acceptance criteria - User previews bounded trial count, submits, sees all statuses, cancels and opens exact candidate runs. - Default comparison requires matching data, execution/metrics policy, costs and evaluation windows; mismatches remain visible, not silently ranked. - No full detail blobs on summary list; failed/incomplete counts and null metrics are explicit. ## Mandatory tests - sweep_to_compare_browser, mixed_policy_warning, partial_failure_visibility, reopen_experiment. - Large result table rendering measurement and metric-null tests. 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 Schema/API backward compatibility, historical provenance and UI state regression. 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: R06 experiment/trial listing; summary metrics projection from result contracts; pagination where needed. - Backend/data dependencies: Experiments and canonical provenance; full trade arrays are fetched only on run detail. - Loading/error/empty behavior: Preview loading; invalid grid errors; empty not-yet-submitted; per-trial failed/cancelled; retryable aggregate errors. - 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. ## Authorized component — 2026-10-24 Implement same-experiment preview, submission, progress, cancellation, scalar comparison and exact run reopening against the pinned R06 component API. Component coding may proceed in parallel; release requires integrated R06 component. Cross-experiment comparison and table performance measurements remain outstanding, with all performance work paused. Full R07 remains incomplete. ### Pinned web workflow `/experiments` selects a saved canonical backtest, names a sweep and previews a small parameter grid before submission. `/experiments/:experimentId` shows the frozen inputs, all trial outcomes, comparable scalar metrics with units/null reasons, cancellation state and exact saved-run links. An optional backtest query parameter starts from its detail page. The API is shared with other authorized clients; the browser does not calculate economics or rank incompatible runs. Ambiguous submission preserves its exact body/key, and only an explicit new intent may replace it. Form edits invalidate previews; route changes and late reads/mutations cannot replace another experiment. Loading, empty, failed, missing and incomparable outcomes remain distinct. Refresh/reopen must retain immutable evidence and cancelled/partial outcomes. The browser acceptance executes real retained native trials, mutates the template after admission, replays the submission receipt, opens results and cancels a separate pending batch. ### Validated component handoff The retained-input component is implemented and independently reviewed. Full repository, PostgreSQL and Chromium gates passed; exact source hashes and logs are in `manifest.json` → `twenty_seventh_wave_validation`. See the twenty-seventh-wave roadmap handoff. This component is uncommitted and does not complete the full task or release its downstream dependencies.