Skip to content

test(parity): unsupported-action scenario + fix the real Go divergence it caught - #71

Merged
brentrager merged 1 commit into
mainfrom
corpus-errors
Jun 24, 2026
Merged

test(parity): unsupported-action scenario + fix the real Go divergence it caught#71
brentrager merged 1 commit into
mainfrom
corpus-errors

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

What

Adds the unsupported-action-error scenario to the shared corpus — and it immediately caught a real Go-server divergence that #65 had masked with a hidden skip (knownGoDivergence).

The bug (Go server)

protocol.go errorEvent() emitted the {code,message} descriptor only under data.error, never at the envelope-level error — and used NOT_FOUND instead of canonical SESSION_NOT_FOUND. Both diverge from spec/events/error.schema.json and the Python/Rust/C#/TS servers (the same bug class fixed for TS in #63 and C# in #64). The parity-go port (#65) had documented this and skipped unknown-session-error rather than fixing the server — so Go was never truly at parity.

The fix

  • protocol.go errorEvent → sets the envelope-level error descriptor (keeps data.error for back-compat).
  • dispatcher.goSESSION_NOT_FOUND.
  • Updated the existing TestUnknownSessionErrors to the canonical code.
  • Removed the knownGoDivergence skip → Go now runs + passes unknown-session-error too.

Go full suite green -race; all five servers green on the new scenario. True parity restored.

🤖 Generated with Claude Code

…rgence it caught

New scenario: an unrecognized action must return error/UNSUPPORTED_ACTION with the
requestId echoed. It caught a REAL Go-server bug that #65 had masked with a
knownGoDivergence SKIP: Go errorEvent() emitted the {code,message} descriptor only
under data.error, never at the envelope level error — and used NOT_FOUND instead of
canonical SESSION_NOT_FOUND. Both diverge from spec/events/error.schema.json + the
Python/Rust/C#/TS servers.

Fix (root cause): protocol.go errorEvent now sets the envelope-level error descriptor
(kept data.error for back-compat); dispatcher.go uses SESSION_NOT_FOUND; updated the
existing TestUnknownSessionErrors to the canonical code; removed the knownGoDivergence
skip. Go now passes ALL scenarios (incl. the previously-skipped unknown-session-error)
— full suite green -race. All 5 servers green on the new scenario.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U7Mn93HpqhSgEmX6tRdPAv
@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1dcc6bd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@brentrager
brentrager merged commit fc6652e into main Jun 24, 2026
1 check passed
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.

1 participant