Skip to content

fix(webmcp): re-pin upstream contract to 433a1948; map consequentialHint and debugging - #112

Merged
NellInc merged 4 commits into
mainfrom
fix/webmcp-upstream-repin-20260921
Sep 29, 2026
Merged

NellInc merged 4 commits into
mainfrom
fix/webmcp-upstream-repin-20260921

Conversation

@NellInc

@NellInc NellInc commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

The weekly WebMCP upstream contract watcher has failed since 2026-09-07, most recently in run 36394033999 on 2026-09-28. The watcher was right; the contract was stale. The contract pins the exact index.bs hash, so every upstream commit needs a fresh review.

Now pinned to 433a1948 (sha256 4a88ed6f…). Merged with main; main already carried the dependency-advisory fixes, so this PR's lockfile changes were dropped in favour of main's newer pins.

Review of 41d12f05..433a1948 (19 commits)

  • executeTool input is now optional any inputObject (#251), with an example and clarification (#279). This is agent-side API that the SDK never calls, so only the fragment text changes.
  • registerTool, ModelContextRegisterToolOptions and ToolExecuteCallback are unchanged. #302 reorders name/description validation, but neither the adapter nor the polyfill re-implements that validation, so nothing changes here.
  • ModelContext now extends EventTarget and adds getTools, ontoolchange, ontoolactivated and ontoolcancel (#245). WebMCPModelContext is a structural subset of what the adapter calls, so it stays valid.
  • ToolAnnotations gained consequentialHint (#217) and debugging (#253). WebMCPToolAnnotations now declares both, which absorbs fix: accommodate WebMCP consequential tool annotation #102, and the contract guards all four annotation IDL lines. No SDK tool is marked consequential: vcp_chat, the only non-read-only tool, sends a chat query and does nothing irreversible.
  • The other four commits change nothing the adapter uses:
    • #311: a non-normative note on in-flight executions after unregistration; the adapter already preserves them (fix(webmcp): handle upstream execution cancellation #90);
    • #301: navigable-lookup and completion-step fixes inside the browser;
    • #315: the MCP reference becomes non-normative;
    • #309: spelling.

Verification

  • scripts/check_webmcp_upstream.py reports matched 4a88ed6ff14a against live upstream (exit 0).
  • Checker tests: 3 passed. validate_repo.py passes. The API snapshot is regenerated and --check verifies.
  • webmcp: tsc --noEmit clean; vitest 266 passed (12 files).

Closes #101. Supersedes #102.

🤖 Generated with Claude Code

NellInc and others added 2 commits September 21, 2026 12:26
…ommits

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]>
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]>
@NellInc
NellInc marked this pull request as ready for review September 21, 2026 13:28
NellInc and others added 2 commits September 28, 2026 15:43
# Conflicts:
#	python/requirements-dev.lock
…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 NellInc changed the title chore(webmcp): re-pin upstream contract after reviewing 15 spec commits fix(webmcp): re-pin upstream contract to 433a1948; map consequentialHint and debugging Sep 28, 2026
@NellInc
NellInc merged commit 594012c into main Sep 29, 2026
33 checks passed
@NellInc
NellInc deleted the fix/webmcp-upstream-repin-20260921 branch September 29, 2026 13:49
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