Conversation
wmadden
added a commit
that referenced
this pull request
May 12, 2026
…dressed wire names Settle the last blocking RLS design hole (#19 RLS verifier check semantics) and three smaller working-assumption items. Design choice: policy wire names carry an 8-hex SHA-256 suffix over the canonical content tuple (using, withCheck, sort(roles), operation, as). Predicate equivalence collapses to a name match; the verifier never compares bodies for equivalence purposes. One body-level check remains (the per-row tamper check that recomputes the suffix against the introspected body). Three structural wins: - Predicate-equivalence false positives are eliminated by construction. Postgres-side expression-printer normalization (parens, whitespace, cast forms) no longer surfaces as policy_mismatch noise. - Policy rename detection is structurally free (matching hash, different prefix → ALTER POLICY ... RENAME TO). Closes the earlier defer-and-ship-drop+create working assumption. - No version marker needed; the contract storage hash already signals normalizer changes through VERIFY_CODE_HASH_MISMATCH (per ADR 004). Pinned decisions: - A8: TS as field, default permissive (mirrors PSL B2). - C9: content-addressed policy wire names. - C10: RLS verifier semantics built on C9 (rls_policy_renamed, rls_policy_tampered, rls_not_enabled issue kinds). - C11: implicit ENABLE RLS via model-level rls: auto|enabled|disabled. - OC4: content-addressed naming pattern as a future-project backport target for indexes, functions, views, check constraints. Artifacts: - New ADR draft at projects/supabase-integration/specs/ (promotes at close-out with assigned number). - rls.md verifier section rewritten to the content-addressed model. - design-holes.md #19 marked decided; verifier cluster closed.
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.
No description provided.