feat(setup): require hosting-provider env var checklist in setup runs#3650
Draft
MattBro wants to merge 3 commits into
Draft
feat(setup): require hosting-provider env var checklist in setup runs#3650MattBro wants to merge 3 commits into
MattBro wants to merge 3 commits into
Conversation
The instrument-integration setup run writes env vars to .env files only. Those never reach the deployed app, so a user could merge the PR and have production silently send no events, with nothing in the PR body warning them. Make the deployment target part of the prompt contract: detect it from repo markers (vercel.json/.vercel, netlify.toml, wrangler.toml, fly.toml), and always open the PR body with the env var keys to set and provider-specific steps. The sandbox can never read the provider's env, so the checklist is unconditional. Key names only — values stay out of the PR body. Drop WIZARD_PROMPT rather than extend it: its last consumer was removed in eae3b11 (#2016) when the enricher run replaced the wizard run, and @posthog/core is private, so nothing outside the repo can import it. The live path is buildPosthogSetupSuggestion, which is where the guidance lands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The checklist assumed every run ends in a pull request. It doesn't. These suggestion prompts are prefilled into the task composer, where the user picks the workspace mode — cloud, worktree or local — and no mode opens a PR automatically. A local run following the old text had nowhere to put a section the prompt called mandatory, so the guidance was liable to be dropped in exactly the runs that still need it. Name a delivery target for both endings: PR body when a PR is opened, final message of the run when one isn't. The checklist itself is unchanged and stays unconditional — no run can read the hosting provider's env, so the vars are always assumed missing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
…r checklist Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LV8ErU3QavwTp2oMe9VSLS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cloud wizard setup runs generate a PR that defines env vars in
.env.example, but nothing tells the user those vars also need to exist in their hosting provider (Vercel, Netlify, etc.). Users who merge the PR and deploy get a production site that silently sends no events — a recurring theme in wizard feedback.Changes
DEPLOYMENT_ENV_VAR_PROMPTtopackages/core/src/setup/prompts.ts: a checklist instruction requiring the agent to detect the hosting provider and list, in the PR body (or final message for local runs), exactly which env vars the user still needs to set there.suggestions.ts(fresh install and SDK-already-present variants), with phrasing that works for both PR-based cloud runs and local runs.WIZARD_PROMPT, which has been dead code since its last consumer was deleted (eae3b11b4, May 2026).How did you test this?
packages/core: 2,488 tests pass (vitest run), including new tests asserting both suggestion variants include the deployment checklist.pnpm run lint— no errors.tsc --noEmitinpackages/corecurrently fails on twopi-runtimefiles with a module-resolution error against@posthog/agent/pi/types; these files are untouched by this PR and the error exists independently of it.Automatic notifications