Skip to content

fix(init): keep protocol metadata out of local tools - #1438

Merged
betegon merged 1 commit into
mainfrom
fix/init-strip-protocol-envelope
Aug 18, 2026
Merged

fix(init): keep protocol metadata out of local tools#1438
betegon merged 1 commit into
mainfrom
fix/init-strip-protocol-envelope

Conversation

@betegon

@betegon betegon commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #1436. Protocol v1 adds protocolVersion and requestId to each suspended request, but the CLI was forwarding those transport fields into strict local tool schemas. apply-patchset rejected protocolVersion as an unknown key, retried four times, and aborted before writing files.

This keeps the wire envelope at the runner boundary:

  • local tools and interactive handlers receive only their domain payload
  • resumeAsync still echoes the original protocol version and request ID
  • request-ID recovery behavior remains unchanged
  • legacy payloads remain compatible because the fields are optional

Test plan

  • pnpm --filter sentry exec vitest run test/lib/init/wizard-runner.test.ts — 64 passed
  • pnpm --filter sentry exec vitest run test/lib/init test/commands/init.test.ts — 35 files / 551 passed
  • pnpm --filter sentry exec tsc --noEmit -p tsconfig.json
  • pnpm lint
  • pnpm check:deps
  • pnpm check:errors
  • pnpm check:patches
  • pnpm check:stale-refs
  • pnpm check:fragments
  • pnpm check:docs-sections
  • SENTRY_CLIENT_ID=local-build-smoke pnpm build
  • real production-API canary on sentry-test-projects/nextjs: selected every available feature, applied six changes, installed dependencies, passed CLI startup verification, and passed bun run build
  • git diff --check

The full CLI suite also completed with 9,173 passing and the same eight unrelated environment-sensitive failures already present on main (timezone and Bash completion fixtures).

Strip protocolVersion and requestId before dispatching suspended payloads to strict local tool and interactive schemas. Preserve the original envelope for resume correlation and recovery.
@betegon betegon added the risk: medium PR risk score: medium label Aug 18, 2026
@vercel

vercel Bot commented Aug 18, 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 18, 2026 10:00am

Request Review

@betegon
betegon marked this pull request as ready for review August 18, 2026 10:05
@github-actions github-actions Bot added risk: low PR risk score: low and removed risk: medium PR risk score: medium labels Aug 18, 2026
@betegon
betegon merged commit c384755 into main Aug 18, 2026
33 checks passed
@betegon
betegon deleted the fix/init-strip-protocol-envelope branch August 18, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant