Skip to content

Commit 4fbc67e

Browse files
V48 Gate 3 (specification-implementation): production GitHub App renamed to bitcode-github-auxillary; staging pins its own public install URL
The production-mainnet GitHub App is now bitcode-github-auxillary (https://github.com/apps/bitcode-github-auxillary, renamed from bitcode-github-app-auxillary). The BITCODE_GITHUB_APP_PUBLIC_URL code fallback repoints to it, and because the fallback now names the production app, the staging-testnet bring-up script pushes NEXT_PUBLIC_GITHUB_APP_PUBLIC_URL (default: the bitcode-github-auxillary-stag-test app, overridable via STAGING_TESTNET_GITHUB_APP_PUBLIC_URL) so staging surfaces never link the production app. QA ledger: production-mainnet environment records the app; the bring-up pending-manual list gains the vercel-env re-run for the new var. Also repairs the bring-up template's tracking: .gitignore's `.env.*` rule was silently swallowing scripts/.env.staging-testnet.example (the ledger claimed it committed; it never did). Example templates (.env.*.example) are now explicitly negated — placeholders only — while the real secrets file scripts/.env.staging-testnet stays ignored. Verified: uapi tsc 0; footer/nav public-shell suites green (9/9); bash -n on the bring-up script; git check-ignore confirms example tracked-eligible + secrets file still ignored. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 62816d9 commit 4fbc67e

5 files changed

Lines changed: 46 additions & 3 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ uapi/tmp
99
.env.*
1010
!.env.example
1111
!**/.env.example
12+
# Example templates carry placeholders only — always committable.
13+
!.env.*.example
14+
!**/.env.*.example
1215

1316
# Playwright test artifacts
1417
**/playwright-report/**

BITCODE_V48_QA.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
TWO deployed environments plus local:
1313

1414
- **production-mainnet** — bitcode.exchange + the original Supabase project;
15-
mainnet posture.
15+
GitHub App `bitcode-github-auxillary`
16+
(https://github.com/apps/bitcode-github-auxillary — renamed 2026-07-05 from
17+
`bitcode-github-app-auxillary`; the code fallback
18+
`BITCODE_GITHUB_APP_PUBLIC_URL` names this app); mainnet posture.
1619
- **staging-testnet** — THE single non-production clone (Vercel custom
1720
environment `staginglocal-testnet` with domain `testnet.bitcode.exchange`,
1821
Supabase project `mwugicjpxmrtctvjghjg`, GitHub App
@@ -33,7 +36,10 @@ testnet4 network, GoTrue callback URL); local `.env.local` flipped to the
3336
staging-testnet project (old staging values retained as comments);
3437
`SUPABASE_JWT_SECRET` confirmed vestigial (no app code reads it). Pending
3538
manual: dashboard URL config + custom provider + GoTrue GitHub provider,
36-
GitHub App callback URLs, Vercel redeploy + stale-var sweep.
39+
GitHub App callback URLs, Vercel redeploy + stale-var sweep, and a
40+
`vercel-env` re-run to push `NEXT_PUBLIC_GITHUB_APP_PUBLIC_URL` (added
41+
2026-07-05 — staging surfaces must link the stag-test app now that the code
42+
fallback names the renamed production app `bitcode-github-auxillary`).
3743

3844
Bring-up automation: `scripts/bringup-staging-testnet.sh`
3945
(migrate | vercel-env | verify) with secrets in
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# STAGING-TESTNET secrets for scripts/bringup-staging-testnet.sh
2+
# Copy to scripts/.env.staging-testnet (gitignored) and fill. Never commit values.
3+
4+
# Supabase project mwugicjpxmrtctvjghjg (Settings → Database / API keys)
5+
STAGING_TESTNET_DB_PASSWORD=<database password>
6+
STAGING_TESTNET_ANON_KEY=<anon/publishable key>
7+
STAGING_TESTNET_PUBLISHABLE_KEY=<publishable key if distinct>
8+
STAGING_TESTNET_SERVICE_ROLE_KEY=<service role key>
9+
STAGING_TESTNET_SECRET_KEY=<secret key if distinct>
10+
STAGING_TESTNET_JWT_SECRET=<jwt secret>
11+
12+
# Shared HMAC secret — MUST equal the custom:bitcode-bitcoin provider Client
13+
# Secret in the Supabase dashboard AND local .env.local
14+
# BITCODE_BITCOIN_OAUTH_CLIENT_SECRET.
15+
STAGING_TESTNET_WALLET_OAUTH_SECRET=<shared wallet oauth client secret>
16+
17+
# GitHub App: bitcode-github-auxillary-stag-test
18+
STAGING_TESTNET_GITHUB_APP_ID=<app id>
19+
STAGING_TESTNET_GITHUB_APP_CLIENT_ID=<client id>
20+
STAGING_TESTNET_GITHUB_APP_CLIENT_SECRET=<client secret>
21+
STAGING_TESTNET_GITHUB_WEBHOOK_SECRET=<webhook secret if configured>
22+
STAGING_TESTNET_GITHUB_PRIVATE_KEY_PATH=~/Downloads/bitcode-github-auxillary-stag-test.2026-07-05.private-key.pem
23+
# Public install link for staging surfaces. Optional — defaults to the
24+
# stag-test app; the code fallback names the PRODUCTION app
25+
# (https://github.com/apps/bitcode-github-auxillary).
26+
#STAGING_TESTNET_GITHUB_APP_PUBLIC_URL=https://github.com/apps/bitcode-github-auxillary-stag-test

scripts/bringup-staging-testnet.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ do_vercel_env() {
7070
push_var GITHUB_APP_CLIENT_ID "${STAGING_TESTNET_GITHUB_APP_CLIENT_ID:-}"
7171
push_var GITHUB_APP_CLIENT_SECRET "${STAGING_TESTNET_GITHUB_APP_CLIENT_SECRET:-}"
7272
push_var GITHUB_WEBHOOK_SECRET "${STAGING_TESTNET_GITHUB_WEBHOOK_SECRET:-}"
73+
# Public install link — the code fallback names the PRODUCTION app
74+
# (bitcode-github-auxillary), so staging must point its surfaces at the
75+
# stag-test app explicitly.
76+
push_var NEXT_PUBLIC_GITHUB_APP_PUBLIC_URL \
77+
"${STAGING_TESTNET_GITHUB_APP_PUBLIC_URL:-https://github.com/apps/bitcode-github-auxillary-stag-test}"
7378
if [[ -n "${STAGING_TESTNET_GITHUB_PRIVATE_KEY_PATH:-}" && -f "${STAGING_TESTNET_GITHUB_PRIVATE_KEY_PATH}" ]]; then
7479
push_var GITHUB_PRIVATE_KEY "$(cat "${STAGING_TESTNET_GITHUB_PRIVATE_KEY_PATH}")"
7580
else

uapi/lib/github-app-url.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Fallback = the production-mainnet GitHub App. Non-production environments
2+
// set NEXT_PUBLIC_GITHUB_APP_PUBLIC_URL to their own app (staging-testnet:
3+
// https://github.com/apps/bitcode-github-auxillary-stag-test).
14
export const BITCODE_GITHUB_APP_PUBLIC_URL =
25
process.env.NEXT_PUBLIC_GITHUB_APP_PUBLIC_URL?.trim() ||
3-
'https://github.com/apps/bitcode-github-app-auxillary';
6+
'https://github.com/apps/bitcode-github-auxillary';

0 commit comments

Comments
 (0)