Files
ruflo/scripts
rUv 802b75b4e2 feat(memory): nightly vector-DB backup — WAL-safe snapshot, rotation, daemon worker (#2571)
Adds backup for .swarm/memory.db (the vector store holding embeddings +
distilled reasoning_patterns):
- services/memory-backup.ts: backupMemoryDb() — WAL-safe ONLINE snapshot via
  better-sqlite3 .backup() (a naive file copy of a WAL-mode DB can corrupt),
  timestamped, rotated (keep last N, default 7), optional GCS offsite.
  Non-destructive (readonly source), never throws.
- 'memory backup' CLI subcommand (--db/--dir/--keep/--gcs).
- Daemon 'backup' worker: 24h interval, enabled by default, opt-out via -w;
  RUFLO_BACKUP_GCS / RUFLO_BACKUP_KEEP configure the headless path (registered
  as escape hatches in the env-var-precedence audit).

Verified E2E: 'memory backup' on a copy of the real 8,076-row DB → consistent
snapshot, integrity_check ok, rows match source. 11 tests.
2026-07-04 17:41:03 -04:00
..
2026-01-04 19:30:59 +00:00