fix(ops): print which supabase project invite and keys:rotate wrote to

Open Beginner friendly
#785 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
next.js, supabase, typescript
Domain
devops

Research direction

Read scripts/invite.ts and scripts/rotate-encryption-key.ts, then check their tests and step 4 in docs/operations/deploy.md. Trace how each script loads NEXT_PUBLIC_SUPABASE_URL and prints output. Add the project host and whether .env.local supplied it to each printed line, update the remove command with its variables, and cover an output line in a unit test.

Written by the indexing model from the issue text.

Description

area: ops bug impact: low priority: P3 size: XS

Context

Found by the Fable pre-production review on 2026-12-02 (main at cedc1914; every line reference below re-checked on main at cde5aa3b). Source: deploy readiness report, new issue 7.

Both operator scripts load .env.local when it exists (process.loadEnvFile(".env.local"), scripts/invite.ts:43, scripts/rotate-encryption-key.ts:43); variables already in the shell win, so a command without them acts on whatever .env.local points at. The output never says which project: Invited <email> and Removed <email> (scripts/invite.ts:49, :59), and keys:rotate prints only the key id and counts (rotate-encryption-key.ts:47-49). docs/operations/deploy.md:196 shows the remove command without the variables ("same variables" is only a comment).

Impact: low, operator only. From a dev checkout, npm run invite -- [email protected] --remove as printed edits the local database and still prints "Removed", so Eddie believes a production invite was withdrawn when it was not.

Plan

  1. Print the Supabase project host (from NEXT_PUBLIC_SUPABASE_URL, host only, never a key) in every line both scripts print, and whether .env.local supplied it.
  2. Repeat the variables on the remove command at deploy.md:196.
  3. Unit test the output line.

Acceptance criteria

  • invite and keys:rotate output names the project host.
  • deploy.md:196 repeats the variables.
  • A unit test covers the output.
  • Playwright e2e: none needed, scripts only.

Files and areas

scripts/invite.ts, scripts/rotate-encryption-key.ts, their tests, docs/operations/deploy.md (step 4 only).

Non-goals: rotation coverage (#{n8}).

Verification

npm run typecheck, npm run lint, npx vitest run scripts.


Branch: <issue-number>-script-project-host

Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown

Dominant language
TypeScript
Stars
13
Forks
2
Avg merge
5h 20m
Merged PRs (30d)
287

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eddiejaoude/StackDash

All issues in eddiejaoude/StackDash

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.