Skip to content

[Hackathon] Backend runner cannot reach Supabase Auth (/auth/v1/) - REST endpoints work, GoTrue blocked #173

Closed as not planned

Description

@lxcario

Discord Username / User ID

resquwue

What does this improvement do?

Backend tests that call Supabase */auth/v1/* endpoints (GoTrue) consistently fail on the TestSprite cloud runner, while tests hitting */rest/v1/* (PostgREST) pass on the same runner in the same project.

Reproduction

Project: Nora (Next.js + Supabase) - 5 backend Python tests, same Supabase instance:

Test Endpoint Runner result
test_rls_security.py /rest/v1/profiles\ PASS
test_supabase_schema.py /rest/v1/\ (information_schema) PASS
test_rls_cards_topics.py /rest/v1/cards, /rest/v1/topics\ PASS
test_rls_data_isolation.py /rest/v1/feynman_sessions\ PASS
test_auth_flow.py /auth/v1/signup, /auth/v1/token\ FAIL

All 5 use the same \SUPABASE_URL\ and \SUPABASE_ANON_KEY. The only difference is the path prefix.

Locally, all 5 pass. On the runner, only the auth test fails.

Expected behavior

If the runner can reach \https://.supabase.co/rest/v1/, it should also reach \https://.supabase.co/auth/v1/\ - they resolve to the same host, just different services behind the Supabase API gateway.

Likely root cause

  1. The runner's egress allowlist permits PostgREST paths but not GoTrue paths, OR
  2. Supabase's GoTrue service rate-limits or blocks the runner's IP range (separate from PostgREST), OR
  3. The runner environment strips/blocks specific headers that GoTrue requires (e.g., \Content-Type: application/json\ on POST to /auth/v1/signup)

Impact

Users who want backend tests for auth flows (signup validation, password policy, token refresh, MFA) cannot use --type backend\ for those scenarios - they must either skip auth testing or mock it.

Workaround

Test auth indirectly via RLS: if the anon key can't read protected tables, auth is implicitly working. But direct auth endpoint testing (signup with invalid email returns 422, etc.) is not possible.

Details / implementation notes

Discovered during Nora's hackathon loop (LOOP.md iteration 40). The test file is at .testsprite/test_auth_flow.py\ in the Nora repo. Filed for documentation and potential runner-side fix.

Confirmations

  • I have searched existing issues and this is not a duplicate.
  • I have provided my Discord identity above for reward coordination.

Activity

  1. lxcario commented on Jul 4, 2026

    @lxcario
    ContributorAuthor

    Requesting the hackathon + needs-triage labels per the CLI Improvement Bonus flow - I'm an external contributor so I can't self-label. Discord: resquwue

  2. reopened this on Jul 4, 2026
  3. zeshi-du commented on Jul 6, 2026

    @zeshi-du
    Contributor

    Confirmed and triaged: this is runner-side (the CLI just relays the sandbox result), and the REST-passes/GoTrue-fails split on the same host is a genuinely useful signal. It's now tracked on our internal board for the backend-runner team. If you can drop the failing run IDs here it'll speed up the reproduction — the first thing we'll pull is the actual error the sandbox saw (status vs timeout) on POST /auth/v1/signup.

  4. zeshi-du commented on Aug 13, 2026

    @zeshi-du
    Contributor

    Following up, five weeks late — sorry.

    Where this lands: the CLI only relays what the execution sandbox reports. Whether a specific upstream is reachable from the runner — Supabase's GoTrue /auth/v1/ succeeding or failing while its REST endpoints work — is platform-side egress behaviour, and VISION.md draws that line explicitly: requests to change how tests run belong with product support rather than this repo.

    That doesn't make it not-a-bug; it makes it not-a-CLI-bug. To route it somewhere it can actually be fixed I still need the run IDs from the failing runs (I asked on 2026-07-06). With those, support can trace the real egress path and whether GoTrue was blocked, rate-limited, or failing for another reason.

    I'll leave this open for two weeks. If the run IDs turn up I'll route it internally and say so here; otherwise I'll close it as un-actionable — reopen any time with the IDs and I'll pick it straight back up.

  5. zeshi-du commented on Aug 19, 2026

    @zeshi-du
    Contributor

    @lxcario — quick status check-in, not a close. The two-week window I mentioned on 2026-08-13 runs to 2026-08-27, and we're not there yet.

    Nothing's changed on the diagnosis: this is runner-side egress behavior, not a CLI bug, so I can't fix it here myself — but I also can't hand it to the team that can without something to reproduce against.

    Either one of these keeps it open and moving:

    1. Run IDs for the failing test_auth_flow.py executions — the original ones, or any newer ones. This is what I asked for on 2026-07-06 and still don't have.
    2. Failing that, the actual status code or timeout the sandbox reported for the POST /auth/v1/signup / /auth/v1/token calls specifically (not the REST calls — those already pass). Even "timed out after Ns" vs "got a 4xx/5xx" narrows this a lot.

    Either one, dropped here before 2026-08-27, and I'll route it to the backend-runner side and say so in this thread. Without it, I'll close as un-actionable per the earlier comment — reopening with the IDs works any time after that, so nothing is permanently lost, but let's not need to.

  6. zeshi-du commented on Sep 16, 2026

    @zeshi-du
    Contributor

    Closing this as not-planned, because we can't act on it as it stands — but the door is open.

    On 2026-08-27 we asked for a runId and the HTTP status code the GoTrue endpoint returned, which is what we'd need to tell apart the plausible causes here (egress policy vs. an auth-path redirect vs. the runner's own header handling). There was no response, and without either of those we'd be guessing at a fix.

    Please reopen — or open a fresh issue, whichever is easier — with a runId and the status code, and we'll pick it straight back up. The report itself is credible; "REST works, /auth/v1/ doesn't" is a specific enough signature that it's worth chasing with real data attached.

    Tracked internally as DEV-333, which stays open regardless of this issue's state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions