mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The persona-event migration stored synthetic placeholder events (zero pubkey/sig, non-hex id) whenever signing keys were unavailable, producing retention rows that fail event parsing and signature verification — the read path would silently skip every such persona. It also tracked idempotency with a migration_state.json sentinel that was written even on partial failure and reset pending_sync on every boot if the write failed. Migration now takes the owner's resolved Keys and runs after resolve_persisted_identity, so every retained row is a real signed event; the no-keys branch is gone. Idempotency keys on whether the retention store already holds rows for the owner pubkey — the data is the sentinel. Core logic is extracted into migrate_personas_in_dir for unit testing. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>