Skip to content

Set SUPABASE_SERVICE_ROLE_KEY worker secret (paper-request form errors until then) #2

Description

@kgilpin

The paper-request form on /benchmarks fails on submit because the worker secret SUPABASE_SERVICE_ROLE_KEY is not set (wrangler secret list returns []). Everything else on the site works.

The form's server function (src/lib/paper-requests.functions.ts) writes to the paper_requests table in the Supabase project ulrbnkrvxzbtqancxmtn (created by Lovable) and reads the key from process.env.

Steps

  1. Get the key: supabase.com/dashboard → project ulrbnkrvxzbtqancxmtn → Project Settings → API Keys → reveal the service_role secret (starts sb_secret_). If the project isn't listed under your account, reach it through the hello-bright project's Cloud panel in Lovable. This is NOT the sb_publishable_ key already committed in .env.
  2. npx wrangler login as kevin@app.land if needed, then:
    npx wrangler secret put SUPABASE_SERVICE_ROLE_KEY
  3. Redeploy (push any commit, or npm run build && npx wrangler deploy) — secrets take effect on the next deploy.
  4. Verify: submit the form on https://appmap.io/benchmarks and expect a success message; confirm a row lands in paper_requests.

See CUTOVER.md § Phase 0 for the full context.

🤖 Generated with Claude Code

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions