Threadline.Continuity (Threadline v0.11.1)

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 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 and has a Threadline capture trigger.

Bare table names resolve to the public host schema by default. Pass schema: "support" for a selected host schema, or pass a schema-qualified identifier such as "support.tickets".

Options

  • :repo — required Ecto.Repo module
  • :schema — optional selected host schema for bare table names

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).