Skip to content

Stub both poll routes so the test doesn't pin an SDK detail#17

Merged
gradill22 merged 1 commit into
mainfrom
fix/decouple-test-from-sdk-route
Jul 26, 2026
Merged

Stub both poll routes so the test doesn't pin an SDK detail#17
gradill22 merged 1 commit into
mainfrom
fix/decouple-test-from-sdk-route

Conversation

@gradill22

Copy link
Copy Markdown
Contributor

Small follow-up to #16, which merged while the SDK change below was in flight.

Two cases in test/structured-output.test.mjs stub GET /bulk/{id} because that's where the SDK's getJob happened to look. That's the SDK's implementation detail, not this layer's contract — and it just moved to the kind-agnostic GET /jobs/{id} (WellMarkedAPI/JS-TS-SDK#12, which requires WellMarkedAPI/WellMarked#192).

These tests are about the MCP layer's structured output, not the SDK's routing, so pinning one path made them fail on an SDK upgrade that changed nothing here. I hit exactly that: after rebuilding against the local SDK, get_job returns job state as real JSON types and a finished job with no results still validates both failed with Cannot read properties of undefined (reading 'kind') — the stub missed, the tool returned isError, and structuredContent was absent.

Stubbing both paths makes them pass against either SDK version.

Verified: npm test → 11/11 against the local SDK build (which calls /jobs/{id}). They also still pass against the published wellmarked@1.1.1 (which calls /bulk/{id}) — that's the point of stubbing both.

No production code changes.

🤖 Generated with Claude Code

Two cases stubbed GET /bulk/{id} because that is where the SDK's getJob
happened to look. That is the SDK's implementation detail, not this
layer's contract — and it just moved to the kind-agnostic /jobs/{id}.
These tests are about the MCP layer's structured output, so pinning one
path made them fail on an SDK upgrade that changed nothing here.

Stub both, and they pass against either SDK version.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gradill22 gradill22 self-assigned this Jul 26, 2026
@gradill22
gradill22 merged commit c7641f4 into main Jul 26, 2026
3 checks passed
@gradill22
gradill22 deleted the fix/decouple-test-from-sdk-route branch July 26, 2026 05:58
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