MIGRATION_2_3

v2 -> v3: Add monotonic seq and formatVersion to events, prune watermark and last acknowledged checkpoint seq to chain state. Existing rows get seq in rowid order. audit_events has a TEXT primary key, so it is a rowid table and rowids grow with insertion: rowid order is the order the chain was built in. ids are random UUIDs, so (ts, id) would misorder same-millisecond events and events across a backward clock step. Caveat: VACUUM may renumber rowids of a table without an INTEGER PRIMARY KEY; Room never vacuums, and the SDK does not either.

A chain whose head retention already pruned (first row's prevHash is not GENESIS) gets a prune baseline at that row: trust on first use. Truncation before the upgrade is not detectable; every later one is. A chain whose rows retention pruned entirely gets the baseline at the chain state's head (seq eventCount, hash lastHash), so the next event links to it.