[PR #605] [MERGED] fix(managed): recognize PE Thumb and ARMNT machines #2106

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

📋 Pull Request Information

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

Base: main ← Head: campaign/rea-armnt-managed-metadata-20261005


📝 Commits (2)

  • 057a690 fix(managed): recognize PE Thumb and ARMNT machines
  • f9f0874 chore: sync upstream CI fixture correction

📊 Changes

4 files changed (+55 additions, -0 deletions)

View changed files

📝 src/domain/binaryTarget.ts (+2 -0)
📝 src/domain/peInspection.ts (+1 -0)
📝 src/dotnet/ManagedPeReader.ts (+2 -0)
➕ tests/boundary/providers/managed/managedArmMachine.test.ts (+50 -0)

📄 Description

Summary

Open and inspect valid managed PE Thumb and ARMNT artifacts through the public path.

No issue is linked: this is a newly reproduced correctness defect found while reviewing current upstream; the regression and affected production seam are included for review.

Problem and expected behavior

The outer target resolver and managed PE reader reject machine codes 0x01c2/0x01c4. PE triage also labels Thumb unknown. Those documented ARM machine variants must consistently resolve and inspect as ARM.

Change and scope

Align ARM variants in the outer PE target parser, PE triage machine classification, and managed PE reader. Exercise the actual filesystem resolver and managed provider instead of constructing a target by hand.

Contract and boundary impact

  • Semantic owner and earliest changed stage: BinaryTargetResolver PE architecture admission, followed by PE triage and ManagedPeReader.
  • CLI and MCP/tool-catalog contract: existing operations and schemas remain compatible; Resolved target architecture=arm and managed=true; static managed operations retain the source path and digest.
  • Provider, bridge, target-format, or platform compatibility: PE32 ARM, Thumb and ARMNT static inspection.
  • Evidence, artifact, provenance, or reconstruction contract: existing source identity and explicit incomplete/unsupported evidence remain preserved.
  • Process execution, authorization, cleanup, or containment impact: Existing read-only provider filesystem and digest boundaries are exercised unchanged.
  • Generated metadata (docs/product-catalog.json), package, or installation impact: no metadata or dependency changes required.

Evidence and regression coverage

  • Tests added or updated: tests/boundary/providers/managed/managedArmMachine.test.ts.
  • Base reproduction or other evidence: Executed public-path boundary with real fixture files: upstream fails Thumb and ARMNT while ARM passes; all three resolve and execute artifact/member/native-boundary operations after the fix. Microsoft documents the machine variants: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#machine-types. Affected base is ebb4c45.
  • User-visible CLI/MCP output: Resolved target architecture=arm and managed=true; static managed operations retain the source path and digest.
  • Remaining proof gaps: Synthetic PE/CLI fixtures validate static decoding. Windows ARM hardware execution and real CLR/ILSpy comparison were not run.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

Latest upstream sync: f9f0874d29685b241a618984c9c3665369623d48 incorporates current owner main, including the source-map fixture correction from #609. At this head, the original regression plus webSourceMapFetcher.test.ts, npm run check, and npm run check:fast pass. The full local suite was not repeated for this routine sync under the current contribution policy. The implementation checks below were performed before this upstream sync and do not imply a full-suite result for the new head.

  • npm run check:pr — passed
  • npm run check:ci — passed
  • npm run verify:package — passed
  • npm pack --dry-run — passed

Focused regression and reproduction commands ran with the outcomes described above.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Synthetic PE/CLI fixtures validate static decoding. Windows ARM hardware execution and real CLR/ILSpy comparison were not run.
  • Package or release metadata impact: no version, dependency, generated catalog or installation changes.
  • Security, privacy, process, or containment review: Existing read-only provider filesystem and digest boundaries are exercised unchanged. Final diff contains source and regression tests; local fixtures, binaries, caches and logs are excluded.

Review checklist

  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

AI assistance was used to investigate, implement, and test this change. Commits are signed and include a DCO sign-off.


🔄 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/605 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `campaign/rea-armnt-managed-metadata-20261005` --- ### 📝 Commits (2) - [`057a690`](https://github.com/morluto/rea/commit/057a6903400580762e218e001124946872e20fcb) fix(managed): recognize PE Thumb and ARMNT machines - [`f9f0874`](https://github.com/morluto/rea/commit/f9f0874d29685b241a618984c9c3665369623d48) chore: sync upstream CI fixture correction ### 📊 Changes **4 files changed** (+55 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/binaryTarget.ts` (+2 -0) 📝 `src/domain/peInspection.ts` (+1 -0) 📝 `src/dotnet/ManagedPeReader.ts` (+2 -0) ➕ `tests/boundary/providers/managed/managedArmMachine.test.ts` (+50 -0) </details> ### 📄 Description ## Summary Open and inspect valid managed PE Thumb and ARMNT artifacts through the public path. No issue is linked: this is a newly reproduced correctness defect found while reviewing current upstream; the regression and affected production seam are included for review. ## Problem and expected behavior The outer target resolver and managed PE reader reject machine codes 0x01c2/0x01c4. PE triage also labels Thumb unknown. Those documented ARM machine variants must consistently resolve and inspect as ARM. ## Change and scope Align ARM variants in the outer PE target parser, PE triage machine classification, and managed PE reader. Exercise the actual filesystem resolver and managed provider instead of constructing a target by hand. ## Contract and boundary impact - Semantic owner and earliest changed stage: BinaryTargetResolver PE architecture admission, followed by PE triage and ManagedPeReader. - CLI and MCP/tool-catalog contract: existing operations and schemas remain compatible; Resolved target architecture=arm and managed=true; static managed operations retain the source path and digest. - Provider, bridge, target-format, or platform compatibility: PE32 ARM, Thumb and ARMNT static inspection. - Evidence, artifact, provenance, or reconstruction contract: existing source identity and explicit incomplete/unsupported evidence remain preserved. - Process execution, authorization, cleanup, or containment impact: Existing read-only provider filesystem and digest boundaries are exercised unchanged. - Generated metadata (`docs/product-catalog.json`), package, or installation impact: no metadata or dependency changes required. ## Evidence and regression coverage - Tests added or updated: `tests/boundary/providers/managed/managedArmMachine.test.ts`. - Base reproduction or other evidence: Executed public-path boundary with real fixture files: upstream fails Thumb and ARMNT while ARM passes; all three resolve and execute artifact/member/native-boundary operations after the fix. Microsoft documents the machine variants: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#machine-types. Affected base is ebb4c45. - User-visible CLI/MCP output: Resolved target architecture=arm and managed=true; static managed operations retain the source path and digest. - Remaining proof gaps: Synthetic PE/CLI fixtures validate static decoding. Windows ARM hardware execution and real CLR/ILSpy comparison were not run. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed Latest upstream sync: `f9f0874d29685b241a618984c9c3665369623d48` incorporates current owner main, including the source-map fixture correction from #609. At this head, the original regression plus `webSourceMapFetcher.test.ts`, `npm run check`, and `npm run check:fast` pass. The full local suite was not repeated for this routine sync under the current contribution policy. The implementation checks below were performed before this upstream sync and do not imply a full-suite result for the new head. - `npm run check:pr` — passed - `npm run check:ci` — passed - `npm run verify:package` — passed - `npm pack --dry-run` — passed Focused regression and reproduction commands ran with the outcomes described above. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: Synthetic PE/CLI fixtures validate static decoding. Windows ARM hardware execution and real CLR/ILSpy comparison were not run. - Package or release metadata impact: no version, dependency, generated catalog or installation changes. - Security, privacy, process, or containment review: Existing read-only provider filesystem and digest boundaries are exercised unchanged. Final diff contains source and regression tests; local fixtures, binaries, caches and logs are excluded. ## Review checklist - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. AI assistance was used to investigate, implement, and test this change. Commits are signed and include a DCO sign-off. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:14:21 +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#2106
No description provided.