[PR #1527] [MERGED] fix(verification): reuse validators for shared output schema ids #2944

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

📋 Pull Request Information

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

Base: main ← Head: fix/duplicate-output-schema-validators


📝 Commits (4)

  • 9f53e51 fix: reuse validators for identical output schemas
  • e707642 fix: reuse validators for identical output schemas
  • 3d03294 chore(review): integrate current main for output schema validation
  • 3582a3f fix(verification): reuse shared output schemas in Electron checks

📊 Changes

3 files changed (+14 additions, -3 deletions)

View changed files

📝 scripts/lib/real-ghidra-boundaries.mjs (+5 -1)
📝 scripts/lib/real-hopper-boundaries.mjs (+5 -1)
📝 scripts/verify/electron/tool-contracts.mjs (+4 -1)

📄 Description

The Ghidra, Hopper and Electron verification lanes stopped during catalog registration: distinct tools with identical output schemas intentionally share a content-derived $id, and compiling that ID again in one Ajv instance throws. Reuse the registered output validator for a shared ID while retaining maps keyed by tool name. Existing input-schema checks and each verifier's Ajv options remain unchanged.

Closes #1518.

Validation

  • Normal integration with main 9964af6b, preserving both contributor commits, plus the discovered Electron follow-up. Final reviewed head 3582a3f52cc8955f7214f218b3c2ac12a94d2d41; all maintenance commit identities use verified GitHub no-reply email. Three verification scripts differ from that main baseline.
  • Both actual native boundary functions exercised with the real SDK stdio catalog: 139 tools and 118 distinct output IDs. Schemas sharing an ID were checked for complete equality. Main fails before any tool call; both fixed functions register the complete catalog and reach their first actual MCP call, correctly returning target_unavailable with no app open. No provider results are simulated. These native helper/runtime sources remain unchanged by the Electron follow-up.
  • The exact Electron registration statement selected from its parsed source was executed against that SDK-captured catalog. Main reproduces the same duplicate-ID exception; the final formatted follow-up registers all 139 tools, retains named lookup, reuses the same validator for shared IDs and validates the actual JavaScript result. This is a producer control for registration, not a full Electron application run.
  • Actual public CLI and SDK stdio MCP analysis of a source-owned 44-byte JavaScript target passes: equal Evidence IDs, complete text/structured parity, Ajv validation of the real result, unchanged input SHA-256 and subsequent ping.
  • Fresh compile, full serial typecheck, lint/module boundaries, syntax and changed-file formatting pass with the pinned toolchain and resource guard. Final Electron source was checked again after formatting; runtime sources did not change.

Verification scope

Independent coverage verifies the catalog failure, native verification startup past that boundary, the Electron registration producer and an actual JavaScript CLI/MCP workflow. Full Ghidra/Hopper binary-analysis lanes, the full Electron application fixture and native macOS/Windows provider behavior were not run locally. The seven-fixture Ghidra result in #1518 is attributed to the issue reporter, rather than claimed on this reviewed head. Fresh current-head CI must pass before merge.


🔄 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/1527 **Author:** [@peter-research](https://github.com/peter-research) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/duplicate-output-schema-validators` --- ### 📝 Commits (4) - [`9f53e51`](https://github.com/morluto/rea/commit/9f53e51b11056dc8f46046e2f1083e53af34e2bf) fix: reuse validators for identical output schemas - [`e707642`](https://github.com/morluto/rea/commit/e707642c258f734d5efabe839be65d4e8127d6d6) fix: reuse validators for identical output schemas - [`3d03294`](https://github.com/morluto/rea/commit/3d03294c21fe831834a0a2b263a3923dc4272e34) chore(review): integrate current main for output schema validation - [`3582a3f`](https://github.com/morluto/rea/commit/3582a3f52cc8955f7214f218b3c2ac12a94d2d41) fix(verification): reuse shared output schemas in Electron checks ### 📊 Changes **3 files changed** (+14 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `scripts/lib/real-ghidra-boundaries.mjs` (+5 -1) 📝 `scripts/lib/real-hopper-boundaries.mjs` (+5 -1) 📝 `scripts/verify/electron/tool-contracts.mjs` (+4 -1) </details> ### 📄 Description The Ghidra, Hopper and Electron verification lanes stopped during catalog registration: distinct tools with identical output schemas intentionally share a content-derived `$id`, and compiling that ID again in one Ajv instance throws. Reuse the registered output validator for a shared ID while retaining maps keyed by tool name. Existing input-schema checks and each verifier's Ajv options remain unchanged. Closes #1518. ## Validation - Normal integration with main `9964af6b`, preserving both contributor commits, plus the discovered Electron follow-up. Final reviewed head `3582a3f52cc8955f7214f218b3c2ac12a94d2d41`; all maintenance commit identities use verified GitHub no-reply email. Three verification scripts differ from that main baseline. - Both actual native boundary functions exercised with the real SDK stdio catalog: 139 tools and 118 distinct output IDs. Schemas sharing an ID were checked for complete equality. Main fails before any tool call; both fixed functions register the complete catalog and reach their first actual MCP call, correctly returning `target_unavailable` with no app open. No provider results are simulated. These native helper/runtime sources remain unchanged by the Electron follow-up. - The exact Electron registration statement selected from its parsed source was executed against that SDK-captured catalog. Main reproduces the same duplicate-ID exception; the final formatted follow-up registers all 139 tools, retains named lookup, reuses the same validator for shared IDs and validates the actual JavaScript result. This is a producer control for registration, not a full Electron application run. - Actual public CLI and SDK stdio MCP analysis of a source-owned 44-byte JavaScript target passes: equal Evidence IDs, complete text/structured parity, Ajv validation of the real result, unchanged input SHA-256 and subsequent ping. - Fresh compile, full serial typecheck, lint/module boundaries, syntax and changed-file formatting pass with the pinned toolchain and resource guard. Final Electron source was checked again after formatting; runtime sources did not change. ## Verification scope Independent coverage verifies the catalog failure, native verification startup past that boundary, the Electron registration producer and an actual JavaScript CLI/MCP workflow. Full Ghidra/Hopper binary-analysis lanes, the full Electron application fixture and native macOS/Windows provider behavior were not run locally. The seven-fixture Ghidra result in #1518 is attributed to the issue reporter, rather than claimed on this reviewed head. Fresh current-head CI must pass before merge. --- <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:06 +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#2944
No description provided.