[PR #4647] [CLOSED] fix(cli): return canonical Frida device identifiers #6340

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4647
Author: @Shreyansh1729
Created: 10/17/2026
Status: ❌ Closed

Base: main ← Head: contrib/frida-device-output


📝 Commits (1)

  • a97ec10 fix(cli): return canonical Frida device identifiers

📊 Changes

4 files changed (+70 additions, -13 deletions)

View changed files

📝 src/application/frida/FridaInstrumentationService.ts (+15 -0)
📝 src/cli/fridaCommands.ts (+2 -4)
📝 src/server/registerFridaTools.ts (+5 -9)
📝 tests/boundary/cli/fridaCli.test.ts (+48 -0)

📄 Description

Summary

Fixes #4637.

Nonempty list-frida-devices --json results exposed internal deviceId keys and failed the shared public output schema. CLI and MCP now share one application-owned device-list projection, returning device_id and preserving device values and cleanup status.

Change and scope

Application result projection; CLI and MCP adapters consume the same mapper. The existing public contract is unchanged. Discovery, remote selection, provider cleanup and retained partial observations keep their existing semantics.

Routine correction within existing contribution boundaries; a new maintainer scope decision is not applicable. No new provider or target execution capability is introduced.

Evidence and regression coverage

Added three CLI cases: empty inventory, local inventory, and remote inventory with a cleanup diagnostic. Both nonempty cases failed against the base projection; the empty control passed. Existing MCP schema and credential-redaction cases passed after the shared mapper change.

Validation performed

Rebased onto current main 150e996a86f2bec4982ba87f37bf502a8d5e8214.

  • npm run check — passed on the combined final working tree: typecheck, lint, formatting, unused-code detection, metadata, module boundaries and architecture guards.
  • npm run test:focused -- tests/boundary/cli/fridaCli.test.ts tests/boundary/mcp/fridaMcp.test.ts tests/boundary/mcp/promptMcp.test.ts tests/boundary/mcp/promptCompletion.test.ts tests/boundary/filesystem/ompClientConfiguration.test.ts — 40 tests passed across five files after rebasing.
  • npm run docs:check — passed after rebasing, including 5 README consistency tests.
  • npm run verify:test-discovery — all 1,460 test files discovered exactly once on the original working tree; no test files were added or moved.

The independent branches touch disjoint files. Checks above ran against their combined final contents using Node v24.18.0 and npm 11.16.0 on macOS arm64.

Compatibility and remaining coverage

Frida bindings and live devices were not exercised; tests use scoped provider observations. No target attach, spawn, or instrumentation authority changes.

No package version, generated catalog, dependency, or installation changes.

Author readiness

Human owner: @Shreyansh1729

  • 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/4647 **Author:** [@Shreyansh1729](https://github.com/Shreyansh1729) **Created:** 10/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `contrib/frida-device-output` --- ### 📝 Commits (1) - [`a97ec10`](https://github.com/morluto/rea/commit/a97ec108f0c15996db3f9e68b8eeb8f779166344) fix(cli): return canonical Frida device identifiers ### 📊 Changes **4 files changed** (+70 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/application/frida/FridaInstrumentationService.ts` (+15 -0) 📝 `src/cli/fridaCommands.ts` (+2 -4) 📝 `src/server/registerFridaTools.ts` (+5 -9) 📝 `tests/boundary/cli/fridaCli.test.ts` (+48 -0) </details> ### 📄 Description ## Summary Fixes #4637. Nonempty `list-frida-devices --json` results exposed internal `deviceId` keys and failed the shared public output schema. CLI and MCP now share one application-owned device-list projection, returning `device_id` and preserving device values and cleanup status. ## Change and scope Application result projection; CLI and MCP adapters consume the same mapper. The existing public contract is unchanged. Discovery, remote selection, provider cleanup and retained partial observations keep their existing semantics. Routine correction within existing contribution boundaries; a new maintainer scope decision is not applicable. No new provider or target execution capability is introduced. ## Evidence and regression coverage Added three CLI cases: empty inventory, local inventory, and remote inventory with a cleanup diagnostic. Both nonempty cases failed against the base projection; the empty control passed. Existing MCP schema and credential-redaction cases passed after the shared mapper change. ## Validation performed Rebased onto current main `150e996a86f2bec4982ba87f37bf502a8d5e8214`. - `npm run check` — passed on the combined final working tree: typecheck, lint, formatting, unused-code detection, metadata, module boundaries and architecture guards. - `npm run test:focused -- tests/boundary/cli/fridaCli.test.ts tests/boundary/mcp/fridaMcp.test.ts tests/boundary/mcp/promptMcp.test.ts tests/boundary/mcp/promptCompletion.test.ts tests/boundary/filesystem/ompClientConfiguration.test.ts` — 40 tests passed across five files after rebasing. - `npm run docs:check` — passed after rebasing, including 5 README consistency tests. - `npm run verify:test-discovery` — all 1,460 test files discovered exactly once on the original working tree; no test files were added or moved. The independent branches touch disjoint files. Checks above ran against their combined final contents using Node v24.18.0 and npm 11.16.0 on macOS arm64. ## Compatibility and remaining coverage Frida bindings and live devices were not exercised; tests use scoped provider observations. No target attach, spawn, or instrumentation authority changes. No package version, generated catalog, dependency, or installation changes. ## Author readiness Human owner: @Shreyansh1729 - [ ] 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:41 +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#6340
No description provided.