fix(planning): serialize PostgreSQL transaction queries - #219
Draft
seonghobae wants to merge 48 commits into
Draft
fix(planning): serialize PostgreSQL transaction queries#219seonghobae wants to merge 48 commits into
seonghobae wants to merge 48 commits into
Conversation
Contributor
Author
|
@coderabbitai review |
|
Warning Review limit reachedNext included review available in 52 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (13)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 6, 2026
seonghobae
marked this pull request as ready for review
September 6, 2026 20:18
seonghobae
marked this pull request as draft
September 6, 2026 20:23
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.
Root cause
Planning data-rights export and erasure treat PostgreSQL results as durable dependency evidence. The preserved repair lineage serializes admitted SQL on one node-postgres transaction connection, revokes retained callback SQL authority, snapshots parameters at admission, drains admitted work before transaction control, preserves transaction-fatal query failures, keeps pool shutdown one-shot, and fails closed for malformed temporal/integer/digest/Today/UUID evidence.
RED → repair lineage
7531367700dfdc5cfe9a3459bdda3c1b07e763de→532774dc61f9defabb81d50773c6265dddff4b6e: serialize concurrent application queries on one connection.75ada4e8b8711ba0c8da64a6746844f342badf5c→d1b640f867001afe1230d218850ed6353925d6c2: transaction control waits for every admitted query.437c8389f0f7c3e113103e8f128ea6fced637c1b→125b7b6b56d7ff46e2acb65b1cf3a14f2652169e: revoke retained callback SQL capability before drain/control.8819340e78688617712b7b0b7171cb9a72f39ac6→b5bc9ef6837af5338c21245861e638f2caa9f6b8: snapshot admitted query parameters.cca915e51f329d3c4ab215839fb6d55eaaea46c4→d8fd491e57333c6a864c0b142d12f5d3360a824f: preserve one-shotPool.end()authority, including failure.d1361e22e412b01d7ece51e581d3934a017b1297→1bde59441c767c59614abeb8a71330a010df839d: any admitted query failure preventsCOMMITand causes rollback.f762bb16697c10d9eb5aade153c6f15e1c94a19e→4969afcf324703990e8836a4968578a2eb5d1ec0: reject impossible temporal evidence.90b2aaf320dde57fd841ec6d78f91c4e40e9c863→a47fd221b07cd1d1eeee9944e7c3ba84c3ef6340: reject string-coerced persisted counts.2136255266ad004eeccd3a10952af8be23199697→cc96fe925026254d64f6ea8cad422a59e30c431e: reject recanonicalized durable SHA-256 evidence.8990fda1e7b10547a506c2a49d701e857dad4fcf/22a26d2f61b10ad83362bcf1327b4662f25abb7f→952ace9ba38f370a014e19282de704f13e13f705: require persisted Today payloads to already satisfy domain invariants.ea74805353c4011c1002507efc0f85850e82e943→98b031ff0d32b881b77174ebdf67b358b93cbdde: accept only persistedcreated/updatedToday result kinds.4e8fe8e992739340e8e8d6ad1bf6dc0a687c466e→9f2baf96e5e963e3c8794a7abf985eb347f03557: require durable PostgreSQL UUID evidence to already be canonical lowercase while retaining request-boundary normalization.9a3b2e5d15a5159a207e02572c4166f7d32cbfa1proves a syntactically valid lowercase 64-hex receipt digest can be replayed even when it does not bind the exact durable receipt fields. Causal repaird5a10327243b87494c4f401a032cca137af72041centralizes the canonical receipt digest over contributor, workspace, requesting user, request, idempotency key and erased-record count, and recomputes it before replay authority is returned. CHANGELOG descendant2ab280d0e9b0f84a13611c34a87533dd7ac2270frecords the contract.The bounded predecessor control accepts an arbitrary canonical-looking lowercase digest; repaired semantics reject it and accept only the exact fixture digest. This is focused RED/GREEN evidence, not repository-wide GREEN.
Current protected-main adoption
Protected base remains
main@193a87ef54c3fe6dcda4755bce4d6bc81e3a0297. Current exact head is2ab280d0e9b0f84a13611c34a87533dd7ac2270f, open/mergeable and a non-force descendant. This lane remains Draft until unchanged-head repository/security checks, independent approval/thread state, and live-base compatibility are terminal and valid.Exact-head hosted runs are CI
34057676548, Commercial Readiness34057676684, Security Scan34057676568, CodeQL PR34057676547, AppGuardrail34057676582, and SAST Semgrep34057676566; current reads are queued/pending. No predecessor workflow evidence transfers to this head.Do not duplicate #247's formatter/source repair or #246's package graph repair here; consume protected foundations by normal merge/non-force restack. No schema, SQL text, isolation level, HTTP/event contract, pool sizing, credentials, self-approval, administrator bypass, force-push, destructive rebase, stale evidence reuse, or gate weakening is introduced.
Refs #211, #212, #219, #245, #246, #247; ContextualWisdomLab/.github#712; ContextualWisdomLab/appguardrail#1106.