[PR #1580] [MERGED] fix(clients): preserve portable MCP schemas in native workflows #2985

Closed
opened 2026-10-17 21:12:35 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: test/commandcode-native-client-20261010


📝 Commits (8)

  • a8d0cf9 test(clients): verify native Command Code workflows
  • 8db062a Merge remote-tracking branch 'origin/main' into test/commandcode-native-client-20261010
  • b297cbf docs: synchronize Italian provider guide links
  • 1f3d1d7 fix(contracts): make ADB identifier patterns portable
  • bf9994a Merge remote-tracking branch 'origin/main' into test/commandcode-native-client-20261010
  • 3cd5715 chore: merge shared CI repairs from main
  • eae1ec2 chore: align ADB compatibility repair with main
  • 6b64683 fix(contracts): preserve portable ADB patterns after formatting

📊 Changes

5 files changed (+569 additions, -15 deletions)

View changed files

📝 docs/testing.md (+24 -0)
📝 package.json (+1 -0)
➕ scripts/verify-commandcode-client.mjs (+452 -0)
➕ src/domain/adb/adbDeviceAnalysis.test.ts (+82 -0)
📝 src/domain/adb/adbDeviceAnalysis.ts (+10 -15)

📄 Description

ADB input patterns with unescaped character-class hyphens fail Unicode-set schema validators, rejecting the entire MCP-enabled chat request before any tool executes. The formatter removes \- escapes under the source regex's u flag. Use durable \x2d escapes and the existing portable action identifier, share identical key constraints, and preserve the prior admission grammars and diagnostics. Closes #1581.

REA already supports Command Code configuration, but lacked a native client workflow check. Add an optional verifier using official command-code@1.79.2, its default deferred-schema interface, and a local OpenAI completions/SSE fixture, plus an ADB admission regression.

The lane runs under a disposable OS account because auth, MCP tokens and sessions use the actual home. It guards setup targets, preserves an unrelated registration and backups, checks idempotence, and activates the complete REA skill through native default shared-skill discovery. Native discovery advertises all 170 REA tools; exact-name search returns all input schemas for dialect validation. When the client saves the large schema result, a native shell query returns its count and complete artifact digest. Actual JavaScript analysis of a Unicode-path fixture delivers approximately 29 KB of full named-schema Evidence to the next model request.

Validation:

  • Source and production-only installed package: native Command Code ordinary chat and skill/search/analysis flows pass.
  • Native DeepSeek Harness 0.2.0-rc.2 ordinary chat and tool calls pass with complete exported-pattern checks. This fixture reproduced the pre-fix whole-request rejection; no live DeepSeek API claim.
  • Production-only Qwen 0.25.0, Pi 1.1.0, and pinned Hermes normal/sticky-profile workflows pass with the complete 170-tool inventory.
  • 31 focused ADB CLI/MCP, preserved-admission and full SDK-advertised pattern tests passed; the complete pattern regression failed on baseline. CLI option-alias regression, npm run check:fast and npm run docs:check pass.
  • Existing real pwntools environment: 149 public CLI/MCP and four bootstrap cases passed, with no target execution. The optional large-index lane was not requested.
  • Every completed native client run and the binary-layout run had verified empty descendant lists; a run-token scan found no remaining client/server processes.

The loopback BYOK model declares a million-token context with synthetic usage. A synthetic account-key value satisfies Command Code's print-mode gate, while native local-only mode refuses hosted API calls. Hosted authentication, live models, Windows clients, and real Android devices remain unverified. No real Hopper/Ghidra workflow was performed. Provider implementations are unchanged. The verifier creates no OS accounts and installs no clients.

Sanitized exported setting-key schema:

{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9._\\x2d]+$"}

🔄 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/1580 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `test/commandcode-native-client-20261010` --- ### 📝 Commits (8) - [`a8d0cf9`](https://github.com/morluto/rea/commit/a8d0cf99a88f0ad3a45d06ea5049030d9f51914b) test(clients): verify native Command Code workflows - [`8db062a`](https://github.com/morluto/rea/commit/8db062ae4bb319318f85dfb8703c12faf20b6c4a) Merge remote-tracking branch 'origin/main' into test/commandcode-native-client-20261010 - [`b297cbf`](https://github.com/morluto/rea/commit/b297cbf0aa2283890190c87a5ac6df5a8a2db45a) docs: synchronize Italian provider guide links - [`1f3d1d7`](https://github.com/morluto/rea/commit/1f3d1d7c0d3301636e6b517b2e26821b304a12c4) fix(contracts): make ADB identifier patterns portable - [`bf9994a`](https://github.com/morluto/rea/commit/bf9994a556f997efd86dddf66556a638e0bb0804) Merge remote-tracking branch 'origin/main' into test/commandcode-native-client-20261010 - [`3cd5715`](https://github.com/morluto/rea/commit/3cd5715e9c2fa45da3424a51b69d24c30aab65cc) chore: merge shared CI repairs from main - [`eae1ec2`](https://github.com/morluto/rea/commit/eae1ec2293f64d18dd6563b6a5b56d19369ee300) chore: align ADB compatibility repair with main - [`6b64683`](https://github.com/morluto/rea/commit/6b64683a50838d3f91cefb1bbfb622c78de382eb) fix(contracts): preserve portable ADB patterns after formatting ### 📊 Changes **5 files changed** (+569 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `docs/testing.md` (+24 -0) 📝 `package.json` (+1 -0) ➕ `scripts/verify-commandcode-client.mjs` (+452 -0) ➕ `src/domain/adb/adbDeviceAnalysis.test.ts` (+82 -0) 📝 `src/domain/adb/adbDeviceAnalysis.ts` (+10 -15) </details> ### 📄 Description ADB input patterns with unescaped character-class hyphens fail Unicode-set schema validators, rejecting the entire MCP-enabled chat request before any tool executes. The formatter removes `\-` escapes under the source regex's `u` flag. Use durable `\x2d` escapes and the existing portable action identifier, share identical key constraints, and preserve the prior admission grammars and diagnostics. Closes #1581. REA already supports Command Code configuration, but lacked a native client workflow check. Add an optional verifier using official `command-code@1.79.2`, its default deferred-schema interface, and a local OpenAI completions/SSE fixture, plus an ADB admission regression. The lane runs under a disposable OS account because auth, MCP tokens and sessions use the actual home. It guards setup targets, preserves an unrelated registration and backups, checks idempotence, and activates the complete REA skill through native default shared-skill discovery. Native discovery advertises all 170 REA tools; exact-name search returns all input schemas for dialect validation. When the client saves the large schema result, a native shell query returns its count and complete artifact digest. Actual JavaScript analysis of a Unicode-path fixture delivers approximately 29 KB of full named-schema Evidence to the next model request. Validation: - Source and production-only installed package: native Command Code ordinary chat and skill/search/analysis flows pass. - Native DeepSeek Harness 0.2.0-rc.2 ordinary chat and tool calls pass with complete exported-pattern checks. This fixture reproduced the pre-fix whole-request rejection; no live DeepSeek API claim. - Production-only Qwen 0.25.0, Pi 1.1.0, and pinned Hermes normal/sticky-profile workflows pass with the complete 170-tool inventory. - 31 focused ADB CLI/MCP, preserved-admission and full SDK-advertised pattern tests passed; the complete pattern regression failed on baseline. CLI option-alias regression, `npm run check:fast` and `npm run docs:check` pass. - Existing real pwntools environment: 149 public CLI/MCP and four bootstrap cases passed, with no target execution. The optional large-index lane was not requested. - Every completed native client run and the binary-layout run had verified empty descendant lists; a run-token scan found no remaining client/server processes. The loopback BYOK model declares a million-token context with synthetic usage. A synthetic account-key value satisfies Command Code's print-mode gate, while native local-only mode refuses hosted API calls. Hosted authentication, live models, Windows clients, and real Android devices remain unverified. No real Hopper/Ghidra workflow was performed. Provider implementations are unchanged. The verifier creates no OS accounts and installs no clients. Sanitized exported setting-key schema: ```json {"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9._\\x2d]+$"} ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:12:35 +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#2985
No description provided.