Repository navigation
feat(db): wallet RLS migration and vyloop_app role (RLS unit 6) - #347
Merged
Merged
Conversation
…ith push_campaigns (RLS unit 6)
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
Unit 6 of
tenant-isolation-rls: turns RLS on for the wallet phase. Do not merge before 0026 is applied to production. Themigration-driftgate blocks every deploy until it is.0026_wallet_rls.sqlenables RLS and creates thetenant_isolationpolicy on the threeTENANT_ID_TABLES.push_campaigns. Production already had RLS and this exact policy on that table, applied outside any migration.rls.tsgenerates.push_campaignspolicy in the same transaction, so the table is never without it.check-rls: thewalletphase now includespush_campaigns(RLS_BATCHES.wallet).docs/09§4:vyloop_appsecret for the workers, the gateway and the drift job; the owner credential stays out of CI and runtime;vyloop_apprunbook;rlsandpolicyevidence.Rehearsal (Neon branch copied from production)
Everything below ran connected as
vyloop_app(NOBYPASSRLS, owns nothing), with wallet RLS on.db:rls --expect wallet,db:drift,--check-baselineThere was no preview deploy: one with real Google credentials would write to real passes. The rehearsal runs the real store and sweep instead.
Verification (Node 22)
check-rlsfailed becauseRLS_BATCHES.walletdid not exist.scripts/check-rls.test.mjs+scripts/check-migration-drift.test.mjs: 126/126.packages/db: 319/320. The one failure is environmental:secret-materialasserts that the repo root path ends invyloop, and this worktree is namedrls-unit6.Risk: item 1 (an irreversible-in-effect change to which rows production queries see), item 2 (tenant isolation), item 5 (the production credential changes).
🤖 Generated with Claude Code