[PR #6429] [CLOSED] fix(mcp): publish portable Windows absolute path patterns #7354

Closed
opened 2026-11-01 21:47:16 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6429
Author: @jokken79
Created: 10/23/2026
Status: ❌ Closed

Base: main ← Head: fix/windows-mcp-path-pattern


📝 Commits (1)

  • b84a41d fix(mcp): publish portable Windows absolute path patterns

📊 Changes

5 files changed (+107 additions, -83 deletions)

View changed files

📝 .github/workflows/ci.yml (+2 -0)
📝 scripts/ci/scopes.mjs (+3 -0)
📝 src/domain/localPath.ts (+3 -1)
📝 tests/boundary/mcp/advertisedPatternsVMode.test.ts (+97 -82)
📝 tests/process-global/curatedWindowsLane.test.ts (+2 -0)

📄 Description

Summary

Windows MCP catalogs advertised an absolute-path pattern that clients compiling JSON Schema patterns with the JavaScript v flag cannot parse. Spell the shared slash as \x2f so tool discovery succeeds while preserving accepted paths.

No linked issue: this is a focused compatibility fix reproduced locally.

Problem and expected behavior

The Windows pattern contains an unescaped / inside a character class. REA's u-mode validation accepts it, but v-mode compilation rejects it; one invalid pattern can prevent a client from accepting the complete tool catalog. Advertised patterns must compile in traditional, u, and v JavaScript modes.

Change and scope

Fix the representation at absoluteLocalPathStringSchema, reused by its contracts, instead of repairing individual tools. Exercise both compact and full input projections with full output schemas, and add path semantics and advertised-pattern tests to the Windows lane and its change-scope selection.

This is an ordinary compatibility correction within the existing contribution scope; a new provider/target-execution scope decision is not applicable.

Contract and boundary impact

  • Semantic owner: src/domain/localPath.ts; earliest change is the shared path schema's regex spelling.
  • CLI/MCP compatibility: identical accepted path values; the advertised Windows schema becomes compatible with v-mode consumers. Existing provider and Evidence semantics are unchanged.
  • Target selection, authority, upstream behavior, and cleanup: no new operations or effects; schema discovery uses a fixture that rejects deep-provider startup.
  • Generated metadata/package impact: regenerated catalogs reflect the schema spelling; no package version or installation changes. Ignored catalogs and build outputs are not committed.

Expected effects: this patch adds no target interaction. Validation starts the local MCP server and reads a synthetic fixture; it does not establish deep-provider behavior.

Evidence and regression coverage

  • Historical local evidence recorded on 2026-10-22, base 2589c0074, fix b84a41d3a, Windows x64 / Node 24.18.0 / npm 11.16.0: the original advertised-pattern test failed with 46 invalid Windows pattern occurrences; the corrected regression compiles every advertised pattern with "", u, and v flags.
  • Historical compiled stdio MCP smoke: compact/full input catalogs each exposed 220 tools, with 1,617/2,123 pattern occurrences respectively. Both analyzed one synthetic safetensors tensor (peso, four F32 parameters), and discovery stayed stable after the call.
  • Static review of the five-file diff found no blocking issue in the shared schema consumers, regression assertions, or Windows lane selection.
  • Current-session Windows verification (2026-10-23): the actual Codex and Claude Code launch registrations each started a fresh stdio server, listed 220 tools, passed v-mode pattern compilation, and answered binary_session.
  • Proof gaps: active desktop sessions were not restarted, remote CI and the full test suite have not run, and JS compilation does not prove every external schema consumer accepts the catalog.

Validation performed

Historical executions recorded on 2026-10-22 (not newly executed during PR-body preparation):

  • npm run test:focused -- tests/boundary/mcp/advertisedPatternsVMode.test.ts before the fix — failed on Windows pattern compilation.
  • npm run test:focused -- src/domain/localPath.test.ts src/domain/absoluteAnalysisInputPaths.test.ts src/contracts/sessionPathInputs.test.ts tests/boundary/mcp/advertisedPatternsVMode.test.ts tests/process-global/curatedWindowsLane.test.ts — 38 tests passed across five files.
  • npm run check:fast — typecheck, lint, and module boundaries passed; existing warnings remained.
  • The owns every explicit native-host test path case from ciChangeScope.test.ts — one test passed; other tests in that file were not run.
  • Compiled SDK client over stdio (scripts/rea.mjs mcp) — both catalog profiles and synthetic analysis passed as described above.
  • git diff --check and commit formatting/lint hooks — passed.

Executed on 2026-10-23, same patch revision:

  • npm run check with pinned Node 24.18.0/npm 11.16.0 — all six tasks passed, including typecheck, lint, formatting, knip, metadata and architecture guards. Existing lint warnings remain.
  • npm run docs:check — generated-document checks passed; all nine README consistency tests passed.
  • Fresh SDK clients launched from the actual Codex and Claude Code registrations — both passed discovery, v-mode schema compilation and session-status calls. This does not attest that already-running desktop sessions reconnected.
  • Existing verify-real-ghidra-windows.mjs lane with Ghidra 12.1.4/JDK 21 and the repository-owned x64 PE fixture — 27 provider operations passed, including decompilation; file-offset CLI/MCP parity and source-unchanged/cleanup checks passed. An initial sandbox attempt failed with Win32 access denied while creating the private snapshot; the authorized host execution passed. The verifier-wide process-lineage observation remains unavailable on Windows; provider-owned cleanup checks passed. This is supplemental existing-provider coverage, not a new capability.

Compatibility, safety, and release

  • Breaking changes/migration: none; regex spelling changes, path semantics remain the same.
  • Real platform/provider coverage: Windows x64 stdio MCP and the existing Ghidra verification lane on a synthetic PE fixture, as described above. Hopper, IDA, other PE architectures and active desktop-session reconnection remain unverified.
  • Release impact: no version bump or committed generated outputs.
  • Security/privacy/process impact: no new target execution, mutation, network, persistence, or cleanup capability.

Author readiness

Human owner: @jokken79

  • 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.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/6429 **Author:** [@jokken79](https://github.com/jokken79) **Created:** 10/23/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/windows-mcp-path-pattern` --- ### 📝 Commits (1) - [`b84a41d`](https://github.com/morluto/rea/commit/b84a41d3ac8d4c4e1c71beb37a9c575ec34657a1) fix(mcp): publish portable Windows absolute path patterns ### 📊 Changes **5 files changed** (+107 additions, -83 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+2 -0) 📝 `scripts/ci/scopes.mjs` (+3 -0) 📝 `src/domain/localPath.ts` (+3 -1) 📝 `tests/boundary/mcp/advertisedPatternsVMode.test.ts` (+97 -82) 📝 `tests/process-global/curatedWindowsLane.test.ts` (+2 -0) </details> ### 📄 Description ## Summary Windows MCP catalogs advertised an absolute-path pattern that clients compiling JSON Schema patterns with the JavaScript `v` flag cannot parse. Spell the shared slash as `\x2f` so tool discovery succeeds while preserving accepted paths. No linked issue: this is a focused compatibility fix reproduced locally. ## Problem and expected behavior The Windows pattern contains an unescaped `/` inside a character class. REA's `u`-mode validation accepts it, but `v`-mode compilation rejects it; one invalid pattern can prevent a client from accepting the complete tool catalog. Advertised patterns must compile in traditional, `u`, and `v` JavaScript modes. ## Change and scope Fix the representation at `absoluteLocalPathStringSchema`, reused by its contracts, instead of repairing individual tools. Exercise both compact and full input projections with full output schemas, and add path semantics and advertised-pattern tests to the Windows lane and its change-scope selection. This is an ordinary compatibility correction within the existing [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope); a new provider/target-execution scope decision is not applicable. ## Contract and boundary impact - Semantic owner: `src/domain/localPath.ts`; earliest change is the shared path schema's regex spelling. - CLI/MCP compatibility: identical accepted path values; the advertised Windows schema becomes compatible with `v`-mode consumers. Existing provider and Evidence semantics are unchanged. - Target selection, authority, upstream behavior, and cleanup: no new operations or effects; schema discovery uses a fixture that rejects deep-provider startup. - Generated metadata/package impact: regenerated catalogs reflect the schema spelling; no package version or installation changes. Ignored catalogs and build outputs are not committed. Expected effects: this patch adds no target interaction. Validation starts the local MCP server and reads a synthetic fixture; it does not establish deep-provider behavior. ## Evidence and regression coverage - Historical local evidence recorded on 2026-10-22, base `2589c0074`, fix `b84a41d3a`, Windows x64 / Node 24.18.0 / npm 11.16.0: the original advertised-pattern test failed with 46 invalid Windows pattern occurrences; the corrected regression compiles every advertised pattern with `""`, `u`, and `v` flags. - Historical compiled stdio MCP smoke: compact/full input catalogs each exposed 220 tools, with 1,617/2,123 pattern occurrences respectively. Both analyzed one synthetic safetensors tensor (`peso`, four F32 parameters), and discovery stayed stable after the call. - Static review of the five-file diff found no blocking issue in the shared schema consumers, regression assertions, or Windows lane selection. - Current-session Windows verification (2026-10-23): the actual Codex and Claude Code launch registrations each started a fresh stdio server, listed 220 tools, passed `v`-mode pattern compilation, and answered `binary_session`. - Proof gaps: active desktop sessions were not restarted, remote CI and the full test suite have not run, and JS compilation does not prove every external schema consumer accepts the catalog. ## Validation performed Historical executions recorded on 2026-10-22 (not newly executed during PR-body preparation): - `npm run test:focused -- tests/boundary/mcp/advertisedPatternsVMode.test.ts` before the fix — failed on Windows pattern compilation. - `npm run test:focused -- src/domain/localPath.test.ts src/domain/absoluteAnalysisInputPaths.test.ts src/contracts/sessionPathInputs.test.ts tests/boundary/mcp/advertisedPatternsVMode.test.ts tests/process-global/curatedWindowsLane.test.ts` — 38 tests passed across five files. - `npm run check:fast` — typecheck, lint, and module boundaries passed; existing warnings remained. - The `owns every explicit native-host test path` case from `ciChangeScope.test.ts` — one test passed; other tests in that file were not run. - Compiled SDK client over stdio (`scripts/rea.mjs mcp`) — both catalog profiles and synthetic analysis passed as described above. - `git diff --check` and commit formatting/lint hooks — passed. Executed on 2026-10-23, same patch revision: - `npm run check` with pinned Node 24.18.0/npm 11.16.0 — all six tasks passed, including typecheck, lint, formatting, knip, metadata and architecture guards. Existing lint warnings remain. - `npm run docs:check` — generated-document checks passed; all nine README consistency tests passed. - Fresh SDK clients launched from the actual Codex and Claude Code registrations — both passed discovery, `v`-mode schema compilation and session-status calls. This does not attest that already-running desktop sessions reconnected. - Existing `verify-real-ghidra-windows.mjs` lane with Ghidra 12.1.4/JDK 21 and the repository-owned x64 PE fixture — 27 provider operations passed, including decompilation; file-offset CLI/MCP parity and source-unchanged/cleanup checks passed. An initial sandbox attempt failed with Win32 access denied while creating the private snapshot; the authorized host execution passed. The verifier-wide process-lineage observation remains unavailable on Windows; provider-owned cleanup checks passed. This is supplemental existing-provider coverage, not a new capability. ## Compatibility, safety, and release - Breaking changes/migration: none; regex spelling changes, path semantics remain the same. - Real platform/provider coverage: Windows x64 stdio MCP and the existing Ghidra verification lane on a synthetic PE fixture, as described above. Hopper, IDA, other PE architectures and active desktop-session reconnection remain unverified. - Release impact: no version bump or committed generated outputs. - Security/privacy/process impact: no new target execution, mutation, network, persistence, or cleanup capability. ## Author readiness Human owner: @jokken79 - [ ] 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. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:47:16 +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#7354
No description provided.