mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #4201] [Bug] WASM optional-file failures identify the primary module argument #1649
Closed
opened 2026-10-16 21:08:27 +00:00 by bsakaguchi
·
3 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
morluto/rea#1649
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @coygeek on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4201
Before submitting
Area
Evidence, artifacts, or reconstruction
Observed behavior
inspect-wasm-artifactandinspect_wasm_artifactidentify a missing or directory-valued selected glue/candidate file, or selected glue containing invalid UTF-8, as an error in the primary module'spathargument. The primary module is readable and remains unchanged. The returnedinvalid_requesthasdetails.issues[0].path: ["path"]instead of the rejectedglue_pathsorcandidate_pathsarray entry, so callers receive incorrect structured argument-correction metadata. Missing/directory diagnostics name the rejected file; the encoding diagnostic supplies no filename.All five CLI missing/directory/invalid-UTF-8 optional-selection cases exited 1 with empty stderr and the same incorrect
details.issues[0].path. Missing glue, missing candidate and both invalid-UTF-8 glue positions also returned this incorrect metadata through the public stdio MCP tool, as did the missing second-glue case. The following excerpts are observed output; only the generated fixture-root prefix is replaced by<fixture>.For invalid UTF-8, the error names neither
glue.binnor the selected field/index. The script records only the three version probes for each encoding failure; no module validation, objdump or WAT decoding command ran. This is a rejected selected-input diagnostic, not evidence that completed module analysis was discarded.The missing-module controls correctly reported
["path"]through both entries. MCP relative-glue and relative-candidate controls correctly reported their respective array field at index 0 with reasoninvalid_format. Valid glue/candidate controls succeeded through both entries, and the CLI exited 0. Their parsed reference was./module.wasmat line 1, column 6, with associationlocal-path-candidateand only the selected module as its candidate. The valid-UTF-8 syntax-error controls also succeeded through both entries, retaining the selected glue byte digest,parse_status: "failed"and no references. Those success controls used simulated WABT output. All selected input digests remained unchanged, the isolated runtime directory was empty after MCP shutdown, and no cleanup failure masked the primary errors.Reproduction
Use the baseline and pinned toolchain under REA version and Runtime and platform, with locked dependencies installed. From the checkout root, run
npm run build:cached, then run the following complete local fixture. It creates executable fakes supplying the admitted version banners and simulated empty-module WABT output. It exercises actual REA CLI, stdio MCP, application validation, subprocess ownership, file reads and error projection. It does not run a real WABT engine or execute WASM. The script isolates HOME/config/cache/runtime, verifies the fixture bytes withWebAssembly.validate, checks selected-file digests, and removes its exact fixture directory. The baseline assertions deliberately check the observed incorrect metadata.The failing CLI calls are
inspect-wasm-artifactwith a valid module and either--glue_pathsselectingmissing-glue.js,glue-diror the six-byteglue.binfixture, or--candidate_pathsselectingmissing-candidate.wasmorcandidate-dir, followed by--format json. The exact underscore flag names are advertised bynode scripts/rea.mjs inspect-wasm-artifact --help. The script also calls public MCP with typed arrays, including[existingGlue, missingGlue]and[existingGlue, invalidUtf8Glue]to reject the second glue entry. Theunparseable.jscontrol contains valid UTF-8 with invalid JavaScript syntax.Expected behavior
Attribute each rejected selected file to its caller argument. Missing, non-regular or invalid-UTF-8 first glue selections should report
["glue_paths", 0]. Missing or non-regular first candidate selections should report["candidate_paths", 0]. A rejected second glue selection should report["glue_paths", 1]. The same operation already returns those field/index paths when rejecting relative selections before provider work. A rejected primary module should continue to report["path"], and valid glue/candidate selections should continue to succeed. Rejection of the selected file is allowed; the defect is which argument the structured issue identifies. No partial-success response is required for undecodable glue. The valid-UTF-8 syntax-error control should retain its existing successful result withparse_status: "failed".The input-issue contract defines correction metadata for one rejected caller argument. This operation already attributes relative selections to their array field/index in its application validation and MCP contract test.
Impact and scope
P2, supported. Missing/directory optional selections and invalid-UTF-8 glue return structured correction metadata naming a valid primary-module argument. The encoding message also omits the rejected filename, leaving callers without either the correct field/index or a named file. This is a bounded functional diagnostic defect; no automated-client repair loop or corruption of valid inspection Evidence was observed. No contract requiring partial success for undecodable glue was established.
Overall workaround status is unverified. Missing/directory messages identify the rejected file, and selecting existing intended files succeeds through both public entries without changing the module. That demonstrated recovery does not cover the full report: the encoding message names no file. Checking each selected file independently with a fatal UTF-8 decoder may locate undecodable glue, but that recovery procedure was not executed here and no general automatic repair was demonstrated. Omitting glue would remove selected evidence; re-encoding would change its bytes and was not tested. Neither is established as a workaround preserving the requested original glue evidence.
REA version
Tested source revision
62bf09809ef7bb224028916424f8f07652a20f4f, freshly built with the locked dependencies and pinned toolchain. The launcher prints6.5.0; this report does not claim reproduction against the published package or release tag.Runtime and platform
Node.js v24.18.0; npm 11.16.0; macOS arm64. All WABT banners and producer output are simulated by executable fakes. No real WABT engine or WASM execution occurred.
Target and artifact context
An eight-byte valid empty core-WASM module, an identical candidate, neutral selected glue, absent paths, directory selections, and six-byte invalid-UTF-8 glue. The reproduction validates the WASM bytes without instantiating them and checks unchanged selected-file digests.
Interface
CLI and stdio MCP
Earliest failure stage
Transport or result projection. Selected-file acquisition or decoding fails first as expected; the defect becomes observable when its error identifies the primary module argument.
Relevant output or evidence
Observed public-entry evidence, reproduced with complete inline fixtures above. This publication review reran the exact fixture in the assigned baseline checkout and independently observed all eight CLI cases and ten MCP calls, unchanged selected bytes, and an empty isolated runtime after MCP shutdown. The earlier verifier also passed 29 existing focused provider/MCP tests across two files; those tests alone do not establish the encoding case.
Current main
1b828dbb1011d80f44b3ae99efb9554991d71261was fetched before publication. The 16 inspected contract, entry, composition, reader, provider, documentation and test files are byte-identical to the tested baseline. Current-main applicability is source-inspected, not a runtime reproduction on that revision.Typed outcome or recovery expected
Rerun the same public inputs and require missing/directory glue and candidate issues, plus invalid-UTF-8 glue issues, to identify their selected array field and index. Both missing and invalid-UTF-8 second-glue selections must identify
["glue_paths", 1]; the first invalid-UTF-8 selection must identify["glue_paths", 0]. Preserveinvalid_request, the actual acquisition/encoding diagnostic, and the absence of cleanup masking. Keep the missing-module controls at["path"], the relative-path controls at their existing field/index paths, successful valid-glue controls with the same literal association, and successful valid-UTF-8 syntax-error controls with failed parser status and retained byte identity. Keep all selected input digests unchanged. A successful partial module/glue response for invalid UTF-8 is not part of this restoration check. The reproduction script's assertions of incorrect["path"]optional-selection metadata describe the failing baseline; restoration must satisfy the expected paths above instead.Analysis or suspected cause
Source-derived explanation: the provider artifact phase reads candidates and glue and fatally decodes glue before module-processing commands. Its catch supplies the primary module path, and the artifact-failure projection hard-codes
["path"]. This explains the observed selected-file attribution failure without requiring partial success or prescribing an implementation.Additional context
Related open reports #4001 and #3402 concern successful glue-reference retention and path-association ambiguity. Closed #2618 concerned relative-path validation before provider invocation. Its current guard passes the relative-selection controls above; this report concerns admitted absolute selections rejected later during acquisition or decoding. Open #3935 requires repeated cleanup failure; cleanup succeeds in this report. These reports have distinct triggers and restoration checks. Real-WABT compatibility, other platforms, access-denial and changing-file variants were not verified. NOT_ENOUGH_INFO: no last-known-good revision or population frequency is established.
@Abdooo2235 commented on GitHub (Oct 15, 2026):
I am working on selected-file error attribution. The change will preserve the caller field and original array index through candidate reads and glue decoding, with controls for primary-module errors and existing cleanup behavior.
@Abdooo2235 commented on GitHub (Oct 15, 2026):
@coygeek the fix is pushed to Abdooo2235:fix/wasm-selected-file-errors (8a2830d). The new regression passed after failing on the baseline; 10 MCP tests, static/docs checks, and real WABT CLI/stdio MCP attribution checks passed. The existing provider suite still has 12 pre-existing Windows fixture failures, recorded in the prepared PR description. GitHub rejected PR creation with insufficient permissions. Compare: https://github.com/morluto/rea/compare/main...Abdooo2235:rea:fix/wasm-selected-file-errors
@coygeek commented on GitHub (Oct 24, 2026):
Checked the reported fix on
mainatd87e73f2db.WabtArtifactProvider now tracks the selected artifact path and input field throughout candidate reads and glue decoding. Candidate selections use their first original array index, glue selections use entries() index, and the artifact catch passes that field into wabtFailure, which uses it for invalid_request issues. The primary module retains [path].
Implementation: WabtArtifactProvider.ts, WabtArtifactProvider.ts.
The relevant regression checks in WabtFailures.test.ts, wasmArtifactMcp.test.ts passed in the focused test run on this revision. This closure is based on the current source and those checks; provider fixtures do not establish a real-engine run. Closing as completed on main.