Revert "fix: hold a payload whose parent has not arrived instead of losing the event"

This reverts commit d7aac49.

Reverting restores the defect it addressed: a payload referencing a row
the receiver does not have violates a foreign key, and SQLite aborts,
rolling back the whole inbound transaction -- the nostr event, the group
event, the submission and the transcript line, none of them retried.
That is what produced the observed `FOREIGN KEY constraint failed` on an
artifact whose dialect had not arrived.

Also drops the schema back to v5. Any device already migrated to v6 will
refuse to open its database, since the builder sets no destructive
fallback on downgrade; clear that app's data before installing a build
from this commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5 committed 2026-09-05 21:12:50 +02:00
1 parent d7aac49cf1
commit fcc28de931
7 files changed
+46 -5565

No files matched your search

@@ -164,7 +164,7 @@ val GENESIS_AT = Instant.fromEpochMilliseconds(1231006505000L)
UnsignedNostrEvent::class,
Zap::class
],
version = 6,
version = 5,
autoMigrations = [
// v2 only adds the DkgSession/DkgParticipantMessage tables, so Room can
// generate the migration itself — nothing existing changes shape.
@@ -183,12 +183,7 @@ val GENESIS_AT = Instant.fromEpochMilliseconds(1231006505000L)
// nip30303 event a SubmissionEvent rumor carries. Rumors queued before
// this come back null, which reads as "not a submission" -- correct,
// since none of them were.
AutoMigration(from = 4, to = 5),
// v6 adds the nullable MarmotInnerEvent.awaitingEventId, holding a
// submission that arrived before the event it references. Nothing
// queued before this was ever held, so null is the right answer for
// every existing row.
AutoMigration(from = 5, to = 6)
AutoMigration(from = 4, to = 5)
]
)
@ColumnTypeConverters(MantraConverters::class)