PermDock
Adapters

Supabase upstream issues

The Supabase issues and pull requests PermDock depends on, the workaround each one needs in this repository, and what to remove when it ships.

PermDock works around gaps in Supabase packages it builds on: pg-topo and pg-delta for the declarative schema checks, pg-parser for SQL parsing, supabase-js, @supabase/server and @supabase/middleware for the Supabase adapter, Realtime for the generated realtime.messages policies, Splinter for the advisor lints, pg_jsonschema for claim validation, and Supabase Auth for the token hook and as an OAuth server. Each table lists one upstream repository. Specifications PermDock follows are on the standards watch list, not here.

How to use this page

Check the Status column of every row for a package when you upgrade it, and read the release notes against the issues listed here. When a fix ships, remove the workaround in the same pull request as the upgrade, then update the row's status or delete the row. Each workaround site in the code carries a comment that names its issue, so git grep 'pg-toolbelt#610' finds every line to change. Statuses were last checked on 1 Dec 2026.

supabase/pg-toolbelt

pg-topo orders the declarative schema directory for doctor PD125, and pg-delta loads it for rls verify --shadow. The latest releases are pg-topo 1.0.0-alpha.8 (6 Oct 2026) and pg-delta 1.0.0-alpha.61 (16 Nov 2026). Release pull request #581, open since 18 Nov 2026, lists pg-topo 1.0.0-alpha.9 and pg-delta 1.0.0-alpha.62, and #692 asks for it to be published. When it ships, raise the peer floors in pnpm-workspace.yaml and work through the rows marked fixed on main; decision 0079 also asks for the example's BS721 and BS722 ignores to go.

Upstream issueWhat it blocksOur workaround (path)Remove or change when fixedStatus
#595grant ... on all tables in schema app in a schema file, which pg-topo reads as a dependency on table public.appPD095 reports grant on all (packages/permdock/src/cli/doctor/schema-checks.ts)Allow grant on all in PD095 once this and #689 are releasedfixed on main (#680), not released
#491Column-level grants such as those --revoke-columns writes: an object-level revoke all wiped themNone needed: the pg-delta peer floor includes the fixDelete this row at the next reviewreleased in pg-delta 1.0.0-alpha.61
#596Built-in types such as xid8 and jsonpath resolve to nothingPD125 reports only unresolved tables that rls.tables names (unresolvedTables in packages/permdock/src/cli/doctor/pg-topo.ts)Consider reporting every unresolved reference once #596, #597, #601, #663 and #690 are releasedopen
#597Unqualified built-in calls such as now() resolve to publicThe same unresolvedTables filterAs for #596open
#598Repeated create schema if not exists is a duplicate producerallRepeatable in packages/permdock/src/cli/doctor/pg-topo.tsRemove allRepeatable and repeatableopen
#599File names and line numbers in diagnosticsfileOf maps <input:N> back to a path (packages/permdock/src/cli/doctor/pg-topo.ts)Pass named inputs and remove fileOfopen
#600Reading diagnostic data from structured fields instead of messageNone: PD125 copies a cycle's message into its findingBuild the PD125 message from the structured fieldsopen
#601A Supabase preset for auth, storage and the other platform schemasThe same unresolvedTables filterAs for #596open
#602One libpg_query build per install: pg-topo brings its own parser next to the pgsql-parser the CLI pinsNoneRevisit the parser pins of decision 0077open
#603Checking a plan against a template copy of the live databaseNone: rls verify --shadow uses pg-delta's provisionCoLocatedShadowConsider a proof target for rls verify --shadowopen
#604Listing exactly the diagnostics that block a loadrls verify --shadow prints the error diagnostics (packages/permdock/src/cli/rls/verify-shadow.ts)Filter with isBlockingDiagnostic and raise the pg-delta peer floorfixed on main (#608), not released after 1.0.0-alpha.61
#605pnpm add @supabase/pg-delta installs 0.0.0Peer ranges >=1.0.0-alpha.61 <1.0.0 and >=1.0.0-alpha.8 <1.0.0 in pnpm-workspace.yaml, and better-supabase pins bothNothing to remove; the upper bound lifts at 1.0.0open
#609A column %type in a function signatureapps/examples/next-better-supabase/better-supabase.config.ts ignores BS721Remove BS721 from the example's ignore listfixed on main (#679), not released
#610Overloads that differ by an array parameter share one key, so PD125 sees a duplicate or a cycledistinctOverloads and overloadsOnly in packages/permdock/src/cli/doctor/pg-topo.ts; the example ignores BS722 and BS723Remove both functions and the example's ignores, and raise the pg-topo peer floorfixed on main (#613), not released
#630Every schema apply on Supabase plans grant execute on functions to public as a default privilegeNone needed: rls verify --shadow reports only objects rls generate writesNothing to removeopen (reopened 30 Nov 2026; #686 open)
#658A do block that creates objects runs before the tables it touches, and the supabase_auth_admin grant guard sorts before the function it grants on (our comment)PD095 reports a do block whose body contains create (packages/permdock/src/cli/doctor/schema-checks.ts); unguardAuthAdminGrants writes the guarded grants as plain grants in a split helpers file (packages/permdock/src/cli/rls/helper-members.ts)Drop that shape from PD095, and consider writing the guarded grants in declarative files againopen
#661Source order past ten inputs: <input:10> sorts before <input:2>NoneNothing to removeopen
#663Calls whose argument types are not literals resolve to nothingThe same unresolvedTables filterAs for #596open
#666Postgres 18 syntax; one bad statement drops its whole input from PD125NoneNothing to removeopen
#689grant ... on all functions in schema can sort after a per-object revoke and re-open the objectPD095 reports grant on all (packages/permdock/src/cli/doctor/schema-checks.ts)As for #595open
#690A self-recursive function's call to itself is an unresolved dependencyThe same unresolvedTables filterAs for #596open
#691Reading the installed pg-topo and pg-delta version: neither exports ./package.jsonThe resolved copy is not checked against the peer range (packages/permdock/src/cli/shared/app-peer.ts)Check the version against the peer rangeopen
#692Releases of the fixes merged since pg-topo 1.0.0-alpha.8 and pg-delta 1.0.0-alpha.61The rows marked fixed on mainRaise the peer floors to the release that ships themopen
#694Schema apply and planSchemaFiles load two statements that create one object, although pg-topo reports DUPLICATE_PRODUCERPD125 duplicates (duplicates in packages/permdock/src/cli/doctor/pg-topo.ts); PD095 duplicate signatures (packages/permdock/src/cli/doctor/schema-checks.ts) and exported duplicates (packages/permdock/src/cli/doctor/exported-duplicates.ts)Nothing to remove; the checks still report a duplicate before a syncopen
#668A primary key and a unique index on the same columns are reported as duplicatesNone; PD125 can report itNothing to removeopen

