test(sync): read-only production probe after each companion deploy #194

Merged
maximus merged 2 commits from issue-176-prod-probe into master 2026-11-08 15:35:59 +00:00

2 commits

Author SHA1 Message Date
le king fu
9c5e57113c test(probe): pin deleted rows in isolation controls and per-account count (#176)
Refs #176

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 10:30:40 -05:00
le king fu
4eb4562a45 test(sync): read-only production probe after each companion deploy
Add web/scripts/probe.sql, ten counters (integrity, account isolation,
Inbox consistency) in a READ ONLY transaction ending with ROLLBACK, run
by psql inside the companion's PostgreSQL container after each deploy.
web/src/test/probe.test.ts runs the file from disk against the companion
migrations in PGlite: each control detects its seeded anomaly, a healthy
base counts zero, the output holds only control names and counts, a write
slipped into the transaction fails, and the file text keeps the read-only
contract. REVIEW.md documents the command, how to read the result and
what follows an anomaly.

Refs #176

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:14:01 -05:00