piker/ai/prompt-io/opencode/20260728T232718Z_ed85721c_p...

947 B

git diff HEAD~1..HEAD -- piker/storage/nativedb.py tests/test_storage_nativedb.py

Fixed incremental NativeDB updates against legacy persisted history with non-positive timestamps. Incoming provider frames remain strictly validated, while merge repair discards invalid persisted rows before concat, dedupe, ordering, canonical-index rewrite, and atomic publication.

The regression reproduces the observed MNQ baseline shape: one epoch-zero row, noncanonical absolute indexes, extra derived columns, and a valid fresh IB frame. It proves the invalid row is removed while all valid old and new bars survive with canonical indexes.

Verification generated with the patch:

  • NativeDB regressions: 18 passed
  • history backfill regressions: 6 passed
  • focused Ruff: passed
  • git diff --check: passed