Skip to content

fix(lifecycle): preserve backtest runs by identity - #634

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

Pigbibi merged 1 commit into
mainfrom
qsl/qpk-backtest-run-key-20260924

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Scope

Preserve distinct lifecycle backtest results when separate runs share computed_at. Results with a nonblank run_id now use a bounded SHA-256 path segment under runs/; legacy writes without a run ID retain their existing path. Add exact load_backtest_by_run_id across new and legacy files with domain/profile/run ID checks and optional parameter version. Keep load_latest_backtest baseline selection unchanged.

Evidence

  • Reproduced the old same-timestamp overwrite with two synthetic run IDs.
  • uv run --frozen python -m unittest tests.test_lifecycle_performance_store -q: 14 tests OK.
  • uv run --frozen --with pytest python -m pytest tests/test_lifecycle_performance_store.py tests/test_strategy_performance_export.py -q: 23 passed.
  • Targeted Ruff and git diff --check: passed.
  • Fake cloud ObjectStore coverage; no real GCS access.

Boundaries

This is a shared storage contract change. No consumer pin, production configuration, market data, account, order, deployment, or promotion status is changed here. The repository's existing uv.lock does not match pyproject.toml, so local checks used --frozen; this PR does not modify the lock file.

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit 09844bb into main Sep 23, 2026
1 check passed
@Pigbibi
Pigbibi deleted the qsl/qpk-backtest-run-key-20260924 branch September 23, 2026 20:46
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