fix: repair chained imports and track blocked evidence dependencies
Assistant: codex Assistant-Model: gpt-6.1-sol Assistant-Session: 01a1046e-465c-7d43-8c4c-d10f0a1feadd
This commit is contained in:
parent
28b567e588
commit
146f4e1dd3
21 changed files with 869 additions and 95 deletions
|
|
@ -22,8 +22,13 @@ duplicate accept must not mint a second link. A conflict must not
|
|||
advance the head. Concurrent first-accepts of different events take an
|
||||
advisory lock (`CHAIN_LOCK_KEY`) so they cannot fork.
|
||||
|
||||
Verify walks `ORDER BY accepted_at, event_id`, recomputes every link,
|
||||
and reports the first event id whose stored hashes do not match. A
|
||||
PostgreSQL verification follows `chain_prev` from genesis, recomputes every
|
||||
link, and retains orphaned or forked rows as breaks. The next append selects
|
||||
the unique unreferenced head under the same advisory lock. This separates
|
||||
chain insertion order from historical `accepted_at`: importing older SQLite
|
||||
events extends the existing chain without rewriting timestamps or links.
|
||||
SQLite's development chain still walks `ORDER BY accepted_at, event_id`.
|
||||
Verification reports the first event id whose stored hashes do not match. A
|
||||
break is a **custody defect**, not a sender error. Retrying the event
|
||||
will not repair it.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue