Skip to content

feat(database): RLS scaffolder + connection pool tuning#360

Draft
ditadi wants to merge 4 commits into
stack/database/uifrom
stack/database/advanced
Draft

feat(database): RLS scaffolder + connection pool tuning#360
ditadi wants to merge 4 commits into
stack/database/uifrom
stack/database/advanced

Conversation

@ditadi
Copy link
Copy Markdown
Contributor

@ditadi ditadi commented May 6, 2026

🥞 Stacked PR

Use this link to review incremental changes.


Summary

Advanced multi-tenant primitives:

  • appkit db rls <entity> <spec> to scaffold Postgres RLS policies (FORCE RLS, journal-aware, multi-verb, owner_email shorthand, dry-run)
  • Emits current_user_id / current_tenant_id helpers on first scaffold
  • Tunable rls.sessionVariable (default app.user_id)
  • Re-balanced pool defaults: raise oboPoolMax to 100, drop per-user pool max to 2 (more users, same fan-out)

Stack (7/8)

  1. #354 foundation
  2. #355 server
  3. #356 brownfield
  4. #357 init
  5. #358 frontend
  6. #359 ui
  7. advanced ← this PR
  8. release

Test plan

  • biome check
  • typecheck
  • vitest (rls scaffolder tests pass)

@ditadi ditadi force-pushed the stack/database/ui branch from a6fa66d to ccf9f70 Compare May 6, 2026 23:21
@ditadi ditadi force-pushed the stack/database/advanced branch 2 times, most recently from 632baf7 to ce1bc25 Compare May 6, 2026 23:51
@ditadi ditadi force-pushed the stack/database/ui branch 2 times, most recently from e07bd1c to b661aa1 Compare May 6, 2026 23:54
@ditadi ditadi force-pushed the stack/database/advanced branch from ce1bc25 to 27e63d1 Compare May 6, 2026 23:54
@ditadi ditadi force-pushed the stack/database/ui branch from b661aa1 to bf69cb4 Compare May 7, 2026 00:07
@ditadi ditadi force-pushed the stack/database/advanced branch from 27e63d1 to ae63b94 Compare May 7, 2026 00:07
@ditadi ditadi force-pushed the stack/database/ui branch from bf69cb4 to 782b1da Compare May 7, 2026 00:47
@ditadi ditadi force-pushed the stack/database/advanced branch 2 times, most recently from 4073a3f to 6c8c9a3 Compare May 7, 2026 01:28
@ditadi ditadi force-pushed the stack/database/ui branch from 782b1da to eeaaacc Compare May 7, 2026 01:28
@ditadi ditadi force-pushed the stack/database/ui branch from eeaaacc to e14eab7 Compare May 15, 2026 11:03
@ditadi ditadi force-pushed the stack/database/advanced branch from 6c8c9a3 to c02fb8f Compare May 15, 2026 11:03
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