Conversation
Update wasm detection logic and add regression tests
There was a problem hiding this comment.
Pull request overview
Fixes WASM runner auto-detection so modern Rust wstd HTTP binaries are correctly classified as http-wasm, and adds regression coverage + updated internal docs.
Changes:
- Extend
detectWasmType()to treat modules withwasi:http/*/wasi:io/*imports ashttp-wasm(in addition to export-name heuristics). - Add a new unit test suite intended to validate all detection branches using real compiled WASM fixtures.
- Update internal context docs describing the new detection rules and the new unit tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| server/utils/wasmTypeDetector.ts | Adds import inspection (wasi:http/*, wasi:io/*) as an additional signal for http-wasm detection. |
| server/tests/unit/utils/wasmTypeDetector.test.ts | New unit tests covering component-model failure path, export-based detection, import-based detection, and Buffer input. |
| context/features/HTTP_WASM_IMPLEMENTATION.md | Updates detection documentation to match new export+import inspection behavior and references the new tests. |
| context/CONTEXT_INDEX.md | Updates index entry for detection logic and test location. |
qrdl
approved these changes
Apr 1, 2026
Collaborator
Author
|
🎉 This PR is included in version 0.1.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update wasm detection logic and add regression tests