Skip to content

[ENG-4592] Keep the API key file out of a Vercel CLI deploy - #501

Merged
daniloradovic merged 1 commit into
mainfrom
danilo/eng-4592-go-live-on-vercel-can-upload-the-local-api
Nov 20, 2026
Merged

daniloradovic merged 1 commit into
mainfrom
danilo/eng-4592-go-live-on-vercel-can-upload-the-local-api

Conversation

@daniloradovic

Copy link
Copy Markdown
Contributor

Closes ENG-4592

What changed

  • When the host is Vercel, go-live adds .patchstackrc.local.json to .vercelignore. It creates the file if it is missing, appends without touching existing lines, never adds the line twice, and says what it did. If the write fails, it says why and asks the person to add the line.
  • next only reads files, so its Vercel steps ask for the line instead of writing it.
  • The printed command is now vercel env add PATCHSTACK_API_KEY --environment production --sensitive, the syntax the Vercel CLI documents (needs Vercel CLI 64.6.0+).
  • CLI help, README, AGENT-INSTALL.md and the Claude plugin's next skill now say go-live writes this one entry on Vercel.

Why

go-live tells people to run npx vercel --prod. The Vercel CLI uploads the project folder, reads .vercelignore rather than .gitignore, and its default ignore list does not cover .patchstackrc.local.json. So the file holding the API key was uploaded with the deploy.

How it was verified

  • New tests: the .vercelignore writer (create, append, no duplicate, already listed, .gitignore untouched, write failure), the Vercel output lines, and a built-CLI run twice. They fail on main.
  • npm run typecheck, npm run build, npm run capabilities:check, npx vitest run (4759 passed, 7 skipped).
  • Still to do: AGENT-INSTALL.md changed, so the hostile field-test run is due right after the release that carries this.

  • I reviewed the code, comments, fixtures, commit messages, generated output, and PR description for private Patchstack or customer information.
  • Nothing here is third-party confidential or proprietary material. The Vercel behaviour relied on is from Vercel's public docs (vercel.com/docs/deployments/vercel-ignore, vercel.com/docs/cli/env).

`go-live` on Vercel tells the person to run `npx vercel --prod`. The Vercel
CLI uploads the project folder, reads `.vercelignore` rather than
`.gitignore`, and its default ignore list does not cover
`.patchstackrc.local.json`, so the API key was uploaded with the deploy.

`go-live` now adds `.patchstackrc.local.json` to `.vercelignore` when the
host is Vercel (creating the file if needed, never adding the line twice)
and says so. If it cannot, it says why and asks the person to add it. `next`
only reads, so its Vercel steps ask for the line instead.

The printed `vercel env add` command now uses `--environment production`,
the syntax the Vercel CLI documents.

The CLI help, README, AGENT-INSTALL.md and the Claude plugin's `next` skill
now say that `go-live` writes this one entry on Vercel.

Amp-Thread-ID: https://ampcode.com/threads/T-2e659ca3-7bd0-4d70-b3d3-09638251060b
Co-authored-by: Danilo Radovic <danilo@patchstack.com>
@coderbuds

coderbuds Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🎯 Elite quality (96%) — Closes a real credential-upload gap on Vercel by reusing the existing ignore helper, with thorough tests.

📦 Medium

🤖 Written by Amp — going by its own attribution. Unknown whether a person read it; agents can report that with the report-ai-usage-tool tool.

🔴 High risk — changes claude-plugin/skills/next/SKILL.md, which a person always reads.

✅ Reviewed — approved by @mariojgt.

See how your team is trending →

Copy link
Copy Markdown
Contributor Author

/review

@daniloradovic
daniloradovic merged commit 826c6b0 into main Nov 20, 2026
28 checks passed
@daniloradovic
daniloradovic deleted the danilo/eng-4592-go-live-on-vercel-can-upload-the-local-api branch November 20, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants