Repository navigation
feat(target): explain static WASM inspection after native rejection - #1872
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Retain the original WASM routing change while integrating the current shared target, Evidence and MCP workflows before public recovery verification. Refs morluto#1852 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
Check the actual MCP-advertised input and output schemas for the static tool offered after native WASM rejection. Confirm connection usability after the missing-tool outcome and preserve an explicit raw-binary load selection. Refs morluto#1852 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4d7df8461
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ( | ||
| observed.bytesRead === 8 && | ||
| magic.equals(Buffer.from([0, 0x61, 0x73, 0x6d, 1, 0, 0, 0])) | ||
| ) |
There was a problem hiding this comment.
Probe WASM before automatic
.hop routing
For a valid v1 module saved with a .hop suffix and opened without an explicit format, parseBinaryTarget returns from the automatic analysis-database branch at lines 144-154 before it ever calls this detector. The module is therefore sent to a native database provider and never receives the wasm_requires_static_inspection recovery promised for recognized headers; move this content check ahead of the suffix-only .hop branch while leaving an explicitly requested database kind as the override.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
Reuse the existing application MCP harness with explicit session and server options, and validate the named WASM schemas once per client. Preserve all recovery, Evidence, cleanup, malformed-input and connection assertions while removing duplicate setup that exceeded the unchanged CI duplication threshold. Refs morluto#1852 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
Integrate current target, artifact, process and provider workflows before running the full CI static gate and shared MCP harness consumers. Preserve the original WASM recovery implementation and its focused public behavior. Refs morluto#1852 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
Update the curated Windows invocation after the upstream reconstruction test moved from composition to the filesystem boundary. Keep the missing-path guard and the test coverage enabled rather than silently ignoring the stale selector. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
Verify little- and big-endian soft-float declarations through real filesystem target resolution and the committed storage policy. Preserve rejection of inconsistent CPR1 declarations and assert the existing FP64 restriction instead of superseded general-register diagnostic wording. Production provider semantics are unchanged. These expectations follow the soft-float support already merged in morluto#1949. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d2c55d2a8
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| tests/boundary/cli/referenceSourceImportStatus.test.ts | ||
| tests/boundary/filesystem/asarInventoryFreshness.test.ts | ||
| tests/composition/javascript-applications/javascriptArtifactReconstruction.test.ts | ||
| tests/boundary/filesystem/javascriptArtifactReconstruction.test.ts |
There was a problem hiding this comment.
Follow the reconstruction suite's actual rename
In the windows-curated invocation, this is not the destination of the renamed selector: commit dc303a8 moved tests/composition/javascript-applications/javascriptArtifactReconstruction.test.ts to tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts, while this flat path is a different pre-existing suite. Because tests/process-global/curatedWindowsLane.test.ts:58-64 checks only that selectors exist, CI remains green while silently dropping the intended reconstruction/worker coverage on Windows; point this entry at the nested javascript-applications path.
AGENTS.md reference: AGENTS.md:L46-L46
Useful? React with 👍 / 👎.
Point the Windows invocation to the exact filesystem boundary path recorded by the upstream file move, including the javascript-applications directory. A separate existing test has the same basename and must not replace this coverage. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
Integrate current target, artifact, process and provider workflows before running the full CI static gate and shared MCP harness consumers. Preserve the original WASM recovery implementation and its focused public behavior. Refs morluto#1852 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
Integrate current target, artifact, process and provider workflows before running the full CI static gate and shared MCP harness consumers. Preserve the original WASM recovery implementation and its focused public behavior. Refs morluto#1852 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
Reuse the upstream soft-float filesystem test for both byte orders rather than keeping an overlapping scenario. Preserve parsed FP64 source fields and the distinct inconsistent soft-float declaration refusal. Refs morluto#1852 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
Integrate current target, artifact, process and provider workflows before running the full CI static gate and shared MCP harness consumers. Preserve the original WASM recovery implementation and its focused public behavior. Refs morluto#1852 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
Integrate the verified dylib-use replay and current workflow ownership and error contracts before final WASM recovery validation. Refs morluto#1852 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <[email protected]>
|
@SII-YDD, thank you for tracing this from the bounded WASM header probe through the shared CLI and MCP diagnostics. Calling out the difference between recognizing a v1 header and validating the module, while pointing directly to the static inspection route, makes the refusal much more useful. Welcome to REA! |
Summary
Recognized WebAssembly v1 files opened through
open_binaryproduce an unsupported native-format diagnostic or follow an unrelated filename route. Identify the observed format before suffix classification and give valid arguments for the existing target-freeinspect_wasm_artifacttool.Refs #1852. This PR covers WASM recovery; other unsupported firmware encoding/load combinations remain outside its scope.
Problem and expected behavior
The complete eight-byte WASM v1 header establishes a format/version observation regardless of filename. Native admission should remain rejected while explaining the supported static lane, its optional tool prerequisites and the distinction between header recognition and full validation. Incomplete, future-version and unrelated headers must not establish WASM v1 support.
Change and scope
target_unavailableand nonretryable behavior; addwasm_requires_static_inspectionand projectunsupported_targetthrough shared CLI/MCP diagnostics and doctor.REA_WABT_BIN_DIRECTORY.Contract and boundary impact
BinaryTargetResolver.detectArtifactFormatat its existing eight-byte read; shared error presentation owns the diagnostic.Representative outcomes
A recognized file rejected by
open_binarynow identifies the native admission restriction and offersinspect_wasm_artifactwith the exact path, including quotes/spaces. Without WABT, that tool returns its distinctcapability_unavailablesetup diagnostic. With WABT, static validation and inspection proceed independently of native engines.The integrated DataCount and module-name fixes from #1963/#1967 were also verified on two unchanged released WASM modules (94,519 and 879,148 bytes). The smaller result returns complete inline Evidence. The larger result contains 15,350,577 bytes of decoded WAT: the default MCP receive budget produces an explicit transport constraint, and retained Evidence export exactly matches complete CLI JSON. No response budget was raised.
Validation
npm run check:ci: all eight tasks and architecture guards passed.npm run docs:check: all six tasks passed.git diff --check: passed.Compatibility, safety, and release
No input migrations, new native prerequisites or package/release metadata changes. Linux source-built CLI and actual stdio MCP workflows use WABT; native engine verification is not claimed for this diagnostic increment. Platform-specific coverage is reported by matching-head CI. No credentials, private paths, generated binaries or local planning artifacts are committed.
Review checklist
Final integration: 95 tests passed across target diagnostics, actual MCP WASM workflows, MIPS declaration boundaries and error projection; the complete eight-task CI static gate passed with 1,154 architecture guards, and generated documentation checks passed. Current provider and workflow fixes, including #1972, are integrated. Full PR CI is requested.