# Changelog

<!-- language-switch -->
[English](CHANGELOG.md) | [简体中文](CHANGELOG.zh-CN.md)

English is the authoritative version.


## 0.1.0

This entry describes the changes prepared for version 0.1.0. It records neither
a publication date nor a registry publication receipt. Check the exact version
with `moon view pangbit/mooncdc@0.1.0`; see [releasing](docs/RELEASING.md).

### Validation note

One macOS release test run at the merged source reported `TimeoutError` in the
copy-exit cleanup and reconnect retry scenarios. One retry of that job passed
with source, toolchain, commands and timeouts unchanged. The cause is unconfirmed;
this is not a claim that a product defect was established or fixed. See the
[version-bound record](docs/VALIDATION.md#github-ci-at-the-reviewed-source).

### Changes

- Persist SchemaStore history through an exclusive StateStore namespace, including
  PostgreSQL recovery without a local schema file and stale-owner write rejection.

- Select or skip initial table rows by OID while retaining schema setup, empty
  destination durability, WAL handover and completed-table restart state.

- Add optional scoped HTTP liveness/readiness probes with dual-stack binding,
  precise IPv4 fallback, and listener cleanup on host return, error or cancellation.

- Observe pipeline lifecycle and monotonic copy/WAL activity through ApplyControl;
  evaluate read-only liveness/readiness, including idle keepalives and blocked
  destination writes/flushes without treating progress as durability.

- Drain admitted ClickHouse transaction writes despite source-caller cancellation
  before replay, table reset or shutdown. Preserve per-request client deadlines
  and allow cancellation while waiting for admission.

- Persist complete table-handover decoding masks and restore connection-local
  schema lineage after source retries. Expose exact per-event schemas through
  Transaction.replicated_schemas; ClickHouse consumes them before row writes.

- Share one pipeline retry budget across initial source setup, source stream
  recovery and destination failures; preserve fatal state and callback boundaries.

- Retry transient main-apply destination writes and flushes from the durable
  checkpoint with a bounded budget, while keeping table-copy workers active.

- Prune obsolete schema versions after durable pipeline checkpoints, bounded by
  replay position, table ownership and destination recovery metadata. Retain both
  endpoints of pending ClickHouse DDL; custom destinations opt in explicitly.

- Add ClickHouseDestination with RowBinary snapshot/CDC writes, primary-key tombstones,
  FULL TOAST reconstruction, persistent schema bindings and restart layout validation.
  Verify both engines on PostgreSQL 17/18 and ClickHouse 26.4, plus 3,800 upstream
  default-expression vectors. Execute supported ordered column DDL with durable
  Creating/Applying/Applied recovery, reject ambiguous partial states and schema rewinds,
  and preserve historical defaults and physical table names after source renames.
  Configure separate connectivity, schema, DDL and insert deadlines with bounded
  server settings; verify new-process recovery across eight real SIGKILL cases.

- Integrate pluggable StateStore ownership and durable records into pipelines and
  subscriptions, with file/PostgreSQL backends and destination metadata sessions.
  Retain source-bound checkpoints and reject writes from closed/stale store owners.

- Persist table-copy failures with bounded timed, manual and disabled retry policies;
  keep healthy tables applying while failed tables await a fresh snapshot/reset.
  Expose live manual retry through ApplyControl and retain global durability failures.

- Preserve arbitrary-precision JSON numbers and equality, including underflow values,
  decimal scale and exponents; recognize generic built-in PostgreSQL arrays.
  Expand official ETL codec differential coverage to 558 vectors.

- Add schema projection/identity masks, typed row decoding, canonical schema JSON
  roundtrips and ordered column DDL plans with rename-cycle handling. Verify plans
  against 77 vectors evaluated by the pinned official ETL planner.

- Apply ready tables while bounded table workers copy and replay private WAL;
  persist handover cutoffs only after durability and recover unfinished copies even
  when the main checkpoint has advanced. Scope split truncate IDs by table.

- Add a reproducible 320-vector differential check against the pinned official ETL
  codec; align numeric normalization, float4 rounding/overflow, OID signs and leap seconds.

- Add typed PostgreSQL text cells, exact numeric text, temporal infinities/BC/24h,
  nullable arrays and stable session output formats for snapshots and replication.

- Add Supabase ETL DDL parsing, ordered schema versions, publication-scoped handling,
  full snapshot schemas and an atomic schema store with replay checks and retention bounds.

- Add a persistent per-table pipeline with concurrent independent snapshots, failed-copy
  restart, table cutoffs, dynamic WAL-driven discovery and opt-in bounded backpressure.

- Exclude index INCLUDE columns from snapshot replica-identity key flags.
- Add custom Destination contracts with Accepted/Durable writes, snapshot attempt IDs,
  cumulative/idle/stop flushes and durable snapshot checkpoints for later Resume.
- Add opt-in logical messages with raw payloads, commit-bound transactional delivery
  and explicit nontransactional handling; retain negotiation across reconnects.
- Add bounded, publication-aware consistent snapshots and source-bound `AfterSnapshot`
  handoff; retain failed bootstrap slots for explicit recovery.
- Add opt-in pgoutput binary transfer and raw Binary values; preserve negotiation on reconnect.

- Retry transient failures throughout reconnect startup, identification and COPY BOTH;
  close failed attempts and surface the latest error when the retry budget is exhausted.
- Add protocol fault regressions and real SIGKILL tests at five internal checkpoint boundaries.
- Add a strict registry dry-run compatibility check for the observed backend exit-code defect.

- Native PostgreSQL pgoutput v1 subscriptions with SCRAM-SHA-256 and verified TLS.
- Immutable committed transactions, table/type metadata and replay-stable data event IDs.
- Contiguous explicit acknowledgements and atomic source-bound checkpoints.
- Bounded frames, transactions and outstanding deliveries; heartbeats and bounded reconnects.
- Index, cache and durable event journal examples; PostgreSQL 18/17 integration tests.
