[PR #2906] [MERGED] fix(native): accept declared facts in dispatch name inventory #5487

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2906
Author: @ShitK
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/native-dispatch-symbol-inventory


📝 Commits (1)

  • 76b563d fix(native): accept declared facts in dispatch name inventory

📊 Changes

3 files changed (+145 additions, -15 deletions)

View changed files

📝 src/application/native/EnhancedNativeInvestigation.test.ts (+129 -12)
📝 src/application/native/NativeDispatchMetadataInspection.ts (+6 -2)
📝 tests/boundary/mcp/enhancedTools.01-lists-the-complete-target-open.test.ts (+10 -1)

📄 Description

Summary

Fixes #2564.

Accept declared symbol facts in the list_names fallback used by native dispatch inspection and UI action tracing. Previously, valid inventory records with these facts failed as unreadable_output.

Problem and expected behavior

The fallback's local strict schemas recognized only address and value (or legacy name), contradicting the existing inventory contract's optional fields. Valid provider results should reach symbol-based dispatch analysis; malformed inventory should still fail validation.

Change and scope

Reuse the canonical addressedValue schema with strict top-level validation, deriving the legacy name variant from the same schema. This removes the duplicated inventory definition while retaining rejection of undeclared top-level fields and malformed declared facts. Dispatch inference remains based on symbol names, with partial and unsupported coverage reported as before.

Contract and boundary impact

  • Semantic owner: the existing inventory contract; the changed stage is application validation of the list_names fallback.
  • Ordinary compatibility fix within existing scope; a separate maintainer scope decision is not applicable.
  • Public request/output schemas, provider protocols, target authority, provenance, and cleanup behavior are unchanged. No new target operations, generated outputs, package metadata, or installation changes are introduced.

Evidence and regression coverage

On base 7e3a19863835215491b55fba7127a78bad6a7709, the updated regression suite produced 4 failures and 24 passes, including an unreadable_output failure through the MCP SDK boundary.

Tests cover plain inventory, declared symbol facts with both value and legacy name, target/provider identity, conservative symbol-only coverage, and rejection of malformed fields in both dispatch inspection and UI tracing. The existing MCP fixture now supplies declared symbol facts to exercise both public tools.

Validation performed

macOS arm64, Node.js 24.18.0, npm 11.16.0:

  • Direct Vitest run of src/application/native/EnhancedNativeInvestigation.test.ts, tests/boundary/mcp/enhancedTools.01-lists-the-complete-target-open.test.ts, and src/domain/native/objcSwiftMetadata.test.ts — 29 passed (26 + 2 + 1).
  • Touched-file lint and format checks, module boundaries (1,756 source files), architecture guards (1,321), and test discovery (1,108 test files) — passed.
  • Independent read-only diff review — no actionable findings.
  • Normal pre-commit checks and git diff --check — passed.
  • npm run knip — blocked by unresolved #javascript-analysis-worker, whose package import points to the missing compiled worker artifact. This also reproduces on the pristine base without build outputs.
  • npm run check — blocked by existing formatting failures in functionComparison.test.ts and IdaOperationRunner.ts.

The final full TypeScript check reports the same pre-existing errors as the base: SupportedClients.ts:542,744,809 rejects the devin format (TS2322), clientProfileLifecycle.test.ts:297 reports TS2345, and ghidraInventoryMcp.test.ts:4,17 has duplicate join imports (TS2300). These failures were independently reproduced on a pristine export of this exact base with the same runtime. Standard checks remain blocked. The normal pre-push hook failed on the unchanged duplicate join import; the branch was pushed with a one-command HUSKY=0 override.

Compatibility, safety, and release

No migration is needed. MCP coverage uses the actual SDK with an in-memory transport and simulated analysis port. Real Ghidra was unavailable locally (no JDK/Ghidra); no real-engine, compiled CLI, stdio, or CI verification is claimed. The issue's external live reproduction is not local verification. This fix was prepared with AI assistance.

Before merge

  • Focused fix linked to its issue, with regression coverage for both affected consumers and invalid input.
  • Canonical inventory validation and conservative coverage are preserved.
  • Standard checks and CI pass; resolve or re-evaluate the documented base failures.

🔄 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/2906 **Author:** [@ShitK](https://github.com/ShitK) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/native-dispatch-symbol-inventory` --- ### 📝 Commits (1) - [`76b563d`](https://github.com/morluto/rea/commit/76b563d127e5719279ee0b4e1451f89b92f08dd8) fix(native): accept declared facts in dispatch name inventory ### 📊 Changes **3 files changed** (+145 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/application/native/EnhancedNativeInvestigation.test.ts` (+129 -12) 📝 `src/application/native/NativeDispatchMetadataInspection.ts` (+6 -2) 📝 `tests/boundary/mcp/enhancedTools.01-lists-the-complete-target-open.test.ts` (+10 -1) </details> ### 📄 Description ## Summary Fixes #2564. Accept declared `symbol` facts in the `list_names` fallback used by native dispatch inspection and UI action tracing. Previously, valid inventory records with these facts failed as `unreadable_output`. ## Problem and expected behavior The fallback's local strict schemas recognized only `address` and `value` (or legacy `name`), contradicting the existing inventory contract's optional fields. Valid provider results should reach symbol-based dispatch analysis; malformed inventory should still fail validation. ## Change and scope Reuse the canonical `addressedValue` schema with strict top-level validation, deriving the legacy `name` variant from the same schema. This removes the duplicated inventory definition while retaining rejection of undeclared top-level fields and malformed declared facts. Dispatch inference remains based on symbol names, with partial and unsupported coverage reported as before. ## Contract and boundary impact - Semantic owner: the existing inventory contract; the changed stage is application validation of the `list_names` fallback. - Ordinary compatibility fix within existing scope; a separate maintainer scope decision is not applicable. - Public request/output schemas, provider protocols, target authority, provenance, and cleanup behavior are unchanged. No new target operations, generated outputs, package metadata, or installation changes are introduced. ## Evidence and regression coverage On base `7e3a19863835215491b55fba7127a78bad6a7709`, the updated regression suite produced **4 failures and 24 passes**, including an `unreadable_output` failure through the MCP SDK boundary. Tests cover plain inventory, declared symbol facts with both `value` and legacy `name`, target/provider identity, conservative symbol-only coverage, and rejection of malformed fields in both dispatch inspection and UI tracing. The existing MCP fixture now supplies declared symbol facts to exercise both public tools. ## Validation performed macOS arm64, Node.js 24.18.0, npm 11.16.0: - Direct Vitest run of `src/application/native/EnhancedNativeInvestigation.test.ts`, `tests/boundary/mcp/enhancedTools.01-lists-the-complete-target-open.test.ts`, and `src/domain/native/objcSwiftMetadata.test.ts` — **29 passed** (26 + 2 + 1). - Touched-file lint and format checks, module boundaries (1,756 source files), architecture guards (1,321), and test discovery (1,108 test files) — passed. - Independent read-only diff review — no actionable findings. - Normal pre-commit checks and `git diff --check` — passed. - `npm run knip` — blocked by unresolved `#javascript-analysis-worker`, whose package import points to the missing compiled worker artifact. This also reproduces on the pristine base without build outputs. - `npm run check` — blocked by existing formatting failures in `functionComparison.test.ts` and `IdaOperationRunner.ts`. The final full TypeScript check reports the same pre-existing errors as the base: `SupportedClients.ts:542,744,809` rejects the `devin` format (TS2322), `clientProfileLifecycle.test.ts:297` reports TS2345, and `ghidraInventoryMcp.test.ts:4,17` has duplicate `join` imports (TS2300). These failures were independently reproduced on a pristine export of this exact base with the same runtime. Standard checks remain blocked. The normal pre-push hook failed on the unchanged duplicate `join` import; the branch was pushed with a one-command `HUSKY=0` override. ## Compatibility, safety, and release No migration is needed. MCP coverage uses the actual SDK with an in-memory transport and simulated analysis port. Real Ghidra was unavailable locally (no JDK/Ghidra); no real-engine, compiled CLI, stdio, or CI verification is claimed. The issue's external live reproduction is not local verification. This fix was prepared with AI assistance. ## Before merge - [x] Focused fix linked to its issue, with regression coverage for both affected consumers and invalid input. - [x] Canonical inventory validation and conservative coverage are preserved. - [ ] Standard checks and CI pass; resolve or re-evaluate the documented base failures. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:07:02 +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#5487
No description provided.