[PR #1772] [MERGED] fix(apple): preserve slice identity and macOS boundary diagnostics #4808

Closed
opened 2026-10-31 00:55:16 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1772
Author: @dhl84
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @baron

Base: main ← Head: fix/macos-27-boundary-tests


📝 Commits (7)

  • 3466b6a fix(artifacts): name CPU_SUBTYPE_ARM64E_X1 Mach-O slices arm64e
  • e3ca515 fix(artifacts): classify en-GB hdiutil verify refusals as format failures
  • aba2748 test(process): read the full process table in the lifecycle cleanup check
  • 6704825 Merge remote-tracking branch 'origin/main' into codex/fix-dmg-diagnostic-boundary
  • 689f48e test(process): bound cleanup observations to sampled descendants
  • 33c23ac fix(apple): retain CPU subtype identity during dylib resolution
  • 89e6769 test(process): retain OS PIDs for descendant observations

📊 Changes

9 files changed (+193 additions, -32 deletions)

View changed files

📝 src/artifacts/NativeDmgArtifactReader.ts (+2 -0)
📝 src/artifacts/apple/MachoImage.fixture.ts (+1 -0)
📝 src/artifacts/apple/MachoLoadCommandReader.test.ts (+92 -0)
📝 src/artifacts/apple/MachoLoadCommandReader.ts (+2 -2)
📝 src/domain/apple/dyldPaths.ts (+13 -3)
📝 src/domain/apple/dylibResolution.ts (+14 -7)
➕ src/domain/apple/machoCpuIdentity.ts (+6 -0)
📝 tests/boundary/process/processCaptureLifecycle.test.ts (+38 -3)
📝 tests/boundary/providers/native/nativeDmgArtifactReader.test.ts (+25 -17)

📄 Description

A macOS host can emit hdiutil: verify failed - image not recognised, which REA previously classified as unavailable instead of a malformed image. Accept both observed English spellings while retaining the complete failed command output.

The process cleanup test now disables display PID normalization and observes only the real child and grandchild OS PIDs sampled from its own fixture, with a bounded output buffer. This removes the host-wide process-table dependency and the proposed unlimited buffer. PIDs select observations only; production cleanup authority remains unchanged.

Dyld resolution also keeps the selected process CPU type and base subtype through dependency matching. A FAT image containing both arm64e subtype 2 and X1 subtype 12 now selects the matching dependency variant; a missing variant is explicitly unresolved. Capability bits are normalized by one shared helper, and family display labels remain unchanged. The regression uses real FAT byte fixtures with opposing slice order and different nested dependencies.

The contributor's ARM64E_X1 commits remain in this branch's history; that mapping has already landed separately on main. This update completes the remaining diagnostic and process-test items from #1765.

Fixes #1765

Validation on macOS:

  • Focused diagnostic cases: 3 passed, including a real hdiutil verify refusal.
  • Real source-owned child/grandchild capture and cleanup: passed in 2.81 seconds after the OS-PID correction.
  • Mach-O reader and dyld resolution: 109 tests passed in 0.14 seconds, including mixed and missing X1 dependency variants.
  • Cached runtime build and npm run check:fast: passed.

The en-GB diagnostic is covered from the reported producer text; this run did not change the host's AppleLanguages setting. Windows and Linux were not executed.


🔄 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/1772 **Author:** [@dhl84](https://github.com/dhl84) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@baron](https://github.com/baron) **Base:** `main` ← **Head:** `fix/macos-27-boundary-tests` --- ### 📝 Commits (7) - [`3466b6a`](https://github.com/morluto/rea/commit/3466b6af2facd8a263dab2357b9bbbb8d44a7038) fix(artifacts): name CPU_SUBTYPE_ARM64E_X1 Mach-O slices arm64e - [`e3ca515`](https://github.com/morluto/rea/commit/e3ca5159c8ad57673586541c56ac6ef0f624bcbb) fix(artifacts): classify en-GB hdiutil verify refusals as format failures - [`aba2748`](https://github.com/morluto/rea/commit/aba27480494713adc7d8f47a99c8095e18fa7e6b) test(process): read the full process table in the lifecycle cleanup check - [`6704825`](https://github.com/morluto/rea/commit/6704825ea47d9093dd248200a7a13bd7e2aaff87) Merge remote-tracking branch 'origin/main' into codex/fix-dmg-diagnostic-boundary - [`689f48e`](https://github.com/morluto/rea/commit/689f48ec722169fdf549856effd5e3b663586fa8) test(process): bound cleanup observations to sampled descendants - [`33c23ac`](https://github.com/morluto/rea/commit/33c23ac1dee05f5efafd6fbce03398306e4ae4ce) fix(apple): retain CPU subtype identity during dylib resolution - [`89e6769`](https://github.com/morluto/rea/commit/89e67695050d7f7af81524ded8d0fda6225846d2) test(process): retain OS PIDs for descendant observations ### 📊 Changes **9 files changed** (+193 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `src/artifacts/NativeDmgArtifactReader.ts` (+2 -0) 📝 `src/artifacts/apple/MachoImage.fixture.ts` (+1 -0) 📝 `src/artifacts/apple/MachoLoadCommandReader.test.ts` (+92 -0) 📝 `src/artifacts/apple/MachoLoadCommandReader.ts` (+2 -2) 📝 `src/domain/apple/dyldPaths.ts` (+13 -3) 📝 `src/domain/apple/dylibResolution.ts` (+14 -7) ➕ `src/domain/apple/machoCpuIdentity.ts` (+6 -0) 📝 `tests/boundary/process/processCaptureLifecycle.test.ts` (+38 -3) 📝 `tests/boundary/providers/native/nativeDmgArtifactReader.test.ts` (+25 -17) </details> ### 📄 Description A macOS host can emit `hdiutil: verify failed - image not recognised`, which REA previously classified as unavailable instead of a malformed image. Accept both observed English spellings while retaining the complete failed command output. The process cleanup test now disables display PID normalization and observes only the real child and grandchild OS PIDs sampled from its own fixture, with a bounded output buffer. This removes the host-wide process-table dependency and the proposed unlimited buffer. PIDs select observations only; production cleanup authority remains unchanged. Dyld resolution also keeps the selected process CPU type and base subtype through dependency matching. A FAT image containing both arm64e subtype 2 and X1 subtype 12 now selects the matching dependency variant; a missing variant is explicitly unresolved. Capability bits are normalized by one shared helper, and family display labels remain unchanged. The regression uses real FAT byte fixtures with opposing slice order and different nested dependencies. The contributor's ARM64E_X1 commits remain in this branch's history; that mapping has already landed separately on main. This update completes the remaining diagnostic and process-test items from #1765. Fixes #1765 Validation on macOS: - Focused diagnostic cases: 3 passed, including a real `hdiutil verify` refusal. - Real source-owned child/grandchild capture and cleanup: passed in 2.81 seconds after the OS-PID correction. - Mach-O reader and dyld resolution: 109 tests passed in 0.14 seconds, including mixed and missing X1 dependency variants. - Cached runtime build and `npm run check:fast`: passed. The en-GB diagnostic is covered from the reported producer text; this run did not change the host's AppleLanguages setting. Windows and Linux were not executed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:55:16 +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#4808
No description provided.