[PR #5778] [MERGED] fix(native): reject mixed dyld refusal diagnostics #7054

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

📋 Pull Request Information

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

Base: main ← Head: fix/5708-dsym-target-refusal


📝 Commits (10+)

  • fa2d36a fix(native): classify confirmed dSYM dyld refusals
  • e808d3d style(native): format target refusal handling
  • b05086e chore: merge reviewed upstream fixes into Mach-O diagnostics
  • f4514ba fix(native): confirm precise Mach-O layout refusals before export fallback
  • 4328588 test(cli): observe cancellation at stable source resolution boundary
  • 71b24ce fix(native): reject contradictory dyld layout refusals
  • 5f9e3ce fix(native): preserve mixed dyld diagnostic failures
  • 0af4ad9 merge: reconcile target-refusal fix with current main
  • c4ebaf6 fix(native): retain the evidence behind contradictory layout refusals
  • 945315f chore: merge upstream main for dSYM refusal

📊 Changes

2 files changed (+134 additions, -9 deletions)

View changed files

📝 src/native/NativeMachoCommandDiagnostics.ts (+19 -9)
📝 src/native/NativeMachoInspection.test.ts (+115 -0)

📄 Description

Summary

Follow up on upstream's dSYM refusal fix in f83d97fe. Require one exact dyld diagnostic before treating a nonzero result as a known refusal. Additional stdout/stderr diagnostics remain errors with their captures preserved. Refs #5708; the basic dSYM classification is already upstream.

Problem and expected behavior

The upstream predicate searches for a matching line in either stream. A recognized dSYM line plus an unrelated error is therefore classified as unsupported instead of retaining the mixed result as an inspection failure. A second admission predicate can also accept a mixed missing-UUID/dSYM output and continue inspection.

Change and scope

Normalize settled dyld output once in the existing command-diagnostics owner and admit exactly one nonempty diagnostic. Preserve stdout-only admission for missing UUID and upstream's stdout-or-stderr support for the observed dSYM refusal. Keep upstream header validation and error/capture projection. The contribution changes two files. The previous CORE/FVMLIB expansion, canonical file-type parser changes, and real-CLI test timeout change are removed from this follow-up.

Follow the contribution scope. This is an ordinary correction to existing read-only inspection; no new provider or execution capability is introduced.

Contract and boundary impact

  • Semantic owner and earliest changed stage: admission of settled native command diagnostics.
  • Contribution scope fit and linked maintainer decision: existing inspection correction; new-capability decision is not applicable.
  • CLI and MCP/tool-catalog contract: mixed native errors retain the existing output-error result; exact target refusals retain existing classification.
  • Provider, bridge, target-format, or platform compatibility: Apple dyld diagnostics only; no additional Mach-O file-type support.
  • Evidence, artifact, provenance, or reconstruction contract: original stdout/stderr and exit status remain available.
  • Target selection, authority, upstream behavior, and cleanup details: existing read-only tools; no new target execution or mutation.
  • Generated metadata, package, or installation impact: no source contract or package metadata changes.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Process launch refers to the existing inspection utilities; the selected target is not executed.

Evidence and regression coverage

  • Tests added or updated: eleven new inspection-boundary cases using the existing native command fixture. Three controls preserve exact stdout/stderr/path-prefixed refusals; eight regressions cover extra errors, duplicate refusals, and mixed missing-UUID/dSYM diagnostics.
  • Base reproduction or other evidence: six new mixed/duplicate cases failed on upstream behavior, while the three controls passed. Two further cross-diagnostic cases exposed an unintended path into successful normalization through the missing-UUID shortcut. Both shortcuts now share one exact-diagnostic admission rule.
  • User-visible CLI/MCP output: simulated captures verify unsupported/error classification and preservation of stdout, stderr and exit status. No fresh real CLI/MCP result is claimed.
  • Remaining proof gaps: no fresh real native-provider, compiled CLI/MCP, or complete source-suite verification on the published merge head. Focused tests and fast typecheck/lint passed on the resolved local merge; hosted CI has outstanding failures described below.

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

Published merge head: a27bfc9bef7065a44d0e36afb83cbfb219648d22; upstream parent: aba487eec0303b3392dbea7f33846617158aad3f.

Merged current upstream main without conflicts. This includes upstream's fixture-size repair in 2acdd54130c7a07c78168ff1b2d8f98b598319ac. The contribution remains two files, and both contribution files are unchanged from the preceding published head afe6f31feb9fd306ee3d2751d78f9eaf5486434a.

Reused validation:

  • The earlier narrowed implementation passed 36 focused NativeMachoInspection.test.ts tests and npm run check:fast on Node 24.22.1 after its prior conflict resolution. Those results were not rerun for this merge.
  • Existing upstream CI on the exact merged main parent passed, including static checks and all eight test shards: https://github.com/morluto/rea/actions/runs/40134623872. This is upstream evidence, not verification of the combined PR head.

New merge checks: reviewed the upstream-relative two-file contribution, confirmed no changes to its implementation or regression-test file, confirmed inclusion of the upstream repair, and passed git diff --cached --check before committing. The remote branch and PR head match the published merge commit. Current-head hosted CI is pending.

No local test, build, native-provider, compiled CLI/MCP, or broad static suite was repeated. The prior head's JavaScript parent-memory budget failure was not repaired in this contribution; new CI remains authoritative. Historical broader-branch real-tool and 93-test receipts do not verify this narrowed implementation.

Compatibility, safety, and release

  • Breaking changes or migration steps: no schema migration. Mixed diagnostics no longer qualify as an exact known refusal.
  • Real Hopper/Ghidra, browser, or OS coverage: not run for this revision.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: existing target authority and original captures are preserved.

Author readiness

Human owner: @jdotc1

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem within existing inspection.
  • The contribution has one focused outcome.
  • Related issue is linked.
  • New cases cover the changed admission behavior and controls.
  • Applicable final static/hosted checks and real-provider coverage are complete; gaps remain documented above.

🔄 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/5778 **Author:** [@jdotc1](https://github.com/jdotc1) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/5708-dsym-target-refusal` --- ### 📝 Commits (10+) - [`fa2d36a`](https://github.com/morluto/rea/commit/fa2d36a6924611dbf6b8c85ad1c0e053f8cdb05b) fix(native): classify confirmed dSYM dyld refusals - [`e808d3d`](https://github.com/morluto/rea/commit/e808d3d39ed5690e3f322de9b849c775cb51ab7b) style(native): format target refusal handling - [`b05086e`](https://github.com/morluto/rea/commit/b05086e02bd1b52540aad99ee1c2b1f823bed86a) chore: merge reviewed upstream fixes into Mach-O diagnostics - [`f4514ba`](https://github.com/morluto/rea/commit/f4514bac2a1182e0d16df355b2d16e5c8904eafe) fix(native): confirm precise Mach-O layout refusals before export fallback - [`4328588`](https://github.com/morluto/rea/commit/43285889b7161fd3ed2f78e1594f4f2e85adb73f) test(cli): observe cancellation at stable source resolution boundary - [`71b24ce`](https://github.com/morluto/rea/commit/71b24cec022266dec2100830e7f83803ea4ebff9) fix(native): reject contradictory dyld layout refusals - [`5f9e3ce`](https://github.com/morluto/rea/commit/5f9e3ce84700cb64c91fcff878d67eadd900f800) fix(native): preserve mixed dyld diagnostic failures - [`0af4ad9`](https://github.com/morluto/rea/commit/0af4ad995121557e459e136c9e2ed0ad9091e57e) merge: reconcile target-refusal fix with current main - [`c4ebaf6`](https://github.com/morluto/rea/commit/c4ebaf62589a933ef528ae381079e34a7b6be0f0) fix(native): retain the evidence behind contradictory layout refusals - [`945315f`](https://github.com/morluto/rea/commit/945315f2f8fb77045951bbcb625c4703fe725014) chore: merge upstream main for dSYM refusal ### 📊 Changes **2 files changed** (+134 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/native/NativeMachoCommandDiagnostics.ts` (+19 -9) 📝 `src/native/NativeMachoInspection.test.ts` (+115 -0) </details> ### 📄 Description ## Summary Follow up on upstream's dSYM refusal fix in f83d97fe. Require one exact dyld diagnostic before treating a nonzero result as a known refusal. Additional stdout/stderr diagnostics remain errors with their captures preserved. Refs #5708; the basic dSYM classification is already upstream. ## Problem and expected behavior The upstream predicate searches for a matching line in either stream. A recognized dSYM line plus an unrelated error is therefore classified as unsupported instead of retaining the mixed result as an inspection failure. A second admission predicate can also accept a mixed missing-UUID/dSYM output and continue inspection. ## Change and scope Normalize settled dyld output once in the existing command-diagnostics owner and admit exactly one nonempty diagnostic. Preserve stdout-only admission for missing UUID and upstream's stdout-or-stderr support for the observed dSYM refusal. Keep upstream header validation and error/capture projection. The contribution changes two files. The previous CORE/FVMLIB expansion, canonical file-type parser changes, and real-CLI test timeout change are removed from this follow-up. Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). This is an ordinary correction to existing read-only inspection; no new provider or execution capability is introduced. ## Contract and boundary impact - Semantic owner and earliest changed stage: admission of settled native command diagnostics. - Contribution scope fit and linked maintainer decision: existing inspection correction; new-capability decision is not applicable. - CLI and MCP/tool-catalog contract: mixed native errors retain the existing output-error result; exact target refusals retain existing classification. - Provider, bridge, target-format, or platform compatibility: Apple dyld diagnostics only; no additional Mach-O file-type support. - Evidence, artifact, provenance, or reconstruction contract: original stdout/stderr and exit status remain available. - Target selection, authority, upstream behavior, and cleanup details: existing read-only tools; no new target execution or mutation. - Generated metadata, package, or installation impact: no source contract or package metadata changes. Expected effects: - [x] Read existing files or captured data. - [x] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. Process launch refers to the existing inspection utilities; the selected target is not executed. ## Evidence and regression coverage - Tests added or updated: eleven new inspection-boundary cases using the existing native command fixture. Three controls preserve exact stdout/stderr/path-prefixed refusals; eight regressions cover extra errors, duplicate refusals, and mixed missing-UUID/dSYM diagnostics. - Base reproduction or other evidence: six new mixed/duplicate cases failed on upstream behavior, while the three controls passed. Two further cross-diagnostic cases exposed an unintended path into successful normalization through the missing-UUID shortcut. Both shortcuts now share one exact-diagnostic admission rule. - User-visible CLI/MCP output: simulated captures verify unsupported/error classification and preservation of stdout, stderr and exit status. No fresh real CLI/MCP result is claimed. - Remaining proof gaps: no fresh real native-provider, compiled CLI/MCP, or complete source-suite verification on the published merge head. Focused tests and fast typecheck/lint passed on the resolved local merge; hosted CI has outstanding failures described below. 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 Published merge head: `a27bfc9bef7065a44d0e36afb83cbfb219648d22`; upstream parent: `aba487eec0303b3392dbea7f33846617158aad3f`. Merged current upstream main without conflicts. This includes upstream's fixture-size repair in `2acdd54130c7a07c78168ff1b2d8f98b598319ac`. The contribution remains two files, and both contribution files are unchanged from the preceding published head `afe6f31feb9fd306ee3d2751d78f9eaf5486434a`. Reused validation: - The earlier narrowed implementation passed 36 focused `NativeMachoInspection.test.ts` tests and `npm run check:fast` on Node 24.22.1 after its prior conflict resolution. Those results were not rerun for this merge. - Existing upstream CI on the exact merged main parent passed, including static checks and all eight test shards: https://github.com/morluto/rea/actions/runs/40134623872. This is upstream evidence, not verification of the combined PR head. New merge checks: reviewed the upstream-relative two-file contribution, confirmed no changes to its implementation or regression-test file, confirmed inclusion of the upstream repair, and passed `git diff --cached --check` before committing. The remote branch and PR head match the published merge commit. Current-head hosted CI is pending. No local test, build, native-provider, compiled CLI/MCP, or broad static suite was repeated. The prior head's JavaScript parent-memory budget failure was not repaired in this contribution; new CI remains authoritative. Historical broader-branch real-tool and 93-test receipts do not verify this narrowed implementation. ## Compatibility, safety, and release - Breaking changes or migration steps: no schema migration. Mixed diagnostics no longer qualify as an exact known refusal. - Real Hopper/Ghidra, browser, or OS coverage: not run for this revision. - Package or release metadata impact: none. - Security, privacy, process, or containment review: existing target authority and original captures are preserved. ## Author readiness Human owner: @jdotc1 - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem within existing inspection. - [x] The contribution has one focused outcome. - [x] Related issue is linked. - [x] New cases cover the changed admission behavior and controls. - [ ] Applicable final static/hosted checks and real-provider coverage are complete; gaps remain documented above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:45:00 +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#7054
No description provided.