Skip to content

Report manifests under the production environment by default#28

Merged
mariojgt merged 1 commit into
mainfrom
feat/manifest-environment-production
Jun 26, 2026
Merged

Report manifests under the production environment by default#28
mariojgt merged 1 commit into
mainfrom
feat/manifest-environment-production

Conversation

@mariojgt

@mariojgt mariojgt commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What

The connector never sent an environment field with the manifest, so the backend defaulted every upload to sandbox. Since the connector reports from real builds (the prebuild scan / build hooks), manifests should be reported as production.

Changes

  • Add environment to Config and the POST body, defaulting to production.
  • Resolve from PATCHSTACK_ENVIRONMENT (env var) or "environment" in .patchstackrc.json; precedence env → file → default. Reject any value other than production/sandbox (CONFIG_INVALID).
  • Surface the value in scan output (Reporting under the <env> environment.) and status; document PATCHSTACK_ENVIRONMENT in --help.
  • Bump version 0.2.6 → 0.2.7.

Tests

typecheck clean; 94 tests pass, including new coverage:

  • postManifest sends the configured environment in the body.
  • resolveConfig defaults to production, reads the env var + config file, and rejects invalid values.

Notes

Pairs with the backend change (saas) that flips the omitted-environment default to production, so already-deployed connectors also report production without needing this upgrade.

The connector never sent an `environment` field, so the backend defaulted
every manifest to "sandbox". Since the connector reports from real builds
(the prebuild scan / build hooks), the manifest should be "production".

- Add `environment` to Config (type) and the wire payload, defaulting to
  `production`.
- Resolve it from `PATCHSTACK_ENVIRONMENT` (env) or `environment` in
  `.patchstackrc.json`; reject anything other than production|sandbox.
- Surface it in `scan` output and `status`; document the env var in --help.
- Bump version to 0.2.7.

Tests: added body + config-resolution coverage (94 passing).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mariojgt

Copy link
Copy Markdown
Contributor Author

/review

@coderbuds

coderbuds Bot commented Jun 26, 2026

Copy link
Copy Markdown

Implements configurable production or sandbox environment reporting with defaults.

🎯 Quality: 100% Elite · 📦 Size: Medium

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

See how your team is trending →

@mariojgt mariojgt merged commit 5eb54b7 into main Jun 26, 2026
4 checks passed
@mariojgt mariojgt deleted the feat/manifest-environment-production branch June 26, 2026 09:56
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