diff --git a/pm-stack/aggregator/scripts/collect-fleet-feed.ts b/pm-stack/aggregator/scripts/collect-fleet-feed.ts index 64fcea0fb1..b8db703b29 100644 --- a/pm-stack/aggregator/scripts/collect-fleet-feed.ts +++ b/pm-stack/aggregator/scripts/collect-fleet-feed.ts @@ -49,7 +49,7 @@ // the Test_Runs data, and the price event log's v_current_prices), // read through v_latest_import_batch via the Management API SQL endpoint. // Token plumbing mirrors the Projects read: the Bitwarden secret -// named `supabase.access-token-muse-cli` (the sbp_ management +// named `supabase.muse-dev2.access-token-muse-cli` (the sbp_ management // token), resolved by resolveBwsSecret and sent only to // api.supabase.com. Any failure embeds the section in its absent // form ({status:"absent", reason}) — the feed never fails over it. @@ -445,7 +445,7 @@ async function collectAaSection(generatedAt: string): Promise { const lastGood = await readAaLastGood(); const degrade = (reason: string): AaFeedSection => lastGood ? { ...lastGood.section, stale: true, staleReason: reason } : aaAbsent(reason, generatedAt); - const token = await resolveBwsSecret("supabase.access-token-muse-cli"); + const token = await resolveBwsSecret("supabase.muse-dev2.access-token-muse-cli"); if (!token) return degrade("no Supabase management token available (bws)"); // Project ref: env override, else the Bitwarden supabase.muse-dev2.project-ref // secret (the same resolve-by-name discipline as the token), else the diff --git a/pm-stack/aggregator/src/supabase.ts b/pm-stack/aggregator/src/supabase.ts index 0144123b49..d0f21af4e2 100644 --- a/pm-stack/aggregator/src/supabase.ts +++ b/pm-stack/aggregator/src/supabase.ts @@ -1,7 +1,7 @@ // Supabase access for the aggregator — the exact path the fleet-feed // collector uses for muse-dev2 (scripts/collect-fleet-feed.ts): SQL // over the Management API query endpoint, authenticated with the -// Bitwarden secret named `supabase.access-token-muse-cli` (the sbp_ +// Bitwarden secret named `supabase.muse-dev2.access-token-muse-cli` (the sbp_ // management token), project ref from $SUPABASE_PROJECT_REF, else the // Bitwarden `supabase.muse-dev2.project-ref` secret, else the muse-dev2 ref. // The token is only ever sent to api.supabase.com; it is never logged. @@ -50,7 +50,7 @@ let clientPromise: Promise | null = null; export function getSupabaseClient(): Promise { if (!clientPromise) { clientPromise = (async () => { - const token = await resolveBwsSecret("supabase.access-token-muse-cli"); + const token = await resolveBwsSecret("supabase.muse-dev2.access-token-muse-cli"); if (!token) return null; const ref = process.env.SUPABASE_PROJECT_REF ?? (await resolveBwsSecret("supabase.muse-dev2.project-ref")) ?? "keihfchslgjetkmnmzra"; diff --git a/pm-stack/supabase-export/README.md b/pm-stack/supabase-export/README.md index dc51e6f08d..103ce640cc 100644 --- a/pm-stack/supabase-export/README.md +++ b/pm-stack/supabase-export/README.md @@ -76,7 +76,7 @@ gap is recorded, not worked around. ## Token Resolved by **name** from Bitwarden Secrets Manager at runtime -(`supabase.access-token-muse-cli`, override `SUPABASE_TOKEN_SECRET_NAME`; +(`supabase.muse-dev2.access-token-muse-cli`, override `SUPABASE_TOKEN_SECRET_NAME`; `SUPABASE_MANAGEMENT_TOKEN` wins if set). The value is sent only to `api.supabase.com` and is never written to the document, a log line, a fixture, or argv. diff --git a/pm-stack/supabase-export/install-laptop.sh b/pm-stack/supabase-export/install-laptop.sh index 9c8757fa3b..ad7672adba 100755 --- a/pm-stack/supabase-export/install-laptop.sh +++ b/pm-stack/supabase-export/install-laptop.sh @@ -3,7 +3,7 @@ # (developing-today/code#1050). Copies the producer beside its output # directory and enables the 15-minute timer beside the #1151 gatherer tick. # The management token is resolved BY NAME from Bitwarden at runtime -# (SUPABASE_TOKEN_SECRET_NAME, default supabase.access-token-muse-cli); +# (SUPABASE_TOKEN_SECRET_NAME, default supabase.muse-dev2.access-token-muse-cli); # this script never reads, prints, or stores its value. set -euo pipefail diff --git a/pm-stack/supabase-export/supabase-quota-export.mjs b/pm-stack/supabase-export/supabase-quota-export.mjs index f046432861..3ef0a70dd7 100755 --- a/pm-stack/supabase-export/supabase-quota-export.mjs +++ b/pm-stack/supabase-export/supabase-quota-export.mjs @@ -55,7 +55,7 @@ import { fileURLToPath } from "node:url"; export const SOURCE = "file-export/supabase"; export const DEFAULT_PROJECT_REF = "keihfchslgjetkmnmzra"; // muse-dev2 -export const DEFAULT_SECRET_NAME = "supabase.access-token-muse-cli"; +export const DEFAULT_SECRET_NAME = "supabase.muse-dev2.access-token-muse-cli"; export const API_BASE = "https://api.supabase.com/v1"; /** Supabase Free-plan allowances (supabase.com/pricing, recorded 2026-10-29: