docs(archive): document mixed row-shape invariant on read_archived_events

This commit is contained in:
Will Pfleger
2026-07-06 18:18:06 -04:00
parent e7d4de2294
commit 0f93c1160b
2 changed files with 7 additions and 1 deletions

View File

@@ -77,7 +77,8 @@ const overrides = new Map([
// lines. Atomic merge to close the concurrent-seed race. Still queued to split.
// IMMEDIATE-tx fix: BEGIN IMMEDIATE replaces DEFERRED unchecked_transaction
// in merge_owner_p_kinds comment block (~5 lines). Still queued to split.
["src-tauri/src/archive/mod.rs", 1700],
// doc-comment: mixed row-shape invariant on read_archived_events (~5 lines).
["src-tauri/src/archive/mod.rs", 1705],
// archive/store.rs: merge_owner_p_kinds fn (read+union+upsert under a single
// SQLite tx) + 4 unit tests (create-when-none, adds-kind, idempotent,
// concurrent-interleave). Load-bearing TOCTOU fix for the owner_p shared row.

View File

@@ -464,6 +464,11 @@ const DEFAULT_READ_LIMIT: i64 = 50;
///
/// `kinds` is an optional filter; an empty array means "no kinds matched"
/// (not "all kinds") — callers should pass `null`/`None` when they want all.
///
/// Note: stored row payloads are not uniform — kind 44200 rows store the raw
/// metric payload JSON, while all other kinds store full Nostr Event JSON. A
/// caller doing `Event::from_json` on an unfiltered read must filter by kind
/// first (today's only reader filters `kinds: [24200]`).
#[tauri::command]
pub fn read_archived_events(
state: State<'_, AppState>,