[Test] Prove destructive retirement transaction atomicity on PostgreSQL #268

Closed
opened 2026-07-21 16:49:10 +02:00 by zemion · 2 comments
Owner

Outcome

The release gate proves that module-owned credential scrubbing, non-secret audit insertion, and destructive schema retirement commit or roll back as one PostgreSQL transaction.

Context

Core now enlists table drops through session.connection() and has a SQLite rollback regression. PostgreSQL is the production reference database and needs an integration-level failure-injection proof rather than relying only on SQLAlchemy connection semantics.

Acceptance

  • Run against a real supported PostgreSQL version in the release/integration harness.
  • Prove successful scrub + audit + table drop commit together.
  • Inject an audit or DDL failure and prove secrets/rows/tables and audit state roll back together.
  • Prove no second connection waits on locks held by the installer session.
  • Exercise at least one secret-owning module retirement provider.
  • Retain only non-secret diagnostics in the test/report artifacts.
## Outcome The release gate proves that module-owned credential scrubbing, non-secret audit insertion, and destructive schema retirement commit or roll back as one PostgreSQL transaction. ## Context Core now enlists table drops through `session.connection()` and has a SQLite rollback regression. PostgreSQL is the production reference database and needs an integration-level failure-injection proof rather than relying only on SQLAlchemy connection semantics. ## Acceptance - Run against a real supported PostgreSQL version in the release/integration harness. - Prove successful scrub + audit + table drop commit together. - Inject an audit or DDL failure and prove secrets/rows/tables and audit state roll back together. - Prove no second connection waits on locks held by the installer session. - Exercise at least one secret-owning module retirement provider. - Retain only non-secret diagnostics in the test/report artifacts.
Author
Owner

Codex State: progress

Summary

  • Implementing the PostgreSQL transaction-atomic retirement proof against the local PostgreSQL 16 reference service; success and injected-failure paths will cover a secret-owning provider without logging secret values.

Suggested status label: status/in-progress

## Codex State: progress ### Summary - Implementing the PostgreSQL transaction-atomic retirement proof against the local PostgreSQL 16 reference service; success and injected-failure paths will cover a secret-owning provider without logging secret values. Suggested status label: `status/in-progress`
Author
Owner

Codex State: done

Summary

  • PostgreSQL retirement proof now exercises Files credential scrubbing, persistent Audit recording, and table DDL as one transaction.
  • Success, injected audit failure, and injected DDL failure prove commit/rollback behavior and same-session DROP execution.

Changed Files

  • tests/test_postgres_retirement_atomicity.py
  • docs/DEPLOYMENT_OPERATOR_GUIDE.md
  • docs/RELEASE_DEPENDENCIES.md

Verification

  • PostgreSQL 16.14: 3 scenarios passed; no govoplan_retirement_% schemas remained and public was untouched.
  • SQLite retirement regressions: 2 passed.
  • Meta postgres-integration-check now requires the proof and fails closed when PostgreSQL/full-stack dependencies are missing.
## Codex State: done ### Summary - PostgreSQL retirement proof now exercises Files credential scrubbing, persistent Audit recording, and table DDL as one transaction. - Success, injected audit failure, and injected DDL failure prove commit/rollback behavior and same-session DROP execution. ### Changed Files - `tests/test_postgres_retirement_atomicity.py` - `docs/DEPLOYMENT_OPERATOR_GUIDE.md` - `docs/RELEASE_DEPENDENCIES.md` ### Verification - `PostgreSQL 16.14: 3 scenarios passed; no govoplan_retirement_% schemas remained and public was untouched.` - `SQLite retirement regressions: 2 passed.` - `Meta postgres-integration-check now requires the proof and fails closed when PostgreSQL/full-stack dependencies are missing.`
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-core#268
No description provided.