[PR #826] [MERGED] refactor: share Android and firmware provider factories #2268

Closed
opened 2026-10-16 21:16:30 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/826
Author: @N0zoM1z0
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @N0zoM1z0

Base: main ← Head: refactor/android-firmware-composition


📝 Commits (1)

  • 0933644 refactor: share Android and firmware provider factories

📊 Changes

13 files changed (+228 additions, -27 deletions)

View changed files

📝 .oxlintrc.json (+38 -4)
📝 docs/capability-migration.md (+27 -11)
📝 src/cli/androidCommands.ts (+4 -2)
📝 src/cli/firmwareCommands.ts (+2 -2)
➕ src/composition/android.ts (+9 -0)
➕ src/composition/firmware.ts (+9 -0)
📝 src/server/createServer.ts (+6 -4)
➕ tests/acceptance/nonBinaryComposition.test.ts (+88 -0)
📝 tests/boundary/android/jadxIntegration.test.ts (+17 -0)
📝 tests/boundary/firmware/firmwareIntegration.test.ts (+17 -0)
📝 tests/evaluation/moduleBoundaries.test.ts (+7 -0)
📝 tests/fixtures/android/jadx.ts (+2 -2)
📝 tests/fixtures/firmware/provider.ts (+2 -2)

📄 Description

Android and firmware currently construct their providers independently in CLI and MCP registration. Move that construction into two production factories behind the existing typed ports. Both callers keep their current environment/default and injected-port behavior. Each factory creates a fresh provider with its existing queue, cleanup-failure state and per-operation lifecycle; registration acquires no engine or workspace.

Route the existing subprocess protocol fixtures through those factories. Add compiled CLI/MCP configuration-error parity and independent-instance cleanup-failure regressions. Extend the import guards so application workflows use ports and only outer composition can construct these providers. No universal provider contract or module manifest is introduced.

Refs #740 (concrete Android/firmware T3 pilot; the roadmap remains open).

Verification:

  • npm run test:focused -- tests/boundary/android/jadxIntegration.test.ts tests/boundary/firmware/firmwareIntegration.test.ts tests/boundary/mcp/androidAnalysisMcp.test.ts tests/boundary/mcp/firmwareMcp.test.ts: 44 distinct cases passed across focused runs.
  • npm run test:focused -- tests/acceptance/nonBinaryComposition.test.ts: 2 passed.
  • npm run test:local -- tests/evaluation/moduleBoundaries.test.ts: 15 passed.
  • npm run verify:test-discovery: all 482 files found exactly once.
  • npm run check and npm run docs:check passed; generated public contracts and metadata are unchanged.
  • npm run verify:package passed, including installed CLI/MCP, all 126 advertised tools, target-free startup and isolated setup.

Real JADX/Binwalk/Unblob, Hopper and Ghidra verification was not run. The producer fixtures establish protocol/composition/lifecycle behavior, not decompiler or host-support claims. Existing provider code, resource limits and public tool schemas are unchanged.


🔄 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/826 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `refactor/android-firmware-composition` --- ### 📝 Commits (1) - [`0933644`](https://github.com/morluto/rea/commit/09336449ad8e7099c6fe9038ea3b5decf9c81b6f) refactor: share Android and firmware provider factories ### 📊 Changes **13 files changed** (+228 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `.oxlintrc.json` (+38 -4) 📝 `docs/capability-migration.md` (+27 -11) 📝 `src/cli/androidCommands.ts` (+4 -2) 📝 `src/cli/firmwareCommands.ts` (+2 -2) ➕ `src/composition/android.ts` (+9 -0) ➕ `src/composition/firmware.ts` (+9 -0) 📝 `src/server/createServer.ts` (+6 -4) ➕ `tests/acceptance/nonBinaryComposition.test.ts` (+88 -0) 📝 `tests/boundary/android/jadxIntegration.test.ts` (+17 -0) 📝 `tests/boundary/firmware/firmwareIntegration.test.ts` (+17 -0) 📝 `tests/evaluation/moduleBoundaries.test.ts` (+7 -0) 📝 `tests/fixtures/android/jadx.ts` (+2 -2) 📝 `tests/fixtures/firmware/provider.ts` (+2 -2) </details> ### 📄 Description Android and firmware currently construct their providers independently in CLI and MCP registration. Move that construction into two production factories behind the existing typed ports. Both callers keep their current environment/default and injected-port behavior. Each factory creates a fresh provider with its existing queue, cleanup-failure state and per-operation lifecycle; registration acquires no engine or workspace. Route the existing subprocess protocol fixtures through those factories. Add compiled CLI/MCP configuration-error parity and independent-instance cleanup-failure regressions. Extend the import guards so application workflows use ports and only outer composition can construct these providers. No universal provider contract or module manifest is introduced. Refs #740 (concrete Android/firmware T3 pilot; the roadmap remains open). Verification: - `npm run test:focused -- tests/boundary/android/jadxIntegration.test.ts tests/boundary/firmware/firmwareIntegration.test.ts tests/boundary/mcp/androidAnalysisMcp.test.ts tests/boundary/mcp/firmwareMcp.test.ts`: 44 distinct cases passed across focused runs. - `npm run test:focused -- tests/acceptance/nonBinaryComposition.test.ts`: 2 passed. - `npm run test:local -- tests/evaluation/moduleBoundaries.test.ts`: 15 passed. - `npm run verify:test-discovery`: all 482 files found exactly once. - `npm run check` and `npm run docs:check` passed; generated public contracts and metadata are unchanged. - `npm run verify:package` passed, including installed CLI/MCP, all 126 advertised tools, target-free startup and isolated setup. Real JADX/Binwalk/Unblob, Hopper and Ghidra verification was not run. The producer fixtures establish protocol/composition/lifecycle behavior, not decompiler or host-support claims. Existing provider code, resource limits and public tool schemas are unchanged. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:16:30 +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#2268
No description provided.