Fix broken reconciliation between Postgres, Redpanda, and ClickHouse. Build a reusable reconciliation command that detects drift, writes a structured drift report, and fails with meaningful exit codes when systems are unavailable.
No trace payload.Debugging Output
2 files · 1KBHarness
classic-de
Agent
claude-code
Model
claude-sonnet-4-6
Version
v0.1.0
Persona
naive
Plan Mode
no-plan
Prompt
Unknown
We have transactions in Postgres, Redpanda, and ClickHouse but the counts don't match. Build a reusable reconciliation command that checks all three systems, reports any drift, and gives an operator something they could schedule and trust.
Requirements:
- Write the structured report to `artifacts/drift-report.json`.
- Include `pg_count`, `topic_count`, `ch_count`, `behind_systems`, `discrepancies`, `tolerance`, `summary`, `generated_at`, and `report_path`.
- Support a configurable tolerance and a configurable report path.
- Use exit code `0` when everything is within tolerance, `2` when drift is detected, and `1` when a dependency or configuration error prevents the check from running.
- Make the output readable enough that an on-call engineer can immediately tell what is behind and where the report was written.
ID
foo-bar-cross-system-reconciliation
Domain
foo-bar
Tier
tier-3
Harness
classic-de
Postgres app.transactions. Redpanda transactions topic. ClickHouse analytics.transactions. Data is drifted; reconciliation job missing.
Create a reusable reconciliation command between source (Postgres), stream (Redpanda), and sink (ClickHouse)
Write a structured drift report to artifacts/drift-report.json with counts, discrepancies, behind_systems, tolerance, summary, generated_at, and report_path
Support --tolerance and --report-path, exit 0 when within tolerance, exit 2 when drift is detected, and exit 1 on dependency or configuration failures