Skip to content

[NO-TICKET] Improve deployment environment detection and local CLI setup - #343

Merged
mariojgt merged 1 commit into
mainfrom
feather/d8134935
Oct 1, 2026
Merged

mariojgt merged 1 commit into
mainfrom
feather/d8134935

Conversation

@mariojgt

@mariojgt mariojgt commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

What changed

Connect now reads Vercel's target environment and distinguishes Netlify production builds, hosted previews, and local development. The setup docs also cover local coding CLIs and explicit DigitalOcean build settings.

Why labels could be wrong

Vercel's target tier and Netlify's preview-server and development-server flags were not read. A known host with a missing tier could fall through to a CI branch or hosted-builder assumption. An incorrect label also changes whether built HTML receives the production marker.

The onboarding entry point presented a hosted-workspace sandbox command to local CLI users without a separate local workflow.

Fix

  • Prefer VERCEL_TARGET_ENV over VERCEL_ENV, accepting either without a separate Vercel marker.
  • Treat Netlify Preview Servers as sandbox and Netlify Dev as local, even when production settings are loaded.
  • Keep incomplete Vercel and Netlify signals local, with an explanation in verbose output, instead of guessing production from CI or builder dependencies.
  • Recognize the additional hosting variable names in manifest metadata.
  • Document package-manager-specific installation and verification, reuse of existing site configuration, deployment credentials, and project instructions for Gemini CLI, OpenCode, Codex CLI, and Claude Code.
  • Document explicit build-time production/sandbox settings for DigitalOcean and removal of workspace-only overrides before deployment.

Verified

  • npm run build
  • npm run typecheck
  • npm test — 4,137 passed, 7 skipped
  • npm run capabilities:check
  • node field-test/setup-demo.mjs --template express-npm

The integration test moves one project between local, production, and sandbox environments and checks the uploaded scan/build labels, production-marker insertion/removal, and absence of a persisted inferred tier. Configuration tests retain explicit override precedence. The local Express setup demo verifies one reused site, one widget, one copy of each hook, and guard source wiring.

The first full test run had two declaration-resolution failures. Both passed individually, and the complete suite passed when rerun after the setup demo finished.

Out of scope, worth a follow-up

Live end-to-end installs through each coding assistant remain untested. DigitalOcean deployments still require an explicit build-time tier; a hostname or NODE_ENV=production cannot establish it.


  • 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. Public documentation used for platform and coding-tool behavior was verified.

mariojgt commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

/review

@coderbuds

coderbuds Bot commented Oct 1, 2026

Copy link
Copy Markdown

Comprehensive environment detection enhancements with robust testing and clear docs.

🎯 Quality: 100% Elite · 📦 Size: Medium

📈 This month: Your 168th PR — above team average · Averaging Excellent

See how your team is trending →

@mariojgt
mariojgt merged commit f0a1ccd into main Oct 1, 2026
22 checks passed
@mariojgt
mariojgt deleted the feather/d8134935 branch October 1, 2026 11:46
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.

2 participants