ReviewOS

home-lang/home

Port Comlink worker proxy contracts

#215
Closed chris opened this 10 days ago ·
10 days ago

Context

The sequential Bun corpus frontier is js/third_party/comlink/comlink.test.ts at position 3957/4708, following completed Express/body-parser work in #214. This contributes to #66.

Current gap

The copied test is classified as unsupported module syntax because comlink is not represented. It creates a Worker for the copied TypeScript fixture, exposes an object in the worker, wraps the endpoint in the parent, and awaits a remote property with a strict startup-latency bound.

Acceptance criteria

  • Namespace comlink imports prepare and resolve in parent and worker sources.
  • expose publishes the worker-side object through the worker endpoint.
  • wrap returns a thenable proxy for remote property and method access.
  • Worker startup and first property resolution complete under the copied 100 ms bound.
  • Worker/proxy errors preserve useful source and stack context.
  • The copied test passes and is pinned in the permanent third-party gate.
10 days ago

Completed on main in 513a757.

The Comlink shim resolves namespace imports in parent and worker sources, binds expose to the executing worker endpoint, provides lazy thenable proxies for nested remote properties and correctly-bound methods, supports explicit proxy release, and rejects pending proxy work with the original worker error and source-linked stack. The copied startup test passes 1/1 under its 100 ms bound and is pinned in the permanent third-party gate.

Verification: focused position 3957 reports files=1, passed=1, failed=0, todo=0, unsupported=0, allowed-empty=0; all permanent gates pass.

Sign in to comment on this issue.