Skip to content

Exercise packaged Node bindings and lifecycle in PR CI - #452

Merged
kixelated merged 5 commits into
mainfrom
quest/a1/bindings/node
Nov 8, 2026
Merged

kixelated merged 5 commits into
mainfrom
quest/a1/bindings/node

Conversation

@kixelated

@kixelated kixelated commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

This PR builds and packs the real NAPI package, installs it, and exercises its entry point under Node. The test covers connection setup, uni/bi streams, datagrams, close information, reader wakeups, natural process exit, and forced teardown. A separate Node runtime PR workflow runs it for every PR, so shared Rust and build changes are covered too. Bounded subprocess cleanup removes the temporary stages.

The installed-package test reproduced Node refusing to load the exported TypeScript source from inside node_modules. The package now compiles JavaScript and declarations into dist/ and exports those files. They are built through prepack and during release preparation.

Python CI also exposed a close race in the mixed-stream fixture. The fixture now confirms it received every uni stream through their echoes, and the browser closes only after consuming them. Swallowed write errors are removed. No production close behavior, skips, retries, or CI deadlines changed.

Compatibility

  • Public exports, versions, NAPI platform artifacts and their release layout, and wire behavior are unchanged.
  • The package entry point moves from ./src/index.ts to ./dist/index.js + ./dist/index.d.ts. src/ is still shipped.

Choices made without asking

  • Merged main (Kotlin runtime CI moq-dev/web-transport#495, Node server close moq-dev/web-transport#485, WebTransportError moq-dev/web-transport#470, release moq-dev/web-transport#465).
  • package.json: kept main's bun test tests, its tsconfig.tests.json check, and its Biome formatting of the generated NAPI files (now in build:native), plus this PR's build:js, prepack, and test:runtime.
  • tsconfig.tests.json excludes tests/consumer.ts. That file imports @moq/web-transport by package name, so it only resolves against the packed package, and test:runtime type-checks it there.
  • Moved the README's "Runtime tests" section above "License".

Validation

  • After the merge (7335abf), locally: just fix, just check, quest check --base origin/main, bun run check, build, test (7 pass), and test:runtime (natural and forced runs passed).
  • Earlier, at 603f33f, locally: all 311 Python tests passed with debug bindings and Chromium 145, along with 100 independent mixed-stream sessions. CI on 7335abf is all green, including the wheel job (the mixed-stream test no longer hangs), all release-wheel builds, runtime (packaged Node), build, chromium, and Kotlin/JVM.

Closes the Node child of /quest/a1/bindings/README.md.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

Blocked on packaging scope: the published entry point exports src/index.ts, which Node rejects inside node_modules. No release packaging correction has been applied. A disposable compiled-JS/declaration packaging prototype passes all runtime cases, natural exit, and forced teardown. The timeout experiment fails as expected and removes its temporary stage. just fix, package type checking, Node syntax checking, quest validation, and diff checks passed; just check is still running. Full just test has not been run for this checkpoint.
@kixelated

Copy link
Copy Markdown
Collaborator Author

Checkpoint complete and clean at 62e8547. The real installed-package test fails before native loading because Node refuses the package's exported TypeScript file inside node_modules. No source import or custom loader is used to bypass that failure.

The staging-only JS/declaration prototype passes all runtime assertions and natural/forced process exits. The deliberately lingering-handle experiment fails within its deadline and confirms child/stage cleanup. just fix, just check, package type checks, Node syntax checking, quest validation, and diff checks pass; full just test was not run for this partial checkpoint.

Decision needed: authorize the recommended narrow JS/declaration/prepack/entry-point correction within this quest while preserving NAPI platform/release layout, or split a packaging prerequisite quest. This PR stays draft and the quest stays open until that boundary is settled.

(written by GPT-6)

@kixelated kixelated changed the title Add installed Node runtime CI coverage (packaging decision pending) Exercise packaged Node bindings and lifecycle in PR CI Oct 20, 2026
@kixelated
kixelated marked this pull request as ready for review October 20, 2026 22:49
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 09bc82c1-2fcf-4ed3-b853-159112652ffd
Commits

Reviewing files that changed from the base of the PR and between 9a19d9c and 7335abf.

Files selected for processing: 12

  • .github/workflows/node.yml
  • flake.nix
  • js/web-transport/README.md
  • js/web-transport/package.json
  • js/web-transport/scripts/release.ts
  • js/web-transport/scripts/test-runtime.ts
  • js/web-transport/tests/consumer.ts
  • js/web-transport/tests/runtime.mjs
  • js/web-transport/tsconfig.tests.json
  • py/web-transport/tests/browser_interop/test_concurrency.py
  • quest/a1/bindings/README.md
  • quest/a1/bindings/node.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T18:04:27.653842Z 7335abf Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated

Copy link
Copy Markdown
Collaborator Author

The user's “finish up please,” following unattended recommended-action authorization, settles the prior packaging boundary: complete the required JS/declaration/prepack/export correction within this Node runtime quest and merge the finished in-flight work. No separate prerequisite quest or further decision remains. Public exports, versions, NAPI platform artifacts/release layout, and wire behavior are preserved.

The actual built-and-packed native artifact passes all Node lifecycle, close/wakeup, natural-exit, and forced-teardown checks. The isolated declaration consumer and package lint pass. just fix, full just check, and full just test pass. Workspace package checks also pass concurrently with no generated dist/ and do not create it. The initial full test attempt encountered the existing QMux cold-fixture startup bound; prebuilding those fixtures made the unchanged full test pass, with no timeout/source changes.

Codex completed an independent review of current head 859e882a127308d4628974f59348e74c9c69baf8 with no findings or unresolved findings. Node runtime and Quest CI have passed; normal squash auto-merge remains gated on the remaining required CI. No additional quests or follow-ups are proposed in this finish-up batch.

(written by GPT-6)

@kixelated
kixelated enabled auto-merge (squash) October 20, 2026 23:01
@kixelated
kixelated disabled auto-merge October 20, 2026 23:09
@kixelated
kixelated marked this pull request as draft October 20, 2026 23:31
@kixelated

Copy link
Copy Markdown
Collaborator Author

Taking over this stale draft (last active 2026-10-20). The maintainer approved the takeover and lifted the earlier pause in a /quest-complete session. I'll merge main, resolve conflicts, get CI green, and mark it ready if it's complete.

(Written by Claude Opus 5.5)

Keep main's bun tests and biome-formatted napi build alongside the
dist/ build, and exclude the packaged-consumer type check from the
source tsconfig since it only resolves against the packed package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 8, 2026 18:02
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary for head 7335abf:

  • Took the stale draft over, merged main, and resolved conflicts by hand in js/web-transport/package.json, tsconfig.tests.json, quest/a1/bindings/README.md, and js/web-transport/README.md.
  • Because the conflicts were resolved by hand, this head needed a new review. Codex reviewed 7335abf and found nothing.
  • All 16 checks pass, including wheel. quest check --base origin/main passes: this PR deletes its finished quest and every link to it.
  • The earlier pause from 2026-10-20 that turned off auto-merge has been lifted by the maintainer. Landing with squash.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit 06904a2 into main Nov 8, 2026
16 checks passed
@kixelated
kixelated deleted the quest/a1/bindings/node branch November 8, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant