[PR #1640] [MERGED] fix(test): preserve Ghidra interior-label controls on Mach-O #4717

Closed
opened 2026-10-31 00:54:18 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/ghidra-interior-label-fixture-20261010


📝 Commits (5)

  • afbd725 fix(test): preserve Ghidra interior-label controls on Mach-O
  • d82dc47 chore: integrate current main for Ghidra fixture verification
  • a452706 test: preserve selector semantics and accept signaled fixture exits
  • f5371bc test(javascript): exercise deep returns through the public CLI
  • 76f5790 chore: merge main resource ownership fixes

📊 Changes

3 files changed (+34 additions, -11 deletions)

View changed files

📝 scripts/lib/real-ghidra-entry-aliases.mjs (+24 -8)
📝 tests/boundary/providers/hopper/hopperClient.diagnostics.test.ts (+8 -2)
📝 tests/conformance/ghidra/entry-aliases.c (+2 -1)

📄 Description

The shared real-Ghidra verifier can fail before unrelated lane fixtures on Apple Silicon: a leaf function can put the exported interior label at entry, while adding a NOP alone makes the linker advertise another function start.

Place a NOP before the control and omit function-start metadata when linking this synthetic fixture on macOS. Derive symbol prefixes from the imported format. Preserve strict named-interior rejection, numeric containment, imported aliases, annotations and target-byte identity. Xrefs use the fixture's unambiguous declared function name: a Mach-O primary label such as dead retains the CLI's existing bare-hexadecimal address interpretation, while the separate procedure-name regression still covers dead. Failure diagnostics identify the actual CLI selector.

Correct the Hopper diagnostic-test stop oracle: normal signal termination leaves exitCode null. Require a launched child and an observed exit code or signal code, retaining the directory-removal, bounded-output, bridge-usability and token-redaction assertions.

Fixes #1597. Production resolver behavior, advertised contracts and CI thresholds are unchanged. Main's resource-ownership fix for the deep JavaScript test is preserved without a duplicate change in this PR.

Validation:

  • Integrated head 76f5790d: npm run test:focused -- tests/boundary/providers/hopper/hopperClient.diagnostics.test.ts tests/composition/directAnalysisXrefs.test.ts src/ghidra/GhidraSessionValues.test.ts tests/boundary/filesystem/javascriptApplicationDeepReturns.test.ts — 26 passed.
  • npm run check:ci — eight tasks and architecture guards across 1,086 source files passed. Normal commit/push hooks run without bypass.
  • Actual complete shared-verifier CLI/MCP workflow with Ghidra 12.1.4/JDK 21: host Linux ELF passed on a452706c; ARM64 Mach-O cross-compiled with Clang/LD64 14 passed on f5371bc0. The helper, fixture, Ghidra adapter/bridge, process primitives and contracts are unchanged by the final main integration. Both successful runs ended with verified empty owned-process lineages. Earlier failed records, including one cleanup-identity rejection, remain retained; cleanup guards are unchanged.
  • Six native cases passed on integrated head 76f5790d: Qwen Code 0.25.0 analysis, Pi 1.1.0 analysis, Hermes 2026.9.24 analysis with fresh/existing profiles, and DeepSeek Harness 0.2.0-rc.2 ordinary chat/analysis. Every case discovers all 170 tools and ends with verified empty owned-process lineage. Analysis cases load the installed skill and receive actual Unicode-path JavaScript Evidence; Qwen also reads its offloaded artifact. Pi uses native HOME discovery without an explicit skill setting; Hermes uses its personal directory. Qwen's default OS-home skill discovery is unverified because its test uses a caller-configured isolated shared directory.

Linux x64 and pinned Node 24.18.0. ARM64 Mach-O is cross-compiled with LLVM; native macOS/Apple Clang/linker execution is unverified. No target execution or real Hopper/IDA claim. Native client model replies use deterministic loopback fixtures; live cloud models and native Windows client execution are unverified. Runs are serialized on one CPU with a 512 MiB Java heap.


🔄 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/1640 **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:** `fix/ghidra-interior-label-fixture-20261010` --- ### 📝 Commits (5) - [`afbd725`](https://github.com/morluto/rea/commit/afbd725254b7bb48d9a5a2da129ca80d2df80149) fix(test): preserve Ghidra interior-label controls on Mach-O - [`d82dc47`](https://github.com/morluto/rea/commit/d82dc472b2d04eaf91c4122bd9a9ed8938042b55) chore: integrate current main for Ghidra fixture verification - [`a452706`](https://github.com/morluto/rea/commit/a452706c91c3f23c1350033ab0405d0521332d8d) test: preserve selector semantics and accept signaled fixture exits - [`f5371bc`](https://github.com/morluto/rea/commit/f5371bc050e207d24b3481f0baa3c09cc79a2f4f) test(javascript): exercise deep returns through the public CLI - [`76f5790`](https://github.com/morluto/rea/commit/76f5790d931dea753cf9278548cebca048eba489) chore: merge main resource ownership fixes ### 📊 Changes **3 files changed** (+34 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `scripts/lib/real-ghidra-entry-aliases.mjs` (+24 -8) 📝 `tests/boundary/providers/hopper/hopperClient.diagnostics.test.ts` (+8 -2) 📝 `tests/conformance/ghidra/entry-aliases.c` (+2 -1) </details> ### 📄 Description The shared real-Ghidra verifier can fail before unrelated lane fixtures on Apple Silicon: a leaf function can put the exported interior label at entry, while adding a NOP alone makes the linker advertise another function start. Place a NOP before the control and omit function-start metadata when linking this synthetic fixture on macOS. Derive symbol prefixes from the imported format. Preserve strict named-interior rejection, numeric containment, imported aliases, annotations and target-byte identity. Xrefs use the fixture's unambiguous declared function name: a Mach-O primary label such as `dead` retains the CLI's existing bare-hexadecimal address interpretation, while the separate procedure-name regression still covers `dead`. Failure diagnostics identify the actual CLI selector. Correct the Hopper diagnostic-test stop oracle: normal signal termination leaves `exitCode` null. Require a launched child and an observed exit code or signal code, retaining the directory-removal, bounded-output, bridge-usability and token-redaction assertions. Fixes #1597. Production resolver behavior, advertised contracts and CI thresholds are unchanged. Main's resource-ownership fix for the deep JavaScript test is preserved without a duplicate change in this PR. Validation: - Integrated head `76f5790d`: `npm run test:focused -- tests/boundary/providers/hopper/hopperClient.diagnostics.test.ts tests/composition/directAnalysisXrefs.test.ts src/ghidra/GhidraSessionValues.test.ts tests/boundary/filesystem/javascriptApplicationDeepReturns.test.ts` — 26 passed. - `npm run check:ci` — eight tasks and architecture guards across 1,086 source files passed. Normal commit/push hooks run without bypass. - Actual complete shared-verifier CLI/MCP workflow with Ghidra 12.1.4/JDK 21: host Linux ELF passed on `a452706c`; ARM64 Mach-O cross-compiled with Clang/LD64 14 passed on `f5371bc0`. The helper, fixture, Ghidra adapter/bridge, process primitives and contracts are unchanged by the final main integration. Both successful runs ended with verified empty owned-process lineages. Earlier failed records, including one cleanup-identity rejection, remain retained; cleanup guards are unchanged. - Six native cases passed on integrated head `76f5790d`: Qwen Code 0.25.0 analysis, Pi 1.1.0 analysis, Hermes 2026.9.24 analysis with fresh/existing profiles, and DeepSeek Harness 0.2.0-rc.2 ordinary chat/analysis. Every case discovers all 170 tools and ends with verified empty owned-process lineage. Analysis cases load the installed skill and receive actual Unicode-path JavaScript Evidence; Qwen also reads its offloaded artifact. Pi uses native HOME discovery without an explicit skill setting; Hermes uses its personal directory. Qwen's default OS-home skill discovery is unverified because its test uses a caller-configured isolated shared directory. Linux x64 and pinned Node 24.18.0. ARM64 Mach-O is cross-compiled with LLVM; native macOS/Apple Clang/linker execution is unverified. No target execution or real Hopper/IDA claim. Native client model replies use deterministic loopback fixtures; live cloud models and native Windows client execution are unverified. Runs are serialized on one CPU with a 512 MiB Java heap. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:54:18 +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#4717
No description provided.