Skip to content

fix(lifecycle): restore backtest readback metadata - #635

Merged
Pigbibi merged 1 commit into
mainfrom
qsl/qpk-backtest-readback-metadata-20260924
Sep 23, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
qsl/qpk-backtest-readback-metadata-20260924

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Scope

BacktestResult.to_dict() persists cost_inputs and validation_identity, but PerformanceStore._backtest_from_dict() discarded both. This made the new exact run readback unable to verify the cost assumptions saved by the SOXL/TQQQ synthetic replay.

Restore those fields on readback. Keep missing legacy fields at the existing empty defaults and reject explicitly malformed metadata. Save paths and latest baseline selection are unchanged. A stored identity remains metadata and does not authorize promotion; the existing promotion gates still require complete orchestrator, folds, OOS and source evidence.

Evidence

  • uv run --frozen python -m unittest tests.test_lifecycle_performance_store -q: 18 tests OK.
  • uv run --frozen --with pytest python -m pytest tests/test_lifecycle_performance_store.py tests/test_strategy_performance_export.py -q: 27 passed.
  • uv run --frozen --with pytest python -m pytest tests/test_backtest_orchestrator.py -q: 27 passed, 11 subtests passed.
  • Targeted Ruff and git diff --check: passed.
  • UES synthetic replay against this local QPK source: 13 passed. This is an import-path preview, not an updated UES lock.

No real cloud store, market data, accounts, orders, deployment or production configuration were accessed. The repository's pre-existing lock mismatch remains unchanged, so the local QPK checks used --frozen.

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit 8283534 into main Sep 23, 2026
1 check passed
@Pigbibi
Pigbibi deleted the qsl/qpk-backtest-readback-metadata-20260924 branch September 23, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant