[PR #207] [MERGED] fix(native): harden command capture edge cases #1858

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

📋 Pull Request Information

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

Base: main ← Head: agent/fix-native-command-edge-cases


📝 Commits (1)

  • d39f98d fix(native): harden command capture edge cases

📊 Changes

4 files changed (+95 additions, -9 deletions)

View changed files

📝 src/native/CommandRunner.ts (+4 -2)
📝 src/native/NativeMacOSProvider.ts (+3 -2)
📝 src/native/NativeMachoInspection.ts (+25 -5)
📝 tests/nativeProvider.test.ts (+63 -0)

📄 Description

Summary

  • make successful native command captures explicitly exhaustive while retaining typed output-limit failure for partial output
  • parse lipo architecture output once and reuse the normalized collection
  • treat unavailable vtool as an optional Mach-O inspection limitation
  • continue propagating vtool timeout, cancellation, and adapter failures
  • add real subprocess and provider-seam regressions

Root cause and impact

The capture contract exposed truncation booleans even though output-limit handling always kills the command and returns a failure, making the success invariant unclear. Architecture enumeration reparsed the same lipo output for items and total. Mach-O inspection also treated provenance-only vtool as required, blocking otherwise complete inspection on partial Xcode toolchains.

Successful captures are now type-level exhaustive, partial output remains fail-closed, architecture parsing is single-pass, and missing optional vtool produces an explicit limitation without fabricating provenance. Non-unavailability vtool failures still fail the operation.

Verification

  • npm run check — 87 files, 592 tests
  • npm run knip
  • npm run jscpd — 0.92% duplicated lines
  • npm run scan:todos
  • post-rebase npm run typecheck
  • post-rebase targeted native and artifact tests — 15 tests

The branch was rebased onto the 1.5.0 release merge before push. Real Hopper verification was not performed; native command behavior is covered by a real subprocess boundary and provider seams.

Closes #144
Closes #174
Closes #176
Closes #187


🔄 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/207 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `agent/fix-native-command-edge-cases` --- ### 📝 Commits (1) - [`d39f98d`](https://github.com/morluto/rea/commit/d39f98d06dd53cdfd427e75e2f45f2c8b8792f50) fix(native): harden command capture edge cases ### 📊 Changes **4 files changed** (+95 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/native/CommandRunner.ts` (+4 -2) 📝 `src/native/NativeMacOSProvider.ts` (+3 -2) 📝 `src/native/NativeMachoInspection.ts` (+25 -5) 📝 `tests/nativeProvider.test.ts` (+63 -0) </details> ### 📄 Description ## Summary - make successful native command captures explicitly exhaustive while retaining typed `output-limit` failure for partial output - parse lipo architecture output once and reuse the normalized collection - treat unavailable `vtool` as an optional Mach-O inspection limitation - continue propagating vtool timeout, cancellation, and adapter failures - add real subprocess and provider-seam regressions ## Root cause and impact The capture contract exposed truncation booleans even though output-limit handling always kills the command and returns a failure, making the success invariant unclear. Architecture enumeration reparsed the same lipo output for `items` and `total`. Mach-O inspection also treated provenance-only `vtool` as required, blocking otherwise complete inspection on partial Xcode toolchains. Successful captures are now type-level exhaustive, partial output remains fail-closed, architecture parsing is single-pass, and missing optional vtool produces an explicit limitation without fabricating provenance. Non-unavailability vtool failures still fail the operation. ## Verification - `npm run check` — 87 files, 592 tests - `npm run knip` - `npm run jscpd` — 0.92% duplicated lines - `npm run scan:todos` - post-rebase `npm run typecheck` - post-rebase targeted native and artifact tests — 15 tests The branch was rebased onto the 1.5.0 release merge before push. Real Hopper verification was not performed; native command behavior is covered by a real subprocess boundary and provider seams. Closes #144 Closes #174 Closes #176 Closes #187 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:11:51 +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#1858
No description provided.