Skip to content

fix(webmcp): handle upstream execution cancellation - #90

Merged
NellInc merged 2 commits into
mainfrom
fix/webmcp-upstream-20260824
Sep 2, 2026
Merged

NellInc merged 2 commits into
mainfrom
fix/webmcp-upstream-20260824

Conversation

@NellInc

@NellInc NellInc commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

  • review WebMCP upstream changes through 41d12f057167ccf5954dbcf49d99502cb6c84491
  • propagate the upstream execution AbortSignal into vcp_chat network requests
  • strengthen the bounded contract watcher for executeTool and callback cancellation
  • refresh the review date, exact source digest, public API snapshot, tests, and compatibility copy

The changes since the prior reviewed commit include the execution cancellation contract plus later explanatory-link-only specification edits. The watcher remains exact-byte fail closed.

Verification

  • live upstream watcher matched 48b076e033e5
  • WebMCP type check passed on Node 24.19.0
  • 234 WebMCP tests passed
  • package validation and packed artifact import passed
  • make validate: 16 conformance profiles passed, 0 failed
  • npm audit: 0 vulnerabilities

Closes #87

@NellInc
NellInc merged commit be8c8f2 into main Sep 2, 2026
34 checks passed
@NellInc
NellInc deleted the fix/webmcp-upstream-20260824 branch September 2, 2026 20:19
NellInc added a commit that referenced this pull request Sep 28, 2026
…bugging

The weekly upstream watcher failed again on 2026-09-28 (run 36394033999):
upstream moved past f5645e9a after this branch pinned it.

Review of f5645e9a..433a1948 (4 commits touching index.bs):
- #311: non-normative note that unregistration doesn't cancel in-flight
  executions; the adapter already preserves them (#90).
- #279: executeTool() input clarification and example; agent-side API the
  SDK never calls.
- #301: navigable-lookup and completion-step parallelism fixes; UA-internal.
- #315: MCP reference made non-normative.
None changes registerTool, its options, ToolAnnotations or the callback
shape the adapter relies on.

ToolAnnotations gained consequentialHint (#217) and debugging (#253) earlier
in the reviewed range. WebMCPToolAnnotations now declares both (absorbing
#102), and the contract guards their IDL lines so a removal upstream
surfaces here. No SDK tool is marked consequential: vcp_chat, the one
non-read-only tool, sends a chat query and changes nothing irreversible.
#302 (name validated before description) needs no change: neither the
adapter nor the polyfill re-implements registerTool validation.

Checker: matched 4a88ed6ff14a against live upstream (exit 0); checker
tests 3 passed; validate_repo passed; API snapshot regenerated and
verified; webmcp tsc clean, vitest 266 passed.

Co-Authored-By: Claude <[email protected]>
NellInc added a commit that referenced this pull request Sep 29, 2026
…int and debugging (#112)

* chore(webmcp): re-pin the upstream contract after reviewing 15 spec commits

The weekly watcher has failed since 2026-09-07 with one missing required
fragment: upstream changed executeTool's inputObject from `optional object
inputObject = {}` to `optional any inputObject` (webmachinelearning/webmcp#251).
The watcher was working correctly; the contract was stale.

Reviewed webmachinelearning/webmcp 41d12f05..f5645e9a (15 commits) against the
surface this adapter implements:

- executeTool signature change is agent-side API. This SDK registers tools and
  never calls executeTool (it appears nowhere outside the contract file), so
  the fragment text is updated with no adapter change.
- registerTool and ModelContextRegisterToolOptions are unchanged; all other
  previously reviewed fragments still match byte-for-byte.
- ModelContext now extends EventTarget and adds getTools/ontoolchange/
  ontoolactivated/ontoolcancel. WebMCPModelContext is a structural subset of
  what this adapter calls, so it stays valid.

Also guards the ToolAnnotations members webmcp/src/types.ts maps
(readOnlyHint, untrustedContentHint). The contract previously asserted nothing
about annotations, so their removal upstream would have left the adapter
declaring a surface the spec no longer defines, with no signal.

Follow-up, not in this change: upstream ToolAnnotations gained consequentialHint
(#217) and debugging (#253); WebMCPToolAnnotations in webmcp/src/types.ts:20-23
carries neither. consequentialHint is already handled on the unmerged branch
codex/webmcp-consequential-hint; `debugging` is unclaimed. Upstream #302 also
reordered registerTool's name/description validation, which the adapter's
registration error expectations should be checked against.

Verified: scripts/check_webmcp_upstream.py reports status "matched" against
live upstream (exit 0); 3 checker tests pass; validate_repo.py passes.

Closes #101

Co-Authored-By: Claude <[email protected]>

* fix(deps): clear the four advisories failing SDK CI

Both audit steps on this PR fail on pre-existing advisories that postdate main's
last SDK CI run (2026-09-03), not on anything the contract re-pin touches.

Python (pip_audit, python/requirements-dev.lock):
  httpx2 2.10.0 -> 2.13.0, clearing PYSEC-2026-3846 (fixed 2.12.0),
  PYSEC-2026-3848 and PYSEC-2026-3849 (both fixed 2.11.0).
  Resolved with --upgrade-package httpx2 to keep the churn to that package;
  httpcore2 follows it, and hypothesis and uv drifted forward with the
  re-resolution.

Rust (cargo audit, rust/Cargo.lock):
  rustls 0.23.43 -> 0.23.45, clearing RUSTSEC-2026-0285 (medium, 5.3).
  Transitive through reqwest, which stays pinned at =0.13.4; a patch bump
  within the existing requirement, so no manifest change.

Verified with the workflow's own commands: `cargo audit --deny yanked --file
rust/Cargo.lock` exits 0 across 275 crates; `npm audit --audit-level=moderate`
reports 0 vulnerabilities; `cargo check --workspace --all-targets` compiles;
validate_repo.py passes; the WebMCP contract still reports matched. pip_audit
could not run locally (ensurepip aborts under uvx), so the Python side rests on
2.13.0 exceeding all three fix versions and is confirmed by CI.

Co-Authored-By: Claude <[email protected]>

* fix(webmcp): re-pin upstream to 433a1948 and map consequentialHint/debugging

The weekly upstream watcher failed again on 2026-09-28 (run 36394033999):
upstream moved past f5645e9a after this branch pinned it.

Review of f5645e9a..433a1948 (4 commits touching index.bs):
- #311: non-normative note that unregistration doesn't cancel in-flight
  executions; the adapter already preserves them (#90).
- #279: executeTool() input clarification and example; agent-side API the
  SDK never calls.
- #301: navigable-lookup and completion-step parallelism fixes; UA-internal.
- #315: MCP reference made non-normative.
None changes registerTool, its options, ToolAnnotations or the callback
shape the adapter relies on.

ToolAnnotations gained consequentialHint (#217) and debugging (#253) earlier
in the reviewed range. WebMCPToolAnnotations now declares both (absorbing
#102), and the contract guards their IDL lines so a removal upstream
surfaces here. No SDK tool is marked consequential: vcp_chat, the one
non-read-only tool, sends a chat query and changes nothing irreversible.
#302 (name validated before description) needs no change: neither the
adapter nor the polyfill re-implements registerTool validation.

Checker: matched 4a88ed6ff14a against live upstream (exit 0); checker
tests 3 passed; validate_repo passed; API snapshot regenerated and
verified; webmcp tsc clean, vitest 266 passed.

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
@NellInc
NellInc restored the fix/webmcp-upstream-20260824 branch November 6, 2026 18:59
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.

Review upstream WebMCP contract drift

1 participant