You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Hosted cutover 14/17] Add the fenced activation engine - #2586
Implement the guarded activation transaction, parity audit and connection cleanup. Retry complete attempts for supported transaction conflicts, and discard uncertain physical connections without replaying a committed activation.
Why
A lost COMMIT or unlock response must not activate a scope twice or return a connection holding a session lock to the pool. The engine needs explicit commit and cleanup boundaries.
Usage
No usage change. The engine remains disconnected from production commands until the next slice.
internal/postgres/raw_parity_reader.go:39: Real Codex captures matching retained pushed history are classified as unmatchable because the query treats an empty SourceSessionID as missing stable identity. Codex stores its native identity in Session.ID, so identical sessions skip comparison and report pass=false. The fixture masks this with a synthetic SourceSessionID.
Fix: Recognize stable Codex IDs according to the provider identity contract while preserving thread/page distinctions. Add a regression using real Codex parser output.
internal/postgres/raw_rollout_retry_pgtest_test.go:96: TestRawRolloutFirstSerializationFailureRegression invokes the same helper with identical arguments, setup, operations, and assertions as TestRawRolloutRetriesCommitExactlyOnce/40001/projection.
Fix: Delete TestRawRolloutFirstSerializationFailureRegression and retain the table case and shared helper.
internal/postgres/raw_activation_connection_pgtest_test.go:118: activationObservedRows.NextRow classifies SQL column shapes and increments counters that no test reads. The custom driver-row wrapper protects no behavior.
Fix: Delete activationObservedRows, the unused rows map and its initialization, and return underlying rows directly from QueryContext. Retain connection, transaction, and response-loss instrumentation.
internal/postgres/raw_parity_readiness_pgtest_test.go:112: TestRawParityRuntimeCannotReadOtherTenant stores foreign data in B's schema but invokes both loaders only against A's empty schema. It tests absent-ID and empty-head behavior without exercising forbidden access to B. Existing TestHostedTenantIsolation already covers the actual boundaries.
Fix: Delete TestRawParityRuntimeCannotReadOtherTenant and its otherwise unnecessary foreign projection setup.
internal/rawparity/relationships_test.go:184: TestCompareResolvedRejectsMalformedTarget injects an invalid UTF-8 physical target ID that cannot reach CompareResolved through production: projectOnce constructs these IDs from "raw-row-" plus a hexadecimal digest. The test only exercises JSON encoding failure for an invented ID.
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
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.
Builds on #2585.
Incremental diff for this part.
What changed
Implement the guarded activation transaction, parity audit and connection cleanup. Retry complete attempts for supported transaction conflicts, and discard uncertain physical connections without replaying a committed activation.
Why
A lost COMMIT or unlock response must not activate a scope twice or return a connection holding a session lock to the pool. The engine needs explicit commit and cleanup boundaries.
Usage
No usage change. The engine remains disconnected from production commands until the next slice.
Refs #1352.