commit 8c70b0f4f0e7307bcf3ebf61a4e81b2cfc5b219f
parent fad62e602d24f1c0465ef1426d3858c96ceeb509
Author: triesap <tyson@radroots.org>
Date: Tue, 28 Jul 2026 09:50:16 +0000
event_store: broaden reconciliation replay fixture
- seed replaceable and regular legacy events
- exercise ephemeral migration and replay handling
- retain addressable and deletion authority coverage
- keep raw tag corruption mutations material
Diffstat:
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/crates/event_store/src/nip09/reconciliation_v1.rs b/crates/event_store/src/nip09/reconciliation_v1.rs
@@ -4076,13 +4076,13 @@ mod tests {
(
"signed tags",
&["DROP TRIGGER radroots_event_store_event_envelopes_raw_update_guard"][..],
- "UPDATE event_envelopes SET tags_json = '[]' WHERE seq = 1",
+ "UPDATE event_envelopes SET tags_json = '[]' WHERE kind = 30002",
"signed raw JSON field `tags_json`",
),
(
"missing raw tag",
&["DROP TRIGGER radroots_event_store_event_tags_delete_guard"][..],
- "DELETE FROM event_envelope_tags WHERE event_id = (SELECT event_id FROM event_envelopes WHERE seq = 1)",
+ "DELETE FROM event_envelope_tags WHERE event_id = (SELECT event_id FROM event_envelopes WHERE kind = 30002)",
"signed raw JSON field `tag_rows`",
),
(
@@ -4766,6 +4766,24 @@ INSERT INTO caller_child(id, parent_id) VALUES (1, 999);",
async fn populated_v2_validation_pool() -> SqlitePool {
let pool = open_v1_test_pool().await;
let author = fixture_author();
+ seed_v1_raw_event(
+ &pool,
+ signed_event(TARGET_CREATED_AT - 3, 0, Vec::new(), "{}"),
+ 500,
+ )
+ .await;
+ seed_v1_raw_event(
+ &pool,
+ signed_event(TARGET_CREATED_AT - 2, KIND_POST, Vec::new(), "regular"),
+ 600,
+ )
+ .await;
+ seed_v1_raw_event(
+ &pool,
+ signed_event(TARGET_CREATED_AT - 1, 20_001, Vec::new(), "ephemeral"),
+ 700,
+ )
+ .await;
let target = signed_event(
TARGET_CREATED_AT,
KIND_LIST_SET_RELAY,