[PR #681] [CLOSED] fix(native): preserve final demangled symbol whitespace #2163

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/681
Author: @rudycelekli
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: fix/rea-demangle-whitespace-20261006


📝 Commits (1)

  • b2b8b2e fix(native): preserve final demangled symbol whitespace

📊 Changes

2 files changed (+28 additions, -1 deletions)

View changed files

➕ src/native/parsers/demangle.test.ts (+27 -0)
📝 src/native/parsers/demangle.ts (+1 -1)

📄 Description

Problem

The Swift demangler parser calls trimEnd() on the whole utility output before splitting rows. This removes legitimate trailing spaces or tabs from the final unchanged symbol. A final symbol consisting of a space loses its row entirely and the native operation fails with an output-count mismatch.

Change

Remove only the utility's final line terminator, preserving each symbol's content and input ordering. Retain CRLF support and existing invalid/unchanged classifications.

Verification

  • Before fix: the added focused whitespace regression fails.
  • Actual host xcrun swift-demangle --compact preserves the ordinary trailing space, tab and single-space symbols. The public NativeMacOSProvider demangle operation fails with the count mismatch before the fix and returns all four ordered rows after it, including the genuine Swift mangled control.
  • After fix: all 19 focused parser/provider tests pass, and all five npm run check tasks pass using Node 24.18.0 and locked dependencies.

This proves the Swift utility/parser boundary on this host. It does not claim target execution, Ghidra or Hopper verification.

AI assistance was used for investigation, implementation, tests and this description. The patch was independently reviewed, tested and submitted by the contributor; native proof and limitations are stated 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/681 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/rea-demangle-whitespace-20261006` --- ### 📝 Commits (1) - [`b2b8b2e`](https://github.com/morluto/rea/commit/b2b8b2e8443733e9700ba283813c98c9b1c4b6c5) fix(native): preserve final demangled symbol whitespace ### 📊 Changes **2 files changed** (+28 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `src/native/parsers/demangle.test.ts` (+27 -0) 📝 `src/native/parsers/demangle.ts` (+1 -1) </details> ### 📄 Description ## Problem The Swift demangler parser calls `trimEnd()` on the whole utility output before splitting rows. This removes legitimate trailing spaces or tabs from the final unchanged symbol. A final symbol consisting of a space loses its row entirely and the native operation fails with an output-count mismatch. ## Change Remove only the utility's final line terminator, preserving each symbol's content and input ordering. Retain CRLF support and existing invalid/unchanged classifications. ## Verification - Before fix: the added focused whitespace regression fails. - Actual host `xcrun swift-demangle --compact` preserves the ordinary trailing space, tab and single-space symbols. The public `NativeMacOSProvider` demangle operation fails with the count mismatch before the fix and returns all four ordered rows after it, including the genuine Swift mangled control. - After fix: all 19 focused parser/provider tests pass, and all five `npm run check` tasks pass using Node 24.18.0 and locked dependencies. This proves the Swift utility/parser boundary on this host. It does not claim target execution, Ghidra or Hopper verification. AI assistance was used for investigation, implementation, tests and this description. The patch was independently reviewed, tested and submitted by the contributor; native proof and limitations are stated above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:15:05 +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#2163
No description provided.