[PR #6377] [CLOSED] fix(discovery): report unsupported_host for Linux-only tools off Linux (#5730) #7320

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6377
Author: @agnaylor
Created: 10/22/2026
Status: ❌ Closed

Base: main ← Head: pr/unsupported-host-5730


📝 Commits (1)

  • f9cf7f6 fix(discovery): report unsupported_host for Linux-only tools off Linux (#5730)

📊 Changes

4 files changed (+151 additions, -36 deletions)

View changed files

📝 docs/mcp-contracts.md (+11 -0)
📝 src/application/CapabilityInventory.test.ts (+75 -0)
📝 src/application/CapabilityInventory.ts (+63 -35)
📝 src/server/sessionAvailabilityPolicy.ts (+2 -1)

📄 Description

Summary

Fixes #5730. On macOS and Windows, binary_session {} reported the Linux-only tools (inspect_binary_layout, inspect_recorded_crash, inspect_signal_decoders, decode_signal_recording, inspect_evm_interface, and likewise the packet-capture, firmware and recover_javascript_sources tools) as unavailable with reason provider_missing, although their remediation already names Linux. The unavailable flag was right; the machine-readable reason confused an unsupported host with a missing provider.

Problem and expected behavior

Trigger: target-free binary_session {} on a non-Linux host. Violated invariant: unsupported_host exists in the availability vocabulary for exactly this case and the same server returns typed Linux-host refusals on execution. Expected: unsupported_host off Linux (and on non-x64 Linux for the x64-only providers), provider_missing only on a Linux host without the provider.

Change and scope

AvailabilityPolicy gains an optional host fact (platform, arch), filled from Node's process facts where the session policy is built (src/server/sessionAvailabilityPolicy.ts). One helper, linuxOnlyUnavailable, decides the reason for every Linux-only tool: unsupported_host on a known non-Linux host (or non-x64 Linux for the pwntools, EVM and Wakaru providers), provider_missing on Linux or when the host is unknown. An injected provider still makes the tool available on any host, so existing tests with fake providers are unaffected. The remediation text is unchanged. docs/mcp-contracts.md documents the two reasons.

Contribution scope: ordinary fix inside the discovery boundary; not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/application/CapabilityInventory.ts, the owner of availability reasons; the host fact enters at the session policy.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: tool_availability.groups[].reason changes from provider_missing to unsupported_host for the listed tools on non-Linux hosts; the vocabulary itself is unchanged.
  • Provider, bridge, target-format, or platform compatibility: platform-aware reason only; no provider behavior changes.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details: not applicable.
  • Generated metadata, package, or installation impact: none (reasons are per-session, not catalog metadata).

Expected effects:

  • Documentation or usability only; no target interaction.

Evidence and regression coverage

  • Tests added in src/application/CapabilityInventory.test.ts: each of eight Linux-only tools reports unsupported_host on simulated darwin/arm64 and win32/x64 hosts with a remediation that names Linux; provider_missing on linux/x64 without the provider; the x64-only tools report unsupported_host on linux/arm64 while the Linux-any tools report provider_missing there; an unknown host keeps provider_missing; an injected provider on darwin is available.
  • Base reproduction: a live stdio MCP probe on Windows 11 (binary_session {} plus three calls on one connection) showed provider_missing for the three groups before the change and unsupported_host after, with the calls returning capability_unavailable both times.
  • User-visible output: {"availability":["inspect_binary_layout","inspect_recorded_crash"],"available":false,"reason":"unsupported_host"}.
  • Remaining proof gaps: macOS, the issue's host, was simulated through the policy, not run.

Validation performed

  • npm run test:focused -- src/application/CapabilityInventory.test.ts tests/boundary/evm/evmLimiterAvailability.test.ts on Windows 11 (Ales), Node 24.19.0 — 48 passed (48), on this branch against upstream main 957bcfa14
  • npm run check:fast — typecheck and lint, 2 of 2 tasks successful (branch rebased on upstream main 957bcfa14)

Compatibility, safety, and release

  • Breaking changes or migration steps: clients that keyed on provider_missing for these tools on non-Linux hosts will now see unsupported_host, which is the documented meaning; no API shape change.
  • Real Hopper/Ghidra, browser, or OS coverage: Windows 11 live; macOS simulated.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner: @agnaylor

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

🤖 Generated with Claude Code


🔄 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/6377 **Author:** [@agnaylor](https://github.com/agnaylor) **Created:** 10/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/unsupported-host-5730` --- ### 📝 Commits (1) - [`f9cf7f6`](https://github.com/morluto/rea/commit/f9cf7f61ac6f7cec932ec474bdd477bd6b9d6d48) fix(discovery): report unsupported_host for Linux-only tools off Linux (#5730) ### 📊 Changes **4 files changed** (+151 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `docs/mcp-contracts.md` (+11 -0) 📝 `src/application/CapabilityInventory.test.ts` (+75 -0) 📝 `src/application/CapabilityInventory.ts` (+63 -35) 📝 `src/server/sessionAvailabilityPolicy.ts` (+2 -1) </details> ### 📄 Description ## Summary Fixes #5730. On macOS and Windows, `binary_session {}` reported the Linux-only tools (`inspect_binary_layout`, `inspect_recorded_crash`, `inspect_signal_decoders`, `decode_signal_recording`, `inspect_evm_interface`, and likewise the packet-capture, firmware and `recover_javascript_sources` tools) as unavailable with reason `provider_missing`, although their remediation already names Linux. The unavailable flag was right; the machine-readable reason confused an unsupported host with a missing provider. ## Problem and expected behavior Trigger: target-free `binary_session {}` on a non-Linux host. Violated invariant: `unsupported_host` exists in the availability vocabulary for exactly this case and the same server returns typed Linux-host refusals on execution. Expected: `unsupported_host` off Linux (and on non-x64 Linux for the x64-only providers), `provider_missing` only on a Linux host without the provider. ## Change and scope `AvailabilityPolicy` gains an optional `host` fact (`platform`, `arch`), filled from Node's process facts where the session policy is built (`src/server/sessionAvailabilityPolicy.ts`). One helper, `linuxOnlyUnavailable`, decides the reason for every Linux-only tool: `unsupported_host` on a known non-Linux host (or non-x64 Linux for the pwntools, EVM and Wakaru providers), `provider_missing` on Linux or when the host is unknown. An injected provider still makes the tool available on any host, so existing tests with fake providers are unaffected. The remediation text is unchanged. `docs/mcp-contracts.md` documents the two reasons. Contribution scope: ordinary fix inside the discovery boundary; not applicable. ## Contract and boundary impact - Semantic owner and earliest changed stage: `src/application/CapabilityInventory.ts`, the owner of availability reasons; the host fact enters at the session policy. - Contribution scope fit and linked maintainer decision: not applicable. - CLI and MCP/tool-catalog contract: `tool_availability.groups[].reason` changes from `provider_missing` to `unsupported_host` for the listed tools on non-Linux hosts; the vocabulary itself is unchanged. - Provider, bridge, target-format, or platform compatibility: platform-aware reason only; no provider behavior changes. - Evidence, artifact, provenance, or reconstruction contract: none. - Target selection, authority, upstream behavior, and cleanup details: not applicable. - Generated metadata, package, or installation impact: none (reasons are per-session, not catalog metadata). Expected effects: - [x] Documentation or usability only; no target interaction. ## Evidence and regression coverage - Tests added in `src/application/CapabilityInventory.test.ts`: each of eight Linux-only tools reports `unsupported_host` on simulated darwin/arm64 and win32/x64 hosts with a remediation that names Linux; `provider_missing` on linux/x64 without the provider; the x64-only tools report `unsupported_host` on linux/arm64 while the Linux-any tools report `provider_missing` there; an unknown host keeps `provider_missing`; an injected provider on darwin is available. - Base reproduction: a live stdio MCP probe on Windows 11 (`binary_session {}` plus three calls on one connection) showed `provider_missing` for the three groups before the change and `unsupported_host` after, with the calls returning `capability_unavailable` both times. - User-visible output: `{"availability":["inspect_binary_layout","inspect_recorded_crash"],"available":false,"reason":"unsupported_host"}`. - Remaining proof gaps: macOS, the issue's host, was simulated through the policy, not run. ## Validation performed - `npm run test:focused -- src/application/CapabilityInventory.test.ts tests/boundary/evm/evmLimiterAvailability.test.ts` on Windows 11 (Ales), Node 24.19.0 — 48 passed (48), on this branch against upstream main 957bcfa14 - `npm run check:fast` — typecheck and lint, 2 of 2 tasks successful (branch rebased on upstream main 957bcfa14) ## Compatibility, safety, and release - Breaking changes or migration steps: clients that keyed on `provider_missing` for these tools on non-Linux hosts will now see `unsupported_host`, which is the documented meaning; no API shape change. - Real Hopper/Ghidra, browser, or OS coverage: Windows 11 live; macOS simulated. - Package or release metadata impact: none. - Security, privacy, process, or containment review: none. ## Author readiness Human owner: @agnaylor - [ ] 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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:01 +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#7320
No description provided.