supabase-community/pg-parser

The CLI parses SQL with pgsql-parser 18.4.2 and libpg-query 18.2.4 (decision 0077). @supabase/pg-parser 0.1.7 runs only in packages/permdock/tests/cli/sql-pg-parser-agreement.test.ts, which parses the generated SQL with Postgres 15, 16 and 17. The rows below are what moving the CLI to @supabase/pg-parser would need.

Upstream issueWhat it blocksOur workaround (path)Remove or change when fixedStatus
#36Postgres 18 syntaxThe CLI parses with pgsql-parser 18.4.2; the agreement test covers 15, 16 and 17Add 18 to the agreement testopen
#37Parsing PL/pgSQL function bodiesNoneNothing to removeopen
#38Synchronous parse, scan and deparseNone; the CLI awaits pgsql-parserNothing to removeopen
#39Split, fingerprint, normalize and summaryfingerprintSql hashes a deparse (packages/permdock/src/cli/rls/import-nodes.ts); parseSqlStatements splits a rejected file on ; (packages/permdock/src/cli/sql/ast.ts)Consider the upstream functions when the CLI moves; a new fingerprint changes the stored import fingerprintsopen
#40A node schema, a walker and exported type guardsThe readers in packages/permdock/src/cli/sql/ast.ts walk the tree by handUse the walker and guards when the CLI movesopen
#41Pretty deparse and comment preservationpgsql-parser deparseMove the deparse callers when the CLI movesopen
#43JavaScript string indices: positions are UTF-8 byte offsetscharIndex in packages/permdock/src/cli/sql/ast.ts, which pgsql-parser and libpg-query offsets also needRemove charIndex only if the CLI moves to @supabase/pg-parseropen

supabase/supabase-js

Upstream issueWhat it blocksOur workaround (path)Remove or change when fixedStatus
#2897Typing against RealtimeClient and RealtimeChannel, which are classes with private membersStructural types RealtimeRefreshChannel and RealtimeRefreshClient (packages/permdock/src/supabase/client.ts), NativeRefreshSupabase (packages/permdock/src/react-native/native-refresh.ts)Replace them with the exported interfacesopen
#2902One postgrest-js copy per app: exact sub-package pins install twoStructural SupabaseRpcClient and SupabaseRpcCaller (packages/permdock/src/supabase/postgrest.ts)Revisit the structural types together with the client interface rowopen
#2949A structural SupabaseClient interface that every copy and test double satisfiesThe structural types of #2897 and #2902Import the published interfaceopen
#2974Type-checking a consumer with skipLibCheck: false: auth-js's webauthn.dom.d.ts fails with TS2430 on TypeScript 6 and 7, and the declarations need both the DOM lib and @types/nodescripts/check-entry-types.ts reports errors inside other packages' declarations without failingDrop the known-error entry once PR #2629 ships in a releaseopen; TS2430 fix in PR #2629

supabase/server

Upstream issueWhat it blocksOur workaround (path)Remove or change when fixedStatus
#146 (pull request)@supabase/server/mcp, the base of the planned MCP recipeNone; nothing is built against the alpha (roadmap)Build the recipe once it ships in a releaseopen draft with merge conflicts, no update since 10 Sep 2026; not in 1.9.2
#200withClaims in front of withPermDock on a stack that signs HS256 tokens without kid, such as Supabase Lite or a self-hosted shared secretNoneNothing to removeopen
#212A JWTClaims with the claims Supabase Auth issues and a type parameterStructural SupabaseJwtClaims restates the shape (packages/permdock/src/supabase/middleware.ts)Import the upstream type once a package the entry depends on exports itopen

supabase/middleware

Upstream issueWhat it blocksOur workaround (path)Remove or change when fixedStatus
#53Background work after the response on Workers: entries get no ExecutionContextThe app passes waitUntil to createPermDock (packages/permdock/src/supabase/middleware.ts)Read waitUntil from the contextopen; fix in PR #65
#64Declaring authMode and authKeyName as optional prerequisitessecretKeySubject reads them with Reflect.get (packages/permdock/src/supabase/middleware.ts)Declare them and remove readStringopen
#62A published Hono bridge in place of the removed @supabase/server framework adaptersCopies of the bridge in apps/examples/supabase-middleware/src/to-hono.ts and tests/integration/src/support/to-hono.tsImport the bridge and update the Supabase pageopen

supabase/realtime

rls.realtime writes realtime.messages policies for private channels (Realtime and Storage). Realtime's policy_eval decides some policies in process and sends the rest to the database on each join.

Upstream issueWhat it blocksOur workaround (path)Remove or change when fixedStatus
#2690Knowing which policy shapes policy_eval decides in process, and whether a project's join falls back to the databaseNone; the generated policies call the SQL helpers, and whether policy_eval models those calls is not documentedDocument which generated realtime.messages policies policy_eval decides in processopen

supabase/splinter

tests/integration runs Splinter 2026.11.0 on the generated SQL (Postgres RLS).

Upstream issueWhat it blocksOur workaround (path)Remove or change when fixedStatus
#181Running 0025 without the setup preamble: it then reports nothingrunSplinter runs setup and the lints in one transaction (tests/integration/src/support/splinter.ts)Nothing to remove; keep one transactionopen
#218Suppressing an accepted finding inline instead of filtering by cache_keyThe allow map of generatedFindings (tests/integration/src/support/splinter.ts)Replace allow with the splinter.ignore settingopen; fix in PR #219, which filters by exact cache_key
#1850028 and 0029 for a custom PostgREST request role: they report nothingNone; PD049 reads migrations and does not depend on the request roleNothing to removeopen

supabase/auth

Upstream issueWhat it blocksOur workaround (path)Remove or change when fixedStatus
#2610Access tokens bound to an MCP resource: Supabase Auth stamps aud: "authenticated" and ignores resource (our comment)NoneUpdate the Supabase Auth bullet on the MCP pageopen
#2944Mix-up protection for MCP clients: Supabase Auth sends no iss in the authorization responseNoneNothing to removeopen
#2971More than one custom access token hooksupabase.hook.before runs other checks inside PermDock's hook (Checks before the hook)Consider a separate hook per package and keep hook.before for checks that must run firstopen
#2977Custom scopes and the client_credentials grant on the OAuth 2.1 server: a client cannot request a permission's scope, and a machine client cannot get a tokenOne policy delegation sets the ceiling for clients that ask only for OpenID Connect scopes (OIDC-only OAuth clients); services authenticate with named secret keys (secretKeySubject, packages/permdock/src/supabase/middleware.ts)Publish the catalog's scopes as Supabase Auth scopes and drop the delegation ceiling for clients that request themopen
#2978Token exchange (RFC 8693): a short-lived token for a user with an act claim and a narrowed scope, for agents, jobs and workflow stepssubjectFromSupabase reads act only from tokens that better-supabase's agentClaims or a support session signs (packages/permdock/src/supabase/subject.ts); Supabase Auth issues noneRead the act and scope of exchanged tokens and add them to supabaseClaimVectorsopen

supabase/pg_jsonschema

Upstream issueWhat it blocksOur workaround (path)Remove or change when fixedStatus
#112A release of the compiled schema type and validator cache merged after v0.3.4supabase.hook.validate is off by default because the check compiles the schema on every token (Claim validation)Move to jsonb_matches_compiled_schema once a Supabase Postgres release ships it, and reconsider the defaultopen

Last updated on

On this page