Skip to content

fix(changes): harden row-level security checks in change reads - #97

Merged
andinux merged 4 commits into
mainfrom
fix/changes-visibility
Nov 5, 2026
Merged

andinux merged 4 commits into
mainfrom
fix/changes-visibility

Conversation

@andinux

@andinux andinux commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Hardened row-level security checks when reading changes, on both SQLite and PostgreSQL.

Deletes still sync to every device that syncs the table: a deleted row can't be checked against a policy, and its delete marker carries the primary key. This is documented in API.md, docs/schema.md, docs/rls-overview.md and docs/postgresql/reference/rls.md, with the recommendation to use opaque identifiers or soft deletes when primary-key values are sensitive.

Notes

  • No measurable cost on regular tables.
  • No extension upgrade script is needed; the extension SQL is unchanged.
  • No client changes are needed.

Tests

  • New SQLite unit test and PostgreSQL test 75_changes_visibility.sql, covering visible and non-visible rows.
  • make unittest: all OK.
  • Standalone PostgreSQL suite: 625 PASS, 0 failures.

🤖 Generated with Claude Code

@andinux
andinux merged commit 4beeade into main Nov 5, 2026
76 checks passed
@andinux
andinux deleted the fix/changes-visibility branch November 24, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant