Files
meshcore-analyzer/cmd
MeshCore Bot f6290b6373 test(#1283): RED — server *DB has no write methods; ingestor owns PruneOldPackets
Enforces issue #1283 architecture: cmd/server is read-only, all
write/maintenance ops live on the ingestor's *Store. Three new tests:

- TestServerDBHasNoWriteMethods — reflect-asserts PruneOldPackets,
  PruneOldMetrics, RemoveStaleObservers are NOT methods on cmd/server *DB.
  Fails on master (all three currently exist + use cachedRW to bypass
  the server's read-only handle, racing ingestor INSERTs → SQLITE_BUSY).

- TestServerDBConnIsReadOnly — opens via OpenDB, asserts INSERT fails.
  Today this passes via OpenDB(mode=ro), but pinning it as an invariant
  prevents future regressions if anyone ever drops the ro flag.

- TestIngestorPruneOldPackets — exercises new Store.PruneOldPackets that
  the GREEN commit will implement. Stub returns 0; test asserts 2 rows
  pruned → fails (RED proof).

Plus TestIngestorVacuumOnStartupMigratesNONEtoINCREMENTAL guarding the
existing CheckAutoVacuum path so the GREEN commit's deletions in
cmd/server cannot regress the vacuum migration.
2026-05-19 06:31:17 +00:00
..