[PR #5765] [MERGED] fix(native): preserve mixed-slice signature observations #7046

Closed
opened 2026-11-01 21:44:57 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/5697-mixed-signature-diagnostic


📝 Commits (3)

  • f255e2f fix(native): preserve mixed-slice signature observations
  • dece36a fix(native): retain signature facts when slice inspection fails
  • 698b7d5 fix(native): accumulate known slice observations before failure

📊 Changes

2 files changed (+189 additions, -58 deletions)

View changed files

📝 src/native/NativeMacOSProvider.ts (+89 -54)
📝 tests/boundary/providers/native/nativeInventory.golden.test.ts (+100 -4)

📄 Description

Fixes #5697.

A mixed universal Mach-O can report signing metadata for its default slice while codesign -d -r- exits 1 with an Executable= echo followed by the unsigned-slice diagnostic. The classifier rejected that valid two-line response and discarded the signing observations.

Accept the optional echo only when it exactly matches the bound snapshot or its resolved path. Additional, foreign-path or unrelated nonzero diagnostics remain failures, including per-slice probes. Mixed results explicitly mark partial coverage; default-slice metadata does not establish that every slice is signed. This restores the existing result contract without expanding the slice schema covered by #3583/#4359.

If a later slice probe fails, preserve completed aggregate facts, known unsigned architectures, aggregate-unavailability reasons and all collected command provenance in partialObservation, while retaining the typed failure. One bound inspection owns the capture and limitation ledger, and records facts as each stage completes.

Validation:

  • Final correction on macOS arm64, Node 26.12.0: npm run typecheck and npm run build:cached passed; two ineffective-dynamic-import build warnings.
  • node node_modules/vitest/vitest.mjs run --project boundary tests/boundary/providers/native/nativeInventory.golden.test.ts: 24/24 passed. Includes foreign/extra diagnostics, failed slice probes, and a confirmed unsigned x86_64 slice retained when a later arm64 probe fails. Partial-result assertions cover identifier, entitlements, aggregate limitations and all five command captures.
  • Focused lint exited 0 with complexity/length and existing unused-import warnings; final diff whitespace check passed.
  • Reused initial Node 24.18.0/macOS arm64 receipts: mixed regression failed against the base producer; five real inspect-signature --json cases passed (mixed universal, signed and unsigned thin files, unsigned universal, and signed universal system control). These unchanged CLI cases were not rerun. Synthetic fixtures used normal compiler/linker signing behavior; no signing command or target execution ran.

The original issue baseline is reused. Broader CI/static gates, Intel-host behavior and MCP transport remain untested. The failure-preservation regression uses controlled native-command captures; no fresh real-tool failure was induced.

Author readiness

Human owner: @jdotc1


🔄 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/5765 **Author:** [@jdotc1](https://github.com/jdotc1) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/5697-mixed-signature-diagnostic` --- ### 📝 Commits (3) - [`f255e2f`](https://github.com/morluto/rea/commit/f255e2f563cae05a246601ac33232256d6e4997c) fix(native): preserve mixed-slice signature observations - [`dece36a`](https://github.com/morluto/rea/commit/dece36ac774e9177a777c7d05573121001b5805c) fix(native): retain signature facts when slice inspection fails - [`698b7d5`](https://github.com/morluto/rea/commit/698b7d5c6a141b07370679f0d083014188950c20) fix(native): accumulate known slice observations before failure ### 📊 Changes **2 files changed** (+189 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `src/native/NativeMacOSProvider.ts` (+89 -54) 📝 `tests/boundary/providers/native/nativeInventory.golden.test.ts` (+100 -4) </details> ### 📄 Description Fixes #5697. A mixed universal Mach-O can report signing metadata for its default slice while `codesign -d -r-` exits 1 with an `Executable=` echo followed by the unsigned-slice diagnostic. The classifier rejected that valid two-line response and discarded the signing observations. Accept the optional echo only when it exactly matches the bound snapshot or its resolved path. Additional, foreign-path or unrelated nonzero diagnostics remain failures, including per-slice probes. Mixed results explicitly mark partial coverage; default-slice metadata does not establish that every slice is signed. This restores the existing result contract without expanding the slice schema covered by #3583/#4359. If a later slice probe fails, preserve completed aggregate facts, known unsigned architectures, aggregate-unavailability reasons and all collected command provenance in `partialObservation`, while retaining the typed failure. One bound inspection owns the capture and limitation ledger, and records facts as each stage completes. Validation: - Final correction on macOS arm64, Node 26.12.0: `npm run typecheck` and `npm run build:cached` passed; two ineffective-dynamic-import build warnings. - `node node_modules/vitest/vitest.mjs run --project boundary tests/boundary/providers/native/nativeInventory.golden.test.ts`: 24/24 passed. Includes foreign/extra diagnostics, failed slice probes, and a confirmed unsigned x86_64 slice retained when a later arm64 probe fails. Partial-result assertions cover identifier, entitlements, aggregate limitations and all five command captures. - Focused lint exited 0 with complexity/length and existing unused-import warnings; final diff whitespace check passed. - Reused initial Node 24.18.0/macOS arm64 receipts: mixed regression failed against the base producer; five real `inspect-signature --json` cases passed (mixed universal, signed and unsigned thin files, unsigned universal, and signed universal system control). These unchanged CLI cases were not rerun. Synthetic fixtures used normal compiler/linker signing behavior; no signing command or target execution ran. The original issue baseline is reused. Broader CI/static gates, Intel-host behavior and MCP transport remain untested. The failure-preservation regression uses controlled native-command captures; no fresh real-tool failure was induced. ## Author readiness Human owner: @jdotc1 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:44:57 +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#7046
No description provided.