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

1.8 KiB

CL25 — Share validated product response contracts

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

Scope and acceptance

Shared run/template/catalog/research wire schemas; consistent current date; compatible clients reuse requestJson without automatic write retry.

Affected modules: apps/stock/config/src/contracts; web-api/services/backtests; web-app/features/*/services. Root reserves actual files before delegation.

Dependencies: None.

Verification

Response roundtrips; malformed/wrong identity/abort/lost acknowledgement; types and browser. 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

Shared response wire schemas and server type aliases; root mapping/date/invalid-response/run-control tests 59 passed (388 assertions), agent complete focused UI/transport/reproduction set 358 passed. Scoped lint/format passed. Preserves historical optional records and submission receipt/idempotency guards.

Accepted verification

Chromium caught a valid historical SQL-null configuration rejected by the new schema. Read contracts now preserve null and canonical setup/detail access is guarded; no stored records rewritten. Source typecheck and108 focused tests835 assertions passed; final Chromium27 workflows971 assertions passed, including historical unavailable-results and run-error recovery. Error assertions follow real server/transport responses.