testutil: control-plane error contract and rotation-seam tests - #12
Open
Kiran01bm wants to merge 1 commit into
Open
testutil: control-plane error contract and rotation-seam tests#12Kiran01bm wants to merge 1 commit into
Kiran01bm wants to merge 1 commit into
Conversation
Two AWS-seam tests join the Ministack tier: typed RDS fault matching for unknown/duplicate identifiers, and master-password rotation landing on the running database (stale password refused as 28P01). The duplicate- instance case matches by error-code prefix because the emulator's wire code carries a Fault suffix real AWS omits. ProvisionAuroraPostgres now returns a cluster handle so tests can drive further control-plane calls.
Kiran01bm
marked this pull request as ready for review
August 6, 2026 10:25
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Summary
Adds two AWS-seam tests to the Ministack AWS-boundary tier: a control-plane error contract test (typed RDS fault matching) and a password-rotation seam test (rotation via
ModifyDBClusterlands on the running database). Both are behaviors the engine's discovery and connection code will rely on in production.What
ProvisionAuroraPostgresnow returns anAuroraClusterhandle (control-plane client, cluster/instance IDs,URL()/URLWithPassword()) so tests can drive further control-plane operations against the provisioned cluster.TestAuroraControlPlaneErrorContract— describing an unknown cluster and creating duplicate cluster/instance identifiers surface as the AWS SDK's typed RDS faults, matched witherrors.As, never by message text.TestAuroraControlPlanePasswordRotation—ModifyDBClusterapplies a new master password to the real database: the new password connects throughpkg/dbconn, the stale one is refused with SQLSTATE28P01— the exact failure a mid-migration connection hits after a production rotation.docs/testing.md— the tier-share section now lists all three Ministack tests and their seams; the planned-growth list drops IAM-auth (not planned) and adds rotation recovery (oncepkg/dbconngrows a credential-refresh hook); logical replication is called out as a data-plane concern.Why
The tier existed with one provisioning E2E; these tests pin down the two seams the engine hits first in production — control-plane error handling during discovery, and credential rotation mid-migration. The rotation test also establishes the baseline the future credential-refresh hook must recover from.
One emulator fidelity gap found and documented: Ministack's duplicate-instance wire code is
DBInstanceAlreadyExistsFault, while real AWS emitsDBInstanceAlreadyExists— so the SDK cannot map it to the typed fault and that one case matches by error-code prefix (holds against both the emulator and a real endpoint). Worth contributing a fix upstream.References