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

1.4 KiB

CL23 — Reject retired backtest creation before persistence

Parent: E13. Priority: P1. Scheduling: manifest.

Scope and acceptance

Retired creates write nothing; catalog validation and historical reads remain compatible; obsolete auto-start cannot hide failure.

Affected modules: apps/stock/web-api/src/services/backtest.service.ts; routes/backtest.routes.ts; services/backtests/templates.ts. Root reserves actual files before delegation.

Dependencies: None.

Verification

Retired API/catalog regressions; v2 save/submit and retained readers. Focused review/tests precede the task commit; final combined build/types/lint/integration/PostgreSQL/browser gates follow. Preserve financial semantics, retained data/results, recovery, reviewed calculations and historical readers.

Exclusions

No new service/framework, financial simulator, real trading activation, external research execution, push/PR or .env changes. D04/P03/P05/P06/CL21 remain deferred. Root owns shared outputs, task state and commits; agents own disjoint files in the integration worktree.

Accepted verification

Independent root retired-backtest-api, catalog-backtest-contract and backtest-result-mapping suites: 16 passed, 125 assertions. Scoped lint/format passed. Regression verifies no writes on retired V1/implicit autostart, explicit save-only behavior and preserved historical read/cancellation.