Skip to content

fix(sdk): refuse aborted calls before transport admission - #5000

Merged
ScriptedAlchemy merged 1 commit into
masterfrom
fix/sdk-abort-admission-4226
Nov 29, 2026
Merged

ScriptedAlchemy merged 1 commit into
masterfrom
fix/sdk-abort-admission-4226

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Why

An already-aborted request can still reach the MCP adapter. Unary HTTP calls and explicit cancellation also load and prepare the native addon before checking the signal, so a missing addon masks caller cancellation with a transport error. Event streams already refuse the same signal before native admission.

Changes

  • Refuse already-aborted HTTP operations, MCP operations, and cancellation requests at their entry points with TraceDecayAbortError and the original signal reason.
  • Prove that an aborted MCP request never invokes its adapter and that native operations reject before loading a deliberately unavailable addon.
  • Regenerate the ChatGPT extension's embedded server so installed plugins receive the same behavior.

Refs #4226. The native-client consolidation is already implemented; this PR addresses a remaining cancellation boundary. It does not claim to complete the broader cross-platform release and installed-consumer acceptance in that issue.

Validation

  • Before the fix: 3 of 4 new behavioral cases failed. HTTP operation and cancellation returned missing-addon transport errors; the MCP adapter was invoked once. The stream control case passed.
  • After the fix: pnpm --filter @tracedecay/sdk exec vitest run test/client-abort.test.ts passed all 4 cases, including exact string and Error cancellation-reason preservation.
  • SDK and ChatGPT extension typechecks passed.
  • SDK and embedded extension builds passed; check:embedded confirmed the generated bytes are current.
  • Rechecked frozen-lockfile installation, all four focused regression cases, and embedded reproducibility with the checkout's pinned pnpm 12.23.0.
  • Commitlint and git diff --check passed.

The focused boundary tests deliberately need no native addon. The full native socket suite and installed-package conformance were not rerun locally; CI remains authoritative for the full suite.


Devin Review

@changeset-bot

changeset-bot Bot commented Nov 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4b6eeaa

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.

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

@ScriptedAlchemy
ScriptedAlchemy enabled auto-merge (squash) November 28, 2026 21:26

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

@ScriptedAlchemy
ScriptedAlchemy merged commit 68e44e5 into master Nov 29, 2026
30 of 32 checks 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