Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pm-stack/aggregator/scripts/collect-fleet-feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -445,7 +445,7 @@ async function collectAaSection(generatedAt: string): Promise<AaFeedSection> {
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
Expand Down
4 changes: 2 additions & 2 deletions pm-stack/aggregator/src/supabase.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -50,7 +50,7 @@ let clientPromise: Promise<SupabaseClient | null> | null = null;
export function getSupabaseClient(): Promise<SupabaseClient | null> {
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";
Expand Down
2 changes: 1 addition & 1 deletion pm-stack/supabase-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pm-stack/supabase-export/install-laptop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pm-stack/supabase-export/supabase-quota-export.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading