Skip to content

0.4.2 release record

This corrective patch aligns the packaged PostgreSQL Stripe ledger with the library-orchestrated host exercise, enforces the approval store's acquire-only connection contract, and adds a familiar denial spelling without changing its wire value. It adds no connector, Stripe action, lifecycle, or database migration.

Migration from 0.4.1

  1. Upgrade the exact pin with:

    uv add "threvo-actions==0.4.2"

  2. PostgresStripeLedger.remember now returns CONFLICT for a known immutable binding mismatch. It continues to raise StripePostgresHostError when it cannot establish whether persistence succeeded.

  3. PostgresStripeLedger.load and load_in now return None for a known missing intent. Repository implementations that require the record must translate None into their own unavailable-record failure.
  4. Conflicting repeated terminal writes now return StripeHostCloseStatus.CONFLICT. Exact repeats still return MATCHED; an uncertain write still raises.
  5. StripeLedgerReservationStatus remains importable but is now an alias of StripeHostReserveStatus. Existing member comparisons continue to work and adapters no longer convert between look-alike enum classes.
  6. PostgresApprovalRequestStore and migrate_approval_postgres require only a connection source with acquire(). Raw asyncpg pools remain compatible.
  7. AuthorityDecision.DENY is an alias of AuthorityDecision.REJECT. Both serialize as "reject", preserving stored evidence, canonical payloads, signatures, and callbacks.

Expected ledger dispositions are returned values. Exceptions mean the ledger could not produce a trustworthy disposition or encountered an invalid storage boundary. Adapters must not classify an exception by matching its message.

Review validation

The reference PostgreSQL exercise adapter and its real database test already existed in 0.4.1 and completed the twelve scenarios. The adapter achieved that by matching two exception strings and translating a second reservation enum, so the reported contract mismatch was still valid. This release removes those translations and executes the same exercise over the ledger's typed results.

The 0.4.1 approval ConnectionSource protocol contained acquire, execute, and fetchrow, which is why strict mypy accepted the old implementation. That protocol was broader than necessary and inconsistent with the migration and Stripe ledger patterns. It is now acquire-only, and a real PostgreSQL test wraps asyncpg without pool-level query methods.

Stabilization and release authorization

Outside-host adoption remains pending. The 0.4 feature-release hold remains active and this patch does not count maintainer CI as independent evidence.

The repository owner explicitly directed publication of this exact corrective 0.4.2 release on 2026-09-12. The release workflow's default-off exception is bound to v0.4.2; it cannot authorize a later release and does not bypass candidate qualification, signed-tag verification, artifact identity, TestPyPI/PyPI verification, or protected release environments.

Qualification

The candidate must pass Ruff, formatting, strict mypy, the full test suite, Bandit, dependency audit, strict documentation build, build verification, and wheel/source-distribution checks on Python 3.11 through 3.13. PostgreSQL CI must run the complete Stripe host exercise over PostgresStripeLedger and exercise the approval migration and store through an acquire-only connection source.