---
title: "Supabase upstream issues"
description: "The Supabase issues and pull requests PermDock depends on, the workaround each one needs in this repository, and what to remove when it ships."
source: "https://permdock.com/docs/adapters/supabase-upstream"
---

# Supabase upstream issues

Source: https://permdock.com/docs/adapters/supabase-upstream

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](/docs/standards/watch-list), not here.

## How to use this page [#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 [#supabasepg-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](https://github.com/supabase/pg-toolbelt/pull/581), open since 18 Nov 2026, lists pg-topo 1.0.0-alpha.9 and pg-delta 1.0.0-alpha.62, and [#692](https://github.com/supabase/pg-toolbelt/issues/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](https://github.com/ScaleDockHQ/permdock/blob/main/docs/decisions/0079-better-supabase-0-85-0-floor-and-release-age.md) also asks for the example's BS721 and BS722 ignores to go.

| Upstream issue | What it blocks | Our workaround (path) | Remove or change when fixed | Status |
| --- | --- | --- | --- | --- |
| [#595](https://github.com/supabase/pg-toolbelt/issues/595) | `grant ... on all tables in schema app` in a schema file, which pg-topo reads as a dependency on table `public.app` | PD095 reports `grant on all` (`packages/permdock/src/cli/doctor/schema-checks.ts`) | Allow `grant on all` in PD095 once this and #689 are released | fixed on main ([#680](https://github.com/supabase/pg-toolbelt/pull/680)), not released |
| [#491](https://github.com/supabase/pg-toolbelt/issues/491) | Column-level grants such as those `--revoke-columns` writes: an object-level `revoke all` wiped them | None needed: the pg-delta peer floor includes the fix | Delete this row at the next review | released in pg-delta 1.0.0-alpha.61 |
| [#596](https://github.com/supabase/pg-toolbelt/issues/596) | Built-in types such as `xid8` and `jsonpath` resolve to nothing | PD125 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 released | open |
| [#597](https://github.com/supabase/pg-toolbelt/issues/597) | Unqualified built-in calls such as `now()` resolve to `public` | The same `unresolvedTables` filter | As for #596 | open |
| [#598](https://github.com/supabase/pg-toolbelt/issues/598) | Repeated `create schema if not exists` is a duplicate producer | `allRepeatable` in `packages/permdock/src/cli/doctor/pg-topo.ts` | Remove `allRepeatable` and `repeatable` | open |
| [#599](https://github.com/supabase/pg-toolbelt/issues/599) | File names and line numbers in diagnostics | `fileOf` maps `<input:N>` back to a path (`packages/permdock/src/cli/doctor/pg-topo.ts`) | Pass named inputs and remove `fileOf` | open |
| [#600](https://github.com/supabase/pg-toolbelt/issues/600) | Reading diagnostic data from structured fields instead of `message` | None: PD125 copies a cycle's `message` into its finding | Build the PD125 message from the structured fields | open |
| [#601](https://github.com/supabase/pg-toolbelt/issues/601) | A Supabase preset for `auth`, `storage` and the other platform schemas | The same `unresolvedTables` filter | As for #596 | open |
| [#602](https://github.com/supabase/pg-toolbelt/issues/602) | One libpg_query build per install: pg-topo brings its own parser next to the `pgsql-parser` the CLI pins | None | Revisit the parser pins of [decision 0077](https://github.com/ScaleDockHQ/permdock/blob/main/docs/decisions/0077-cli-parsers-as-dependencies.md) | open |
| [#603](https://github.com/supabase/pg-toolbelt/issues/603) | Checking a plan against a template copy of the live database | None: `rls verify --shadow` uses pg-delta's `provisionCoLocatedShadow` | Consider a proof target for `rls verify --shadow` | open |
| [#604](https://github.com/supabase/pg-toolbelt/issues/604) | Listing exactly the diagnostics that block a load | `rls verify --shadow` prints the `error` diagnostics (`packages/permdock/src/cli/rls/verify-shadow.ts`) | Filter with `isBlockingDiagnostic` and raise the pg-delta peer floor | fixed on main ([#608](https://github.com/supabase/pg-toolbelt/pull/608)), not released after 1.0.0-alpha.61 |
| [#605](https://github.com/supabase/pg-toolbelt/issues/605) | `pnpm add @supabase/pg-delta` installs `0.0.0` | Peer 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 both | Nothing to remove; the upper bound lifts at 1.0.0 | open |
| [#609](https://github.com/supabase/pg-toolbelt/issues/609) | A column `%type` in a function signature | `apps/examples/next-better-supabase/better-supabase.config.ts` ignores BS721 | Remove BS721 from the example's ignore list | fixed on main ([#679](https://github.com/supabase/pg-toolbelt/pull/679)), not released |
| [#610](https://github.com/supabase/pg-toolbelt/issues/610) | Overloads that differ by an array parameter share one key, so PD125 sees a duplicate or a cycle | `distinctOverloads` and `overloadsOnly` in `packages/permdock/src/cli/doctor/pg-topo.ts`; the example ignores BS722 and BS723 | Remove both functions and the example's ignores, and raise the pg-topo peer floor | fixed on main ([#613](https://github.com/supabase/pg-toolbelt/pull/613)), not released |
| [#630](https://github.com/supabase/pg-toolbelt/issues/630) | Every schema apply on Supabase plans `grant execute on functions to public` as a default privilege | None needed: `rls verify --shadow` reports only objects `rls generate` writes | Nothing to remove | open (reopened 30 Nov 2026; [#686](https://github.com/supabase/pg-toolbelt/pull/686) open) |
| [#658](https://github.com/supabase/pg-toolbelt/issues/658) | A `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](https://github.com/supabase/pg-toolbelt/issues/658#issuecomment-7307248095)) | 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 again | open |
| [#661](https://github.com/supabase/pg-toolbelt/issues/661) | Source order past ten inputs: `<input:10>` sorts before `<input:2>` | None | Nothing to remove | open |
| [#663](https://github.com/supabase/pg-toolbelt/issues/663) | Calls whose argument types are not literals resolve to nothing | The same `unresolvedTables` filter | As for #596 | open |
| [#666](https://github.com/supabase/pg-toolbelt/issues/666) | Postgres 18 syntax; one bad statement drops its whole input from PD125 | None | Nothing to remove | open |
| [#689](https://github.com/supabase/pg-toolbelt/issues/689) | `grant ... on all functions in schema` can sort after a per-object `revoke` and re-open the object | PD095 reports `grant on all` (`packages/permdock/src/cli/doctor/schema-checks.ts`) | As for #595 | open |
| [#690](https://github.com/supabase/pg-toolbelt/issues/690) | A self-recursive function's call to itself is an unresolved dependency | The same `unresolvedTables` filter | As for #596 | open |
| [#691](https://github.com/supabase/pg-toolbelt/issues/691) | Reading the installed pg-topo and pg-delta version: neither exports `./package.json` | The resolved copy is not checked against the peer range (`packages/permdock/src/cli/shared/app-peer.ts`) | Check the version against the peer range | open |
| [#692](https://github.com/supabase/pg-toolbelt/issues/692) | Releases of the fixes merged since pg-topo 1.0.0-alpha.8 and pg-delta 1.0.0-alpha.61 | The rows marked fixed on main | Raise the peer floors to the release that ships them | open |
| [#694](https://github.com/supabase/pg-toolbelt/issues/694) | Schema apply and `planSchemaFiles` load two statements that create one object, although pg-topo reports `DUPLICATE_PRODUCER` | PD125 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 sync | open |
| [#668](https://github.com/supabase/pg-toolbelt/issues/668) | A primary key and a unique index on the same columns are reported as duplicates | None; PD125 can report it | Nothing to remove | open |

## supabase-community/pg-parser [#supabase-communitypg-parser]

The CLI parses SQL with `pgsql-parser` 18.4.2 and `libpg-query` 18.2.4 ([decision 0077](https://github.com/ScaleDockHQ/permdock/blob/main/docs/decisions/0077-cli-parsers-as-dependencies.md)). `@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 issue | What it blocks | Our workaround (path) | Remove or change when fixed | Status |
| --- | --- | --- | --- | --- |
| [#36](https://github.com/supabase-community/pg-parser/issues/36) | Postgres 18 syntax | The CLI parses with `pgsql-parser` 18.4.2; the agreement test covers 15, 16 and 17 | Add 18 to the agreement test | open |
| [#37](https://github.com/supabase-community/pg-parser/issues/37) | Parsing PL/pgSQL function bodies | None | Nothing to remove | open |
| [#38](https://github.com/supabase-community/pg-parser/issues/38) | Synchronous parse, scan and deparse | None; the CLI awaits `pgsql-parser` | Nothing to remove | open |
| [#39](https://github.com/supabase-community/pg-parser/issues/39) | Split, fingerprint, normalize and summary | `fingerprintSql` 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 fingerprints | open |
| [#40](https://github.com/supabase-community/pg-parser/issues/40) | A node schema, a walker and exported type guards | The readers in `packages/permdock/src/cli/sql/ast.ts` walk the tree by hand | Use the walker and guards when the CLI moves | open |
| [#41](https://github.com/supabase-community/pg-parser/issues/41) | Pretty deparse and comment preservation | `pgsql-parser` `deparse` | Move the `deparse` callers when the CLI moves | open |
| [#43](https://github.com/supabase-community/pg-parser/issues/43) | JavaScript string indices: positions are UTF-8 byte offsets | `charIndex` in `packages/permdock/src/cli/sql/ast.ts`, which `pgsql-parser` and `libpg-query` offsets also need | Remove `charIndex` only if the CLI moves to `@supabase/pg-parser` | open |

## supabase/supabase-js [#supabasesupabase-js]

| Upstream issue | What it blocks | Our workaround (path) | Remove or change when fixed | Status |
| --- | --- | --- | --- | --- |
| [#2897](https://github.com/supabase/supabase-js/issues/2897) | Typing against `RealtimeClient` and `RealtimeChannel`, which are classes with private members | Structural types `RealtimeRefreshChannel` and `RealtimeRefreshClient` (`packages/permdock/src/supabase/client.ts`), `NativeRefreshSupabase` (`packages/permdock/src/react-native/native-refresh.ts`) | Replace them with the exported interfaces | open |
| [#2902](https://github.com/supabase/supabase-js/issues/2902) | One `postgrest-js` copy per app: exact sub-package pins install two | Structural `SupabaseRpcClient` and `SupabaseRpcCaller` (`packages/permdock/src/supabase/postgrest.ts`) | Revisit the structural types together with the client interface row | open |
| [#2949](https://github.com/supabase/supabase-js/issues/2949) | A structural `SupabaseClient` interface that every copy and test double satisfies | The structural types of #2897 and #2902 | Import the published interface | open |
| [#2974](https://github.com/supabase/supabase-js/issues/2974) | Type-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/node` | `scripts/check-entry-types.ts` reports errors inside other packages' declarations without failing | Drop the known-error entry once [PR #2629](https://github.com/supabase/supabase-js/pull/2629) ships in a release | open; TS2430 fix in PR #2629 |

## supabase/server [#supabaseserver]

| Upstream issue | What it blocks | Our workaround (path) | Remove or change when fixed | Status |
| --- | --- | --- | --- | --- |
| [#146](https://github.com/supabase/server/pull/146) (pull request) | `@supabase/server/mcp`, the base of the planned MCP recipe | None; nothing is built against the alpha ([roadmap](/docs/roadmap)) | Build the recipe once it ships in a release | open draft with merge conflicts, no update since 10 Sep 2026; not in 1.9.2 |
| [#200](https://github.com/supabase/server/issues/200) | `withClaims` in front of `withPermDock` on a stack that signs HS256 tokens without `kid`, such as Supabase Lite or a self-hosted shared secret | None | Nothing to remove | open |
| [#212](https://github.com/supabase/server/issues/212) | A `JWTClaims` with the claims Supabase Auth issues and a type parameter | Structural `SupabaseJwtClaims` restates the shape (`packages/permdock/src/supabase/middleware.ts`) | Import the upstream type once a package the entry depends on exports it | open |

## supabase/middleware [#supabasemiddleware]

| Upstream issue | What it blocks | Our workaround (path) | Remove or change when fixed | Status |
| --- | --- | --- | --- | --- |
| [#53](https://github.com/supabase/middleware/issues/53) | Background work after the response on Workers: entries get no `ExecutionContext` | The app passes `waitUntil` to `createPermDock` (`packages/permdock/src/supabase/middleware.ts`) | Read `waitUntil` from the context | open; fix in [PR #65](https://github.com/supabase/middleware/pull/65) |
| [#64](https://github.com/supabase/middleware/issues/64) | Declaring `authMode` and `authKeyName` as optional prerequisites | `secretKeySubject` reads them with `Reflect.get` (`packages/permdock/src/supabase/middleware.ts`) | Declare them and remove `readString` | open |
| [#62](https://github.com/supabase/middleware/issues/62) | A published Hono bridge in place of the removed `@supabase/server` framework adapters | Copies of the bridge in `apps/examples/supabase-middleware/src/to-hono.ts` and `tests/integration/src/support/to-hono.ts` | Import the bridge and update the [Supabase page](/docs/adapters/supabase) | open |

## supabase/realtime [#supabaserealtime]

`rls.realtime` writes `realtime.messages` policies for private channels ([Realtime and Storage](/docs/cli/rls#realtime-channels-and-storage-buckets)). Realtime's `policy_eval` decides some policies in process and sends the rest to the database on each join.

| Upstream issue | What it blocks | Our workaround (path) | Remove or change when fixed | Status |
| --- | --- | --- | --- | --- |
| [#2690](https://github.com/supabase/realtime/issues/2690) | Knowing which policy shapes `policy_eval` decides in process, and whether a project's join falls back to the database | None; the generated policies call the SQL helpers, and whether `policy_eval` models those calls is not documented | Document which generated `realtime.messages` policies `policy_eval` decides in process | open |

## supabase/splinter [#supabasesplinter]

`tests/integration` runs Splinter 2026.11.0 on the generated SQL ([Postgres RLS](/docs/standards/postgres-rls#splinter-supautils-and-pg_jsonschema)).

| Upstream issue | What it blocks | Our workaround (path) | Remove or change when fixed | Status |
| --- | --- | --- | --- | --- |
| [#181](https://github.com/supabase/splinter/issues/181) | Running 0025 without the `setup` preamble: it then reports nothing | `runSplinter` runs `setup` and the lints in one transaction (`tests/integration/src/support/splinter.ts`) | Nothing to remove; keep one transaction | open |
| [#218](https://github.com/supabase/splinter/issues/218) | Suppressing an accepted finding inline instead of filtering by `cache_key` | The `allow` map of `generatedFindings` (`tests/integration/src/support/splinter.ts`) | Replace `allow` with the `splinter.ignore` setting | open; fix in [PR #219](https://github.com/supabase/splinter/pull/219), which filters by exact `cache_key` |
| [#185](https://github.com/supabase/splinter/issues/185) | 0028 and 0029 for a custom PostgREST request role: they report nothing | None; PD049 reads migrations and does not depend on the request role | Nothing to remove | open |

## supabase/auth [#supabaseauth]

| Upstream issue | What it blocks | Our workaround (path) | Remove or change when fixed | Status |
| --- | --- | --- | --- | --- |
| [#2610](https://github.com/supabase/auth/issues/2610) | Access tokens bound to an MCP resource: Supabase Auth stamps `aud: "authenticated"` and ignores `resource` ([our comment](https://github.com/supabase/auth/issues/2610#issuecomment-7307075247)) | None | Update the Supabase Auth bullet on the [MCP page](/docs/adapters/mcp) | open |
| [#2944](https://github.com/supabase/auth/issues/2944) | Mix-up protection for MCP clients: Supabase Auth sends no `iss` in the authorization response | None | Nothing to remove | open |
| [#2971](https://github.com/supabase/auth/issues/2971) | More than one custom access token hook | `supabase.hook.before` runs other checks inside PermDock's hook ([Checks before the hook](/docs/adapters/supabase-hook#checks-before-the-hook)) | Consider a separate hook per package and keep `hook.before` for checks that must run first | open |
| [#2977](https://github.com/supabase/auth/issues/2977) | Custom 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 token | One policy delegation sets the ceiling for clients that ask only for OpenID Connect scopes ([OIDC-only OAuth clients](/docs/adapters/supabase#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 them | open |
| [#2978](https://github.com/supabase/auth/issues/2978) | Token exchange (RFC 8693): a short-lived token for a user with an `act` claim and a narrowed `scope`, for agents, jobs and workflow steps | `subjectFromSupabase` reads `act` only from tokens that better-supabase's `agentClaims` or a support session signs (`packages/permdock/src/supabase/subject.ts`); Supabase Auth issues none | Read the `act` and `scope` of exchanged tokens and add them to `supabaseClaimVectors` | open |

## supabase/pg_jsonschema [#supabasepg_jsonschema]

| Upstream issue | What it blocks | Our workaround (path) | Remove or change when fixed | Status |
| --- | --- | --- | --- | --- |
| [#112](https://github.com/supabase/pg_jsonschema/issues/112) | A release of the compiled schema type and validator cache merged after v0.3.4 | `supabase.hook.validate` is off by default because the check compiles the schema on every token ([Claim validation](/docs/adapters/supabase-hook#claim-validation)) | Move to `jsonb_matches_compiled_schema` once a Supabase Postgres release ships it, and reconsider the default | open |
