Skip to content

test(npm): verify HTTP Wasm loaders in verify-pack - #105

Merged
byteland-app merged 3 commits into
mainfrom
stitch/verify-http-loaders-and-consumer-types-jm0-60d92b7c-bd43-44b3-b3ba-59d14f5a7f75
Nov 25, 2026
Merged

byteland-app merged 3 commits into
mainfrom
stitch/verify-http-loaders-and-consumer-types-jm0-60d92b7c-bd43-44b3-b3ba-59d14f5a7f75

Conversation

@google-labs-stitch

@google-labs-stitch google-labs-stitch Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Expand scripts/verify-pack.mjs to verify HTTP Wasm loaders across both tunelet and @bytelandtechnology/tunelet archives with a zero-dependency local node:http server (127.0.0.1:0) and isolated Node.js child processes (check-http.mjs):
    • http-404-retry: verify loadTunelet promise rejection and cache reset on HTTP 404, subsequent recovery on HTTP 200, post-initialization promise caching without refetching, and stereo/mono PCM block processing.
    • http-response-wasm: verify loadTunelet(Response) with Content-Type: application/wasm executes WebAssembly.instantiateStreaming with zero warnings and zero WebAssembly.instantiate fallback calls, followed by stereo/mono PCM block processing.
    • http-response-octet-stream: verify loadTunelet(Response) with Content-Type: application/octet-stream triggers WebAssembly.instantiateStreaming MIME rejection, warning emission, and WebAssembly.instantiate fallback, followed by stereo/mono PCM block processing.
  • Defer TypeScript declaration sanitization to fix(wasm): sanitize TypeScript declarations and Wasm exports #123 (scripts/normalize-wasm-pkg.mjs removed, and package.json, tsconfig.json, AGENTS.md, and baseline runtime/TypeScript checks kept aligned with main so test(npm): verify HTTP Wasm loaders in verify-pack #105 and fix(wasm): sanitize TypeScript declarations and Wasm exports #123 merge without conflicts).

Verification

  • cargo fmt --check
  • cargo clippy --locked --lib -- -D warnings
  • cargo build --locked --release
  • RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps
  • cargo package --locked
  • RUSTDOCFLAGS="-D warnings" npm run check:wasm
  • npm run verify:pack

Automated PR initiated by user @byteland-app via Stitch Loop.

- Add esnext.disposable and portable global types to pkg/tunelet.d.ts
- Replace RequestInfo and BufferSource aliases before tsc runs
- Remove synthetic DOM and disposable libs from tsconfig.json
- Check browser, WebWorker and NodeNext consumers in verify-pack.mjs
- Test HTTP loaders, 404 retries, buffers, modules and initSync
- Verify both tunelet and @bytelandtechnology/tunelet archives
- Document the declaration matrix and loader checks in AGENTS.md
@byteland-app

Copy link
Copy Markdown
Contributor

Review: The zero-dependency node:http loader verification (streaming application/wasm, MIME fallback, 404 retry, and scoped/unscoped archive checks) is very clean and much lighter than #103's Chromium/CDP harness. However, the declare global approach in normalize-wasm-pkg.mjs pollutes consumer globals and is superseded by #123. Please rebase after #123 and keep only the lightweight HTTP loader verification in scripts/verify-pack.mjs.

- Resolve conflicts in AGENTS.md and scripts/verify-pack.mjs
- Keep --out-dir and SHA256SUMS.txt output from #118
- Keep Wasm initializer object checks from #82
- Keep Node.js HTTP loader and consumer type checks
- Delete scripts/normalize-wasm-pkg.mjs in favor of #123
- Restore package.json, tsconfig.json and AGENTS.md to main
- Restore the TypeScript and default checks in scripts/verify-pack.mjs
- Keep the isolated node:http loader checks in scripts/verify-pack.mjs
@google-labs-stitch google-labs-stitch Bot changed the title fix(npm): normalize Wasm types and verify HTTP loaders test(npm): verify HTTP Wasm loaders in verify-pack Nov 25, 2026
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Addressed in cec896f:

@byteland-app
byteland-app merged commit 7e51952 into main Nov 25, 2026
1 check passed
@byteland-app
byteland-app deleted the stitch/verify-http-loaders-and-consumer-types-jm0-60d92b7c-bd43-44b3-b3ba-59d14f5a7f75 branch November 25, 2026 14:28
google-labs-stitch Bot added a commit that referenced this pull request Nov 25, 2026
- Merge main with #105, #123 and #135 into the branch.
- Run postbuild-wasm.mjs before normalize-jsdoc.mjs in build:wasm.
- Convert ControlActivity rustdoc links into TypeScript names.
- Check the ControlActivity JSDoc and @throws tag in verify-pack.mjs.
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.

1 participant