···127127128128 const db = getDb();
129129130130+ // Idempotent: skip if already ingested (optimistic write beat the firehose)
131131+ const exists = db
132132+ .query("SELECT 1 FROM revisions WHERE at_uri = ?")
133133+ .get(revisionAtUri);
134134+ if (exists) return;
135135+130136 const current = db
131137 .query("SELECT content FROM current_note WHERE note_at_uri = ?")
132138 .get(noteAtUri) as { content: string } | null;