test(proxy): cover transactional schema edge cases - #461
Open
tobyhede wants to merge 5 commits into
Open
Conversation
Record the BUG-308 design for connection-local DDL visibility and authoritative schema publication. Define atomic committed snapshots, transaction overlays, savepoint behavior, protocol deferral, fail-closed reload handling, and the boundary of the standalone schema middleware. Signed-off-by: James Sadler <james@cipherstash.com>
Publish schema and encryption metadata as one versioned snapshot, with connection-local overlays pinned for transactions and savepoint-aware rollback semantics. Activate DDL only after backend success, defer pipelined statements behind in-flight DDL, and reload authoritative catalog state after the outermost commit using generation-safe coalescing. Fail closed for unmodelled DDL, dependent simple-query batches, and publication failures. Add unit and TLS-backed regressions proving immediate cross-connection encryption and ciphertext at rest. Signed-off-by: James Sadler <james@cipherstash.com>
Restrict the dependent post-DDL guard to schema changes that can alter encryption metadata, preserving pgx temporary-table setup batches while continuing to fail closed for encrypted DDL followed by mapped work. Document every BUG-308 production module, type, and function. Expand the schema middleware module docs with its authority, atomicity, protocol-ordering, transaction, publication, and failure invariants plus current and intrinsic limitations. Add focused regression coverage and verify the previously failing Go integration path against the rebuilt Proxy image. Signed-off-by: James Sadler <james@cipherstash.com>
Normalize PostgreSQL identifiers in domain prediction, overlays, and savepoint matching. Fail closed when savepoint state cannot be reconciled, while accepting encryption-neutral ALTER TABLE operations and ignoring safe connection-local temporary tables. Inject Flush after extended-protocol DDL Execute so clients can pipeline dependent Parse messages before a single Sync without deadlock. Track simple-query intents from the statements actually forwarded, including compatibility fallback paths, and centralize typed ReadyForQuery publication handling. Remove the obsolete encryption configuration reloader, restore empty-configuration startup warnings in SchemaManager, and document ownership, correctness principles, trade-offs, and intrinsic limitations. Add unit, Rust database, and pgx SendBatch regressions for the review findings. Signed-off-by: James Sadler <james@cipherstash.com>
freshtonic
force-pushed
the
docs/bug-308-design
branch
from
August 24, 2026 04:21
4d55098 to
fa6bf25
Compare
tobyhede
force-pushed
the
test/bug-308-schema-lifecycle-coverage
branch
3 times, most recently
from
August 24, 2026 05:42
31945d4 to
323785d
Compare
Signed-off-by: Toby Hede <toby@cipherstash.com>
tobyhede
force-pushed
the
test/bug-308-schema-lifecycle-coverage
branch
from
August 24, 2026 05:54
323785d to
4df987a
Compare
freshtonic
force-pushed
the
docs/bug-308-design
branch
from
August 25, 2026 06:59
fa6bf25 to
ded4814
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Acknowledgment
By submitting this pull request, I confirm that CipherStash can use, modify, copy, and redistribute this contribution, under the terms of CipherStash's choice.