Skip to content

fix(init): require explicit zero workflow exit - #1451

Merged
betegon merged 1 commit into
mainfrom
fix/init-require-explicit-zero-exit
Aug 21, 2026
Merged

fix(init): require explicit zero workflow exit#1451
betegon merged 1 commit into
mainfrom
fix/init-require-explicit-zero-exit

Conversation

@betegon

@betegon betegon commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary

Make sentry init accept a terminal workflow result as successful only when it explicitly reports status: "success" and result.exitCode: 0.

Previously, a successful response with no result or no exitCode passed the truthiness check and could print the success handoff with process exit 0. The CLI now treats that as malformed, surfaces a specific WizardError, and exits nonzero. Existing nonzero workflow-to-CLI exit mappings are unchanged.

This makes the process exit status a reliable black-box signal for the init smoke harness.

Compatibility

This intentionally stops accepting terminal success payloads that omit exitCode. The current wizard success output already returns exitCode: 0.

The draft #1406 also touches handleFinalResult; merge order will require rebasing whichever PR lands second.

Test plan

  • focused wizard runner tests: 74 passed
  • CLI typecheck
  • Biome on the three changed files
  • git diff --check
  • native darwin-arm64 binary build
  • real Express init against the local candidate API: exit 0
  • invalid OpenRouter credential: CLI exit 61 and smoke harness exit 1

Rollout

The paired API-owned smoke is getsentry/cli-init-api#249. Once this lands, bump its pinned CLI SHA so malformed successful workflow responses cannot produce a false-green smoke result.

Treat malformed successful workflow responses as failures so missing exit metadata cannot make sentry init return a false zero.
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli Ready Ready Preview Aug 21, 2026 12:30pm

Request Review

@betegon
betegon marked this pull request as ready for review August 21, 2026 17:51
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Aug 21, 2026
@betegon
betegon merged commit bc50b58 into main Aug 21, 2026
30 of 31 checks passed
@betegon
betegon deleted the fix/init-require-explicit-zero-exit branch August 21, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant