Threadline.Continuity (Threadline v0.4.0)

Copy Markdown View Source

Brownfield cutover helpers for honest T₀ semantics with Threadline capture.

T₀ means there are no AuditChange rows for a table until the first real trigger-fired mutation after capture is installed. There is no pre-trigger history — operators must not expect retroactive audit rows for data that existed before triggers were live.

Consequently, Threadline.history/3 returns [] for a primary key until that first post-install mutation produces an audit_changes row.

Coverage checks reuse Threadline.Health.trigger_coverage/1 (catalog queries only); this module does not duplicate pg_trigger / pg_tables inspection.

See guides/brownfield-continuity.md for the operator checklist and compliance notes.

Summary

Functions

Asserts that table_name exists in public and has a Threadline capture trigger.

Returns a human-readable explanation of brownfield cutover steps (read-only).

Functions

assert_capture_ready!(table_name, opts)

Asserts that table_name exists in public and has a Threadline capture trigger.

Options

Raises ArgumentError if the table is unknown or not covered.

explain_cutover(opts)

Returns a human-readable explanation of brownfield cutover steps (read-only).

Options

  • :repo — required Ecto.Repo module (used only when future steps need DB metadata; today the explanation is static).