Files
buzz/desktop/src-tauri
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 e2ecb00238 refactor(store-journal): extract boot recovery gate and admission guard
Move the anchor-resolve + run_recovery_gate + migrations block from lib.rs
into store_journal/boot.rs:run_boot_recovery_gate(app, reset_completed).
lib.rs is reduced from 999 to 988 lines (within the 1000-line ratchet on
the merge tree).

Fail closed on anchor-resolution failure: store_anchor_dir Err propagates
as Err from run_boot_recovery_gate with no unwrap_or_default fallback.

Extract reject_if_recovery_failed(flag: &AtomicBool) -> Result<(), String>
from mutate_store's inline block so the admission guard is unit-testable.
mutate_store delegates to it; two new tests cover the clear and set cases.

Add table_cols helper in fix_tests to eliminate repeated PRAGMA table_info
boilerplate (keeps store_journal_fix_tests.rs at 993 lines, under 1000).

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-04 22:05:20 -04:00
..