chore(chore): capitalize step 3 — BDR-026..029, LRN-035/036, BLK-006, EVAL-006, journal, TODO
This commit is contained in:
1 parent
1e7d0327cc
commit
d5a5a720a1
6 files changed
+68
-2
No files matched your search
@@ -267,3 +267,17 @@ Apply: any "tests before migration" step on untested legacy code.
|
||||
`allowBuilds` key in pnpm-workspace.yaml = pnpm ≥10.14 syntax; 10.13.1 ignores it silently → "Ignored build scripts: @swc/core, esbuild" on every install. Fix: `onlyBuiltDependencies` list. Warning persists until `pnpm rebuild` (state cached in node_modules/.modules.yaml), then disappears.
|
||||
Also: root scripts calling `pnpm -r` fail under `corepack pnpm` (shim not on child PATH) → pin pnpm as root devDependency.
|
||||
Apply: any pnpm 10.x workspace; check `pnpm --version` vs key syntax before trusting a silent config.
|
||||
|
||||
---
|
||||
|
||||
## LRN-035 | 2026-10-08 | PGlite + pgtap = Dockerless Supabase RLS tests
|
||||
|
||||
`@electric-sql/pglite` 0.3 bundles `pgtap`, `pgcrypto`, `uuid_ossp` (`import { pgtap } from '@electric-sql/pglite/pgtap'`). Boot ~1s, `create extension pgtap with schema extensions` + `set search_path to public, extensions` (else pgTAP functions pollute `public` and break "list public functions" checks; filter `pg_depend deptype='e'` too). `db.exec(file)` runs multi-statement begin…rollback; collect string cells → TAP lines; fail on `/^not ok/` or `# Looks like`. After error: `rollback` to clear aborted tx. Impersonate: `set local role authenticated; set_config('request.jwt.claims', '{"sub":…}', true)`. `now()` frozen in tx → test updated_at by overwriting then `is(updated_at, now())`.
|
||||
Apply: any Supabase project needing SQL tests in CI without Docker.
|
||||
|
||||
---
|
||||
|
||||
## LRN-036 | 2026-10-08 | Supabase default privileges grant ALL to anon/authenticated on new public tables
|
||||
|
||||
Hosted/local Supabase: `alter default privileges … grant all on tables/functions to anon, authenticated, service_role`. New table or RPC = anon can SELECT/EXECUTE until revoked (RLS still filters rows, but RPC runs). Pattern per migration: `revoke all on <table> from public, anon, authenticated;` then exact grants (column-level for partial UPDATE); `revoke all on function … from public, anon`. Also Postgres default EXECUTE to PUBLIC on functions in own schemas → `alter default privileges in schema private revoke execute on functions from public`. Shim replicates defaults so pgTAP `has_table_privilege('anon',…)` catches omissions.
|
||||
Apply: every migration; pin with pgTAP privilege checks.
|
||||
Reference in new issue
Block a user