Fix the pgcrypto procedure, and test it - #522
Merged
Merged
Conversation
The pgcrypto procedure could not be completed as written. Step 2 creates user_passwords, step 3 inserts into tbl_sym_crypt, and step 4 selects from user_passwords and shows two rows. tbl_sym_crypt is created nowhere on the page, so a reader following it gets `relation "tbl_sym_crypt" does not exist` at step 3 and then no rows at step 4, under a heading that says the passwords are listed. Both sample output blocks were captured against that other table and were misaligned besides, so they are regenerated from a real run of the corrected procedure on PostgreSQL 17 with pgcrypto 1.3. The decrypt statement lost two stray leading spaces at the same time. Adds a test plan so this cannot regress. Thirteen steps, pure SQL, and six assertions covering what the page actually claims: the extension installs, the table exists, both rows land, the stored text contains no plaintext, and each password round-trips back through pgp_sym_decrypt. Every assertion was proved able to fail before it was trusted passing -- drop the extension, drop the table, insert one row, store plaintext, or give either user the wrong secret, and the matching assertion goes red. The plan names a literal key where the page says <Password_Key>. The page is right to leave that to the reader, and the plan is right to be literal: it runs on a throwaway fork, and an angle placeholder in a run SQL step would reach the database as text rather than being substituted. Run: PASS on AWS, fork cg3by3jzyp, deleted after the run. Five statement steps and six assertions held, matching the plan exactly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
atovpeko
marked this pull request as draft
September 11, 2026 14:29
atovpeko
marked this pull request as ready for review
September 11, 2026 14:30
atovpeko
marked this pull request as draft
September 11, 2026 14:30
atovpeko
marked this pull request as ready for review
September 14, 2026 09:42
✅ Checklist CompleteThank you for taking the time to properly review your PR! All checklist items are complete. |
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.
Describe your changes
The pgcrypto procedure could not be completed as written: step 2 creates
user_passwords, step 3 inserts intotbl_sym_crypt, a table the page never creates. A reader gotrelation "tbl_sym_crypt" does not exist, then no rows under a heading saying the passwords are listed. Both sample output blocks were captured against that other table and are regenerated from a real run.Adds a 13-step test plan so it cannot regress. Six assertions, each proved able to fail before being trusted passing.
Affected pages
/deploy/tiger-cloud/tiger-cloud-aws/tiger-cloud-extensions/pgcrypto
/deploy/tiger-cloud/tiger-cloud-azure/tiger-cloud-extensions/pgcrypto
🧪 Component kitchen sink — check for visual regressions if you changed components, styles, or dependencies.
Related Issues
Issue: #number
Checklist before requesting a review
🤖 Generated with Claude Code