Skip to content

fix: preserve WebMCP cancellation and current execution contracts - #23

Merged
TueJon merged 1 commit into
mainfrom
fix/native-compatibility
Oct 5, 2026
Merged

TueJon merged 1 commit into
mainfrom
fix/native-compatibility

Conversation

@TueJon

@TueJon TueJon commented Oct 5, 2026

Copy link
Copy Markdown
Owner

The vendored TS/JS result guards discarded execution callback options, preventing cooperative tools from receiving the caller cancellation signal. This preserves options identity, adds caller cancellation to the event bridge, and keeps registration disposal separate from active execution. Existing result guards and mutation safety remain intact.

Types and imperative simulation now distinguish callback values from serialized client results, default omitted input to {}, and include dated ModelContext event/debugging guidance. The README callout describes the existing v0.7.0 mutation journal.

Validation:

  • Full type/syntax/source check: 79/79 passed.
  • Workbench browser checks: desktop, phone, tablet, approval boundaries, transport, strict CSP and Trusted Types passed.
  • Native Chrome for Testing Beta 156.0.8078.4: five synthetic loopback probes passed (object input, execution signal, cooperative cancellation with zero delayed effects, registration removal preserving active success, omitted input).
  • Chrome 150: legacy input probe passes; four modern guarantees fail and harness exits 1.
  • One independent runtime/type/test review and targeted harness recheck completed.

Cancellation remains cooperative; handlers must honor signals before state commits. No native WPT, declarative or debugging-annotation conformance claim. No continuation-token implementation. No website deployment, release, or package publication. Shipment requires an exact-head CI/AI-review verdict and separate approval.

@TueJon TueJon added bug Something isn't working documentation Improvements or additions to documentation webmcp WebMCP agent surface labels Oct 5, 2026
@TueJon TueJon self-assigned this Oct 5, 2026

@TueJon TueJon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review — #23 @ 471dfca

First review (no prior reviews). Verdict: ship_it — no blocking or non-blocking findings.

What was reviewed

Full diff (+702/−53, 12 files) against main, plus repo rules (AGENTS.md), exact-head CI (check pass), and local runs at the PR head.

Coverage sweep (round 1)

  • Product fit — real bug: guardToolResult dropped the second execute() argument, so cooperative tools never received the caller cancellation signal. Preserving options identity, adding caller cancellation to the event bridge, and separating registration disposal from active execution belongs in this product. The README callout fix (v0.6.0 → v0.7.0) is correct: CHANGELOG shows 0.7.0 released 2026-09-19 with the mutation journal.
  • Correctness — traced every changed entry point: options forwarding through guardToolResult (TS + JS), dispatchAndWait cancel/settle/cleanup ordering (preabort-before-dispatch, once:true listener removal, timer cleared on every settlement, completion listener removed before abort() so synchronous handlers can't double-settle), and workbench simulation deferred execution with preabort skip. No logic gaps found.
  • TS/JS sync (repo hard rule) — both variants changed symmetrically; parity.test.mjs loops both variants over identity/cancellation/preabort cases.
  • Other executeTool consumers — webmcp.spec.ts, webmcp-compat.js, compat.test.mjs, verify.md etc. reference executeTool but are untouched; the return-type change (Promise<string | null>) is covered by the full suite.
  • Security / external effects / deploy — no secrets, no network/provisioning code, no workflow changes. Client-side templates, docs, tests only.
  • Docs — new native-compatibility.md correctly scopes evidence levels (CG draft + Chrome guides as documentation, Chrome 150 vs Beta 156 as separate observations, simulation explicitly not native proof). No SKILL.md/package.json churn, no version mismatch (changes under [Unreleased]).

Verification observed

  • Exact-head CI check: pass. Local at 471dfca: npm test 79/79 pass (matches PR body's 79/79 claim), typecheck clean (3 projects), syntaxcheck clean. Initial parity run failed only on missing esbuild before npm ci — environmental, resolved, then green.
  • Native Beta 156/Chrome 150 browser probes cited in the PR body were not re-run here; the doc's own scoping makes them non-load-bearing for merge.

No findings. Nothing left open by design — no checklist needed.

@TueJon
TueJon merged commit 539f72e into main Oct 5, 2026
2 checks passed
@TueJon
TueJon deleted the fix/native-compatibility branch October 26, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation webmcp WebMCP agent surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant