Repository navigation
Add gtc doctor preflight command - #13
Merged
Merged
Conversation
One command that diagnoses a deployment before the first run, instead of the operator decoding startup logs: - PostgreSQL: server version (14+ for pgoutput v2), wal_level=logical, SUPERUSER/REPLICATION privileges, free replication slots and WAL senders, slot/publication existence vs. auto-create permissions (CREATE PUBLICATION FOR ALL TABLES needs superuser), tables without a primary key or replica identity (UPDATE/DELETE on them fails once published), and a real replication-protocol handshake (IDENTIFY_SYSTEM) as the authoritative access check. - Sinks: Redis PING, RedisJSON module presence (JSON.TYPE probe), Meilisearch health, plus config consistency — transforms compile with the same options as startup, DLQ enabled without REDIS_URL warns, outbox without REDIS_URL fails, zero sinks warns. - Pipeline: warns when sink-count x CDC_PROCESS_TIMEOUT can exceed wal_sender_timeout (which would get the replication connection dropped mid-event). Exit 0 when ready (warnings allowed), 1 on failures, with a concrete fix hint per finding. The integration test now runs doctor as a preflight (pass against the provisioned environment, fail with an unreachable sink) before exercising the pipeline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019dEj24Ta2o9QxzW9ZrSPtb
This was referenced Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PR 1 of 3 — base
main. Followed by #(DDL) and #(sinks), which build on this branch.What does this PR do?
Adds
gtc doctor: one command that diagnoses a deployment before the first run, instead of making the operator decode startup logs.PostgreSQL — server version (warns below 14, the pgoutput v2 floor),
wal_level, SUPERUSER/REPLICATION privileges, free replication slots and WAL senders, slot/publication existence weighed against auto-create permissions (CREATE PUBLICATION ... FOR ALL TABLESneeds superuser, so it fails with the exact statement to run manually), tables lacking a primary key or replica identity (whose UPDATE/DELETEs PostgreSQL would reject once published), and — the authoritative check — a realIDENTIFY_SYSTEMreplication handshake.Sinks — Redis
PING, RedisJSON module probe, Meilisearch health, transform compilation with the same options startup uses, plus config-consistency checks (DLQ enabled withoutREDIS_URL, outbox withoutREDIS_URL, no sinks at all).Pipeline — warns when sink-count ×
CDC_PROCESS_TIMEOUTcould exceedwal_sender_timeout, which would drop the replication connection mid-event.Exit 0 when ready (warnings allowed), 1 on failures, with a concrete fix hint per finding:
Type of change
Checklist
go test ./...passes (including-race)gofmt/go vetare cleanREADME.md/CLAUDE.mdupdated (new "Preflight" section, build/run commands)Notes for the reviewer
🤖 Generated with Claude Code
https://claude.ai/code/session_019dEj24Ta2o9QxzW9ZrSPtb
Generated by Claude Code