[PR #5763] [MERGED] fix(artifacts): report target applicability in session discovery #7044

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5763
Author: @jdotc1
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @morluto

Base: main ← Head: fix/5731-artifact-availability


📝 Commits (3)

  • d12613f fix(artifacts): report target applicability in session discovery
  • 18aca6a fix(artifacts): preserve resolved target applicability facts
  • 06cc3ef fix(target): retain bundle metadata for explicit formats

📊 Changes

7 files changed (+259 additions, -39 deletions)

View changed files

📝 src/application/BinaryTargetResolver.ts (+2 -0)
📝 src/application/CapabilityInventory.ts (+9 -0)
📝 src/application/binary/BinarySessionStatus.test.ts (+33 -1)
📝 src/application/binary/BinarySessionStatus.ts (+12 -0)
📝 src/artifacts/ArtifactProvider.ts (+8 -38)
➕ src/domain/apple/artifactTargetApplicability.ts (+46 -0)
📝 tests/boundary/mcp/artifactMcp.test.ts (+149 -0)

📄 Description

Fixes #5731.

With a ZIP or ordinary plist open, binary_session could advertise app-resource operations that immediately refuse the selected target. Discovery and execution now share one target-applicability decision. ZIP refuses the four affected operations; plist retains keyed-archive inspection; genuine app bundles retain applicable resource operations; standalone Mach-O retains dylib resolution. Ordinary plist content can still fail keyed-archive validation when invoked. Before opening a target, discovery still reports target_required.

Bundle identity comes from resolver-owned Info.plist metadata, including explicit raw-binary/dos-com bundle opens. A standalone Mach-O file named Tool.app remains standalone. Shared refusals carry the correct target-kind or target-format category; ELF/PE executable dylib discovery reports target_format_unsupported. Provider execution retains typed unsupported_target refusals. No public schema, authority, package or installation changes.

Validation on macOS arm64, Node 26.12.0/npm 11.20.0:

  • npm run typecheck and npm run build:cached: passed on the final correction; two ineffective-dynamic-import build warnings.
  • node node_modules/vitest/vitest.mjs run --project mcp-boundary tests/boundary/mcp/artifactMcp.test.ts -t 'discovers artifact target prerequisites': one selected control passed, ten skipped. Covers missing target, ZIP, ordinary/keyed plist, standalone Mach-O, regular Tool.app, genuine app, and explicit raw-binary/dos-com app opens. Keyed plist and both explicit-format bundle archive reads succeed; unsupported direct calls retain typed refusals.
  • 34 inventory/status controls passed after the shared-refusal correction; unchanged projection checks were reused for the final resolver-only correction.
  • Focused lint and diff whitespace checks passed, with existing complexity/length warnings.

The issue's stdio baseline receipts were reused. The new MCP control uses production session/server with linked in-memory transports; it does not establish new stdio transport coverage, real asset decoding or dylib traversal. The pinned Node 24.18.0/npm 11.16.0 toolchain, full static gate and broader suite were not exercised. No target code was executed.

Author readiness

Human owner: @jdotc1


🔄 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/5763 **Author:** [@jdotc1](https://github.com/jdotc1) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/5731-artifact-availability` --- ### 📝 Commits (3) - [`d12613f`](https://github.com/morluto/rea/commit/d12613f9c9ac944ee9f5b69f72dd64b3a0419dbe) fix(artifacts): report target applicability in session discovery - [`18aca6a`](https://github.com/morluto/rea/commit/18aca6ac826d061246297eda0f805d2f3d957b76) fix(artifacts): preserve resolved target applicability facts - [`06cc3ef`](https://github.com/morluto/rea/commit/06cc3efd20a1e821ed5319d1b406c26972094e2f) fix(target): retain bundle metadata for explicit formats ### 📊 Changes **7 files changed** (+259 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `src/application/BinaryTargetResolver.ts` (+2 -0) 📝 `src/application/CapabilityInventory.ts` (+9 -0) 📝 `src/application/binary/BinarySessionStatus.test.ts` (+33 -1) 📝 `src/application/binary/BinarySessionStatus.ts` (+12 -0) 📝 `src/artifacts/ArtifactProvider.ts` (+8 -38) ➕ `src/domain/apple/artifactTargetApplicability.ts` (+46 -0) 📝 `tests/boundary/mcp/artifactMcp.test.ts` (+149 -0) </details> ### 📄 Description Fixes #5731. With a ZIP or ordinary plist open, `binary_session` could advertise app-resource operations that immediately refuse the selected target. Discovery and execution now share one target-applicability decision. ZIP refuses the four affected operations; plist retains keyed-archive inspection; genuine app bundles retain applicable resource operations; standalone Mach-O retains dylib resolution. Ordinary plist content can still fail keyed-archive validation when invoked. Before opening a target, discovery still reports `target_required`. Bundle identity comes from resolver-owned Info.plist metadata, including explicit raw-binary/dos-com bundle opens. A standalone Mach-O file named Tool.app remains standalone. Shared refusals carry the correct target-kind or target-format category; ELF/PE executable dylib discovery reports `target_format_unsupported`. Provider execution retains typed `unsupported_target` refusals. No public schema, authority, package or installation changes. Validation on macOS arm64, Node 26.12.0/npm 11.20.0: - `npm run typecheck` and `npm run build:cached`: passed on the final correction; two ineffective-dynamic-import build warnings. - `node node_modules/vitest/vitest.mjs run --project mcp-boundary tests/boundary/mcp/artifactMcp.test.ts -t 'discovers artifact target prerequisites'`: one selected control passed, ten skipped. Covers missing target, ZIP, ordinary/keyed plist, standalone Mach-O, regular Tool.app, genuine app, and explicit raw-binary/dos-com app opens. Keyed plist and both explicit-format bundle archive reads succeed; unsupported direct calls retain typed refusals. - 34 inventory/status controls passed after the shared-refusal correction; unchanged projection checks were reused for the final resolver-only correction. - Focused lint and diff whitespace checks passed, with existing complexity/length warnings. The issue's stdio baseline receipts were reused. The new MCP control uses production session/server with linked in-memory transports; it does not establish new stdio transport coverage, real asset decoding or dylib traversal. The pinned Node 24.18.0/npm 11.16.0 toolchain, full static gate and broader suite were not exercised. No target code was executed. ## Author readiness Human owner: @jdotc1 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:44:56 +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#7044
No description provided.