Skip to content

supabase-exec live-broken: canonical management token sees zero projects (muse-dev2 out of scope) #12986

Not planned

Description

@dezren39

Problem

~/tools/supabase-exec.py — the fleet-wide Supabase SQL helper — is correctly converted to the canonical Bitwarden pointers (found by the #2796 audit re-verification, 2026-11-23), but it fails live against muse-dev2:

  • The ref pointer supabase.muse-dev2.project-ref resolves correctly to the muse-dev2 ref.
  • The token it resolves, supabase.muse-dev2.access-token-muse-cli, authenticates against the Supabase Management API (GET /v1/projects → HTTP 200) but the project list is empty — the token sees zero projects.
  • Consequently POST /v1/projects/{ref}/database/query returns HTTP 404 "Resource has been removed" (the API's response for a project outside the token's visibility).

So the helper is silently broken for every consumer (e.g. pkgs/fleet/runtime-db-export/run_sql_pg.py and load_rows_pg.py shell out to it) — not by a hardcode, but because the management token's scope/account no longer covers muse-dev2. This is the same failure shape the 2026-10-30 cutover exposed (scoped token vs. project mismatch), one layer up.

Evidence (2026-11-23, Lane HB)

Fix (owner: Drew — Supabase account action)

Mint or re-scope a Supabase management token so it can see the muse-dev2 project in the account/org that owns it, and store it in BWS under the existing name supabase.muse-dev2.access-token-muse-cli (no code change needed — that is the point of the pointer design). Then re-run supabase-exec.py with a trivial read-only query and confirm HTTP 200 with result rows.

Acceptance

  • supabase-exec.py with select 1 returns HTTP 200 and rows against muse-dev2.
  • GET /v1/projects with the stored token lists the muse-dev2 project.

Found during: #2796 acceptance criterion 3 re-verification.

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Fresh confirmation — Lane SD (archer), 2026-11-23 ~05:15 CST, from the laptop: this gate is unchanged and is now the only blocker for code#2796's criterion-3 live leg. The supabase.muse-dev2.project-ref pointer resolves to the correct muse-dev2 ref (hash-matched); the canonical management token authenticates (GET /v1/projects → 200) but lists zero projects; the database/query endpoint for muse-dev2 answers 404 "Resource has been removed". The local blocker that previously masked this (supabase-exec.py hardcoding the sandbox-only ~/tools/bin/bws path) is fixed and merged (dezren39/hatch PR #23), so a token re-mint with muse-dev2 in scope is the single remaining step — after it, the select 1 probe on #2796 runs as-is. Full record: code#2796 comment 7099308471.

  3. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    Contributor

    Triage verdict — Lane ITEM-WORK-53 (archer), 2026-11-24 ~04:36 CST: NOT resolved; defect confirmed live today; the only fix is a Supabase account action by Drew.

    Fresh probe from the laptop just now (2026-11-24T10:36Z): the canonical token stored under the BWS name supabase.muse-dev2.access-token-muse-cli resolves and authenticates — GET https://api.supabase.com/v1/projects returns HTTP 200 with zero projects visible. Identical to the 2026-11-23 evidence: the helper, the pointers, and the code are all correct; the token's account scope simply does not cover the muse-dev2 project, so the database/query endpoint answers 404 "Resource has been removed".

    The fix (unchanged from the issue body, owner: Drew): in the Supabase account/org that owns muse-dev2, mint or re-scope a management token so it can see the muse-dev2 project, and store it in Bitwarden Secrets under the existing name supabase.muse-dev2.access-token-muse-cli. No code change is needed — that is the point of the pointer design. Then re-run supabase-exec.py with select 1 and confirm HTTP 200 with rows.

    Queue task 22273 (this triage) is parked to 2026-12-24 with a re-probe wake protocol: on wake, re-run the probe above — if the stored token lists muse-dev2, run the select 1 acceptance check and close this issue on that evidence; if it still lists zero projects, re-park 30 days. No follow-on packet is enqueued: any implementation packet would hit the same account wall instantly, and the parked task is itself the requeue vehicle.

  4. added
    stray-work
    epic/saas-service
    primary-parent/saas-service
    on Nov 27, 2026
  5. added
    priority/normal
    kind/bug
    on Nov 29, 2026
  6. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census note (Xaltha census lane CEN-C12, 2026-11-29) — cross-reference that changes the fix picture.

    This issue asks Drew to mint/re-scope the Supabase management token so it can see muse-dev2. But #13245 records live-probe evidence (2026-11-23) that the muse-dev2 project itself no longer exists (Management API: project removed; Supabase retired as a fleet platform after the Turso migration), and under #13245 the helper was retired to trash and all ten Bitwarden supabase.muse-dev2.* secrets were deleted.

    If the project is gone, there is nothing to re-scope a token for: the live decision is Drew confirming the disposition in #13245 (retire the tooling/pointers) versus recreating a project. The two issues should be resolved together; this one stays open on that owner decision. Census actions: added priority/normal and kind/bug (both were missing). Acceptance here is otherwise crisp and unchanged.

  7. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note · felix lane 0640-Y (2026-11-29) — CLOSE-OUT as superseded.

    This issue asks for a re-scoped Supabase management token so supabase-exec can see muse-dev2 again. That fix is moot, on evidence already gathered under #13245 (verified firsthand there 2026-11-23 and re-verified since): the muse-dev2 project itself no longer exists — the Management API returns 404 'Resource has been removed' and the project list is empty because there is nothing to list, not because of token scope. Supabase is retired as a fleet platform (Supabase→Turso migration, doc/2026-11-18_supabase-turso-recovery.md).

    Every consumer named here is gone: pkgs/fleet/runtime-db-export/run_sql_pg.py and load_rows_pg.py were removed in dc12ca4; supabase-exec itself is dispositioned under #13245 (Bitwarden pointer set deleted 2026-11-26; hatch-source remainder on follow-up #16822). The acceptance criteria (select 1 against muse-dev2 returns 200) can never be met and no longer need to be. Closing as not planned — superseded by the platform retirement recorded on #13245.

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

    epic/saas-servicekind/bugprimary-parent/saas-servicepriority/normalstray-work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions