[PR #3455] [CLOSED] fix(wasm): preserve local matches for dotted selected paths #5746

Closed
opened 2026-10-31 01:09:08 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3455
Author: @Aurantium-47
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: codex/wasm-dot-path-association


📝 Commits (2)

  • 512d0f4 fix(wasm): preserve local matches for dotted selected paths
  • b186c3f test(wasm): run namespace regressions in Windows CI

📊 Changes

7 files changed (+178 additions, -6 deletions)

View changed files

📝 .github/workflows/ci.yml (+1 -0)
📝 scripts/ci/scopes.mjs (+2 -0)
📝 src/wasm/WabtOutput.test.ts (+76 -3)
📝 src/wasm/WasmGlueAdapter.ts (+19 -2)
📝 tests/boundary/filesystem/ciChangeScope.test.ts (+8 -0)
📝 tests/boundary/mcp/wasmArtifactMcp.test.ts (+66 -1)
📝 tests/process-global/curatedWindowsLane.test.ts (+6 -0)

📄 Description

Superseded by #4067 (merged). Current main uses the shared absoluteCallerPath owner for WASM glue and selected candidates, covering this PR's dotted-path matching without a second normalizer. The original interior-dot and Windows-namespace cases plus the MCP projection regression pass against main f850b7c894fa5cba370092a3ad9ca3df899d6d6f. The shared owner also explicitly distinguishes POSIX parent traversal from Windows lexical resolution, superseding the old control's conservative assumption on Windows. Closing this overlapping PR rather than carrying its obsolete normalization and CI changes forward.


Problem and outcome

Fixes #3402. A selected module spelled app/./module.wasm loses the local match to a glue literal ./module.wasm and falls back to both selected files named module.wasm. The canonical spelling of the same selection keeps a unique local candidate.

Change and scope

At the glue-association owner, retain the host-native path root, compare after removing interior . components from the remaining path, and keep the original selected strings in candidate_paths and Evidence. Windows device/extended roots, parent traversal, final . components, case differences, URLs, and query/fragment variants retain their existing behavior. In particular, .. is not collapsed because it can cross a symlink.

  • Semantic owner: associateWasmGlue, before local matching and basename fallback.
  • Contribution scope: routine static-analysis bug fix; advance capability approval is not applicable.
  • CLI/MCP schemas, WABT invocation, file acquisition, package metadata and generated contracts: unchanged.
  • Evidence preserves the caller's selected path, glue path and original candidate strings. The association remains a static candidate, not proof of loading, data flow or filesystem identity.
  • No added target execution, network access, mutation or cleanup behavior.

Evidence and validation

Final focused/static/discovery checks used main c2b79aa462af6a7eaff26124f39473417f2a5ff0. The three touched files are unchanged from the original reproduction base a32b4b6.

  • New adapter regressions on unmodified production at a32b4b6: 2 failed and 13 passed; the two failures reproduced the false additional basename candidate.
  • npm run test:focused -- src/wasm/WabtOutput.test.ts tests/boundary/mcp/wasmArtifactMcp.test.ts — 28 passed, including the new MCP regression that retains caller spelling through the public tool and typed application service, plus Windows namespace regressions. The WABT port is an explicit source-owned fixture; this does not establish real WABT execution.
  • npm run check — final namespace-safe patch passed all 6 tasks and architecture guards; lint reported 0 errors.
  • npm run verify:test-discovery — all 1,273 test files discovered exactly once.
  • Compiled production adapter with the actual Babel parser/traversal and Node's POSIX/Windows path implementations — 23 local, URI, parent-traversal, UNC and device-root controls passed. This is path-semantics coverage, not a real POSIX/UNC filesystem test. Independent AI review additionally checked 18 original-versus-patch controls after its namespace finding was fixed.
  • The existing adapter fixture now uses host-native absolute paths so its existing local/URL assertions run on Windows as well.

No real WABT or new filesystem acquisition workflow was exercised; both owning implementations are unchanged. The full suite remains with CI. No compatibility or release metadata changes.

AI assistance: OpenAI Codex, gpt-6.1-sol, ultra reasoning, autonomous investigation, implementation, tests and PR preparation.

Windows CI coverage follow-up

The existing WabtOutput tests now run in the curated Windows lane. Changes to the glue adapter or its regression file select that lane through package ownership; inclusion and actual Git-change routing guards prevent silent omission.

The three new guards failed before the routing repair and passed after it. On Windows, the combined four files reported 243 passed and three unchanged Unix-path fixture failures; restoring all four repair files to their original bytes reproduced those same three failures (212 passed). The adapter's 17 tests, MCP's 11 tests, and all three list guards passed, including the two Windows namespace cases. No test or gate was skipped or weakened. The final npm run check passed all six tasks and architecture guards.

Author readiness

Human owner: @Aurantium-47

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3455 **Author:** [@Aurantium-47](https://github.com/Aurantium-47) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/wasm-dot-path-association` --- ### 📝 Commits (2) - [`512d0f4`](https://github.com/morluto/rea/commit/512d0f4814681c97ab1bdb50f91049420b9b64c6) fix(wasm): preserve local matches for dotted selected paths - [`b186c3f`](https://github.com/morluto/rea/commit/b186c3f9bb1573dad67c4d6972eb59edc912bac2) test(wasm): run namespace regressions in Windows CI ### 📊 Changes **7 files changed** (+178 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+1 -0) 📝 `scripts/ci/scopes.mjs` (+2 -0) 📝 `src/wasm/WabtOutput.test.ts` (+76 -3) 📝 `src/wasm/WasmGlueAdapter.ts` (+19 -2) 📝 `tests/boundary/filesystem/ciChangeScope.test.ts` (+8 -0) 📝 `tests/boundary/mcp/wasmArtifactMcp.test.ts` (+66 -1) 📝 `tests/process-global/curatedWindowsLane.test.ts` (+6 -0) </details> ### 📄 Description **Superseded by #4067 (merged).** Current main uses the shared `absoluteCallerPath` owner for WASM glue and selected candidates, covering this PR's dotted-path matching without a second normalizer. The original interior-dot and Windows-namespace cases plus the MCP projection regression pass against main `f850b7c894fa5cba370092a3ad9ca3df899d6d6f`. The shared owner also explicitly distinguishes POSIX parent traversal from Windows lexical resolution, superseding the old control's conservative assumption on Windows. Closing this overlapping PR rather than carrying its obsolete normalization and CI changes forward. --- ## Problem and outcome Fixes #3402. A selected module spelled `app/./module.wasm` loses the local match to a glue literal `./module.wasm` and falls back to both selected files named `module.wasm`. The canonical spelling of the same selection keeps a unique local candidate. ## Change and scope At the glue-association owner, retain the host-native path root, compare after removing interior `.` components from the remaining path, and keep the original selected strings in `candidate_paths` and Evidence. Windows device/extended roots, parent traversal, final `.` components, case differences, URLs, and query/fragment variants retain their existing behavior. In particular, `..` is not collapsed because it can cross a symlink. - Semantic owner: `associateWasmGlue`, before local matching and basename fallback. - Contribution scope: routine static-analysis bug fix; advance capability approval is not applicable. - CLI/MCP schemas, WABT invocation, file acquisition, package metadata and generated contracts: unchanged. - Evidence preserves the caller's selected path, glue path and original candidate strings. The association remains a static candidate, not proof of loading, data flow or filesystem identity. - No added target execution, network access, mutation or cleanup behavior. ## Evidence and validation Final focused/static/discovery checks used main `c2b79aa462af6a7eaff26124f39473417f2a5ff0`. The three touched files are unchanged from the original reproduction base `a32b4b6`. - New adapter regressions on unmodified production at `a32b4b6`: 2 failed and 13 passed; the two failures reproduced the false additional basename candidate. - `npm run test:focused -- src/wasm/WabtOutput.test.ts tests/boundary/mcp/wasmArtifactMcp.test.ts` — 28 passed, including the new MCP regression that retains caller spelling through the public tool and typed application service, plus Windows namespace regressions. The WABT port is an explicit source-owned fixture; this does not establish real WABT execution. - `npm run check` — final namespace-safe patch passed all 6 tasks and architecture guards; lint reported 0 errors. - `npm run verify:test-discovery` — all 1,273 test files discovered exactly once. - Compiled production adapter with the actual Babel parser/traversal and Node's POSIX/Windows path implementations — 23 local, URI, parent-traversal, UNC and device-root controls passed. This is path-semantics coverage, not a real POSIX/UNC filesystem test. Independent AI review additionally checked 18 original-versus-patch controls after its namespace finding was fixed. - The existing adapter fixture now uses host-native absolute paths so its existing local/URL assertions run on Windows as well. No real WABT or new filesystem acquisition workflow was exercised; both owning implementations are unchanged. The full suite remains with CI. No compatibility or release metadata changes. AI assistance: OpenAI Codex, `gpt-6.1-sol`, ultra reasoning, autonomous investigation, implementation, tests and PR preparation. ## Windows CI coverage follow-up The existing WabtOutput tests now run in the curated Windows lane. Changes to the glue adapter or its regression file select that lane through package ownership; inclusion and actual Git-change routing guards prevent silent omission. The three new guards failed before the routing repair and passed after it. On Windows, the combined four files reported 243 passed and three unchanged Unix-path fixture failures; restoring all four repair files to their original bytes reproduced those same three failures (212 passed). The adapter's 17 tests, MCP's 11 tests, and all three list guards passed, including the two Windows namespace cases. No test or gate was skipped or weakened. The final `npm run check` passed all six tasks and architecture guards. ## Author readiness Human owner: @Aurantium-47 - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:08 +00:00
Sign in to join this conversation.
No milestone
No project
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#5746
No description provided.