Skip to content

Modernize the jco legs: fork transpiler, -I async, runtime import binding - #347

Merged
lann merged 1 commit into
mainfrom
jco-modernization
Aug 7, 2026
Merged

Modernize the jco legs: fork transpiler, -I async, runtime import binding#347
lann merged 1 commit into
mainfrom
jco-modernization

Conversation

@lann

@lann lann commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Fixes #345. The conformance jco legs move to the sibling shape (websocket/webrtc):

  • -I async + runtime binding: no more --map walls — host-imports.mjs builds the import object over the upstream ./imports export (polymorph-test#58). The wildcard-map virtue is preserved: the polymorph:webcrypto/* interfaces are discovered from js/jco/webcrypto.js's lowercase namespace exports at instantiate time, enumerated nowhere. Workers (Node worker-threads and browser Web Workers) instantiate per shard; the browser worker reaches the shim/harness/host by relative path (module workers cannot see import maps).
  • Toolchain: the lann/jco fork tarball (jco-transpile-0.6.2-fa6990d) everywhere the runtime paths transpile; preview2-shim/playwright-core to exact pins.
  • Wrapper deletion completed (the Bump component-test to 76c0945; adopt the setup action and shared glue #346 deferral): jco-demo, js/jco types, and WPT parity call the component-test-jco-transpile bin; scripts/jco-transpile.mjs is gone; the three trees pin @polymorph/component-test-js and their lockfiles join the pins gate (5 lockfiles, one rev).
  • One deliberate exception: js/jco's types generation stays on exact jco-transpile@0.5.2 — the fork types stream parameters as AsyncIterable where the host is written against ReadableStream; retyping the host is its own change (tracked in a jco leg is a toolchain generation behind the siblings (registry jco-transpile ^0.5.2, transpile-time --map wiring, floating shim pins) #345 comment). Runtime is unaffected (the full matrix below is the proof).
  • Latent recipe defect fixed: _jco-prepared's content stamp now includes jco/package.json — the transpile flags/transpiler pin live there, and the flag change in this PR demonstrably shipped a stale generated tree until the stamp learned about it.

Verification (all local, browser leg included):

  • CONFORMANCE_BROWSER=1 just conformance-ct::all + matrix-check: 4 targets, 76,360 + 2,316 signing results, 0 failing, committed matrices byte-identical — the rewire's behavioral parity at full corpus scale.
  • just demo::test-node, just jco::typecheck, just wpt::parity, WPT_PARITY_CHROMIUM=1 just wpt::parity-chromium (loss ratchets hold on the fork), _viewer-prepared through the bin.

…ding

The conformance jco legs were a toolchain generation behind the
siblings: registry jco-transpile 0.5.2 with all wiring baked in at
transpile time through --map walls, and floating semver ranges beside
a rev-exact component-test pin.

- The conformance suites transpile with -I async and no maps; the
  workers instantiate per shard with imports bound at run time
  (host-imports.mjs over the upstream ./imports export): the
  polymorph:webcrypto interfaces discovered from the host module's
  lowercase namespace exports — the wildcard-map convention, applied
  at instantiate time, so a new interface is still enumerated
  nowhere — the driver's own test-context, and the caller's
  preview2-shim build (Node or browser, relative paths in the Web
  Worker: workers cannot see import maps).
- The transpiler is the lann/jco fork tarball the siblings pin;
  preview2-shim and playwright-core move to exact pins.
- Every jco-transpile.mjs consumer (conformance, jco-demo, js/jco
  types, WPT parity) calls the component-test-jco-transpile bin and
  the in-repo wrapper is deleted; jco-demo and parity pin the fork
  (map-style invocations, which the bin supports), completing the
  #346 deferral. The three trees' lockfiles join the pins gate.
- js/jco's types generation stays on jco-transpile 0.5.2, exact: the
  fork generates host types whose stream parameters are
  AsyncIterable rather than ReadableStream, and retyping the host is
  its own change — runtime paths carry the fork; the types tree is
  pinned and tracked on #345.
- _jco-prepared's content stamp gains jco/package.json: the transpile
  flags and the pinned transpiler live there, and either changing
  must invalidate the generated tree (the flag change here shipped a
  stale tree until the stamp learned about it).

Verified: CONFORMANCE_BROWSER=1 conformance-ct::all + matrix-check
green (4 targets, 76360 + 2316 signing results, matrices unchanged —
behavioral parity of the rewire at full corpus scale);
demo::test-node, jco::typecheck, wpt::parity and
WPT_PARITY_CHROMIUM=1 parity-chromium green (loss ratchets hold on
the fork); _viewer-prepared stages through the bin.

Fixes #345.
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.

jco leg is a toolchain generation behind the siblings (registry jco-transpile ^0.5.2, transpile-time --map wiring, floating shim pins)

1 participant