[PR #976] [MERGED] fix(apple): traverse keyed archive hierarchy collections #2547

Closed
opened 2026-10-17 21:07:25 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: codex/audit-wave3-native


📝 Commits (1)

  • 30b708a fix(apple): traverse keyed archive hierarchy collections

📊 Changes

4 files changed (+302 additions, -64 deletions)

View changed files

📝 src/domain/apple/interfaceBuilderGraph.ts (+57 -44)
📝 src/domain/apple/interfaceBuilderKeyedArchive.ts (+66 -20)
📝 tests/boundary/filesystem/interfaceBuilderBundle.test.ts (+162 -0)
➕ tests/conformance/native/keyed-archive-hierarchy.swift (+17 -0)

📄 Description

What changed

Compiled NSKeyedArchiver hierarchies can store child collections as UID references to NSArray or NSMutableArray objects. The parser treated those wrappers as hierarchy nodes and skipped their NS.objects entries; it also imposed a recursive depth-32 cutoff. Deep AppKit view hierarchies could therefore lose their parent-child relationships while appearing complete.

The parser now recognizes collection wrappers from their archived $classes metadata and walks their members iteratively in source order, preserving UID-based cycle handling. Graph projection is iterative too, and still applies the caller's max_objects limit. The unexplained depth cutoff is removed.

A local Foundation/AppKit fixture archives a 40-child NSView chain. The real producer regression verifies all 41 hierarchy edges and complete coverage. Synthetic regressions cover deep NSArray-wrapped records and source order.

Verification

  • npm run test:focused -- tests/boundary/filesystem/interfaceBuilderBundle.test.ts tests/boundary/filesystem/nibNativeHierarchy.test.ts src/domain/apple/interfaceBuilderGraph.test.ts (28 tests passed; includes macOS AppKit archive producer)
  • npm run check:fast
  • npm run format:check
  • git diff --check

Real fixture execution was performed on macOS arm64 using the installed Xcode/Swift toolchain. No Windows runtime claim applies to this change.


🔄 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/976 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/audit-wave3-native` --- ### 📝 Commits (1) - [`30b708a`](https://github.com/morluto/rea/commit/30b708ad53823e2a92357d8f8eae2b8508b2fffe) fix(apple): traverse keyed archive hierarchy collections ### 📊 Changes **4 files changed** (+302 additions, -64 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/apple/interfaceBuilderGraph.ts` (+57 -44) 📝 `src/domain/apple/interfaceBuilderKeyedArchive.ts` (+66 -20) 📝 `tests/boundary/filesystem/interfaceBuilderBundle.test.ts` (+162 -0) ➕ `tests/conformance/native/keyed-archive-hierarchy.swift` (+17 -0) </details> ### 📄 Description ## What changed Compiled `NSKeyedArchiver` hierarchies can store child collections as UID references to `NSArray` or `NSMutableArray` objects. The parser treated those wrappers as hierarchy nodes and skipped their `NS.objects` entries; it also imposed a recursive depth-32 cutoff. Deep AppKit view hierarchies could therefore lose their parent-child relationships while appearing complete. The parser now recognizes collection wrappers from their archived `$classes` metadata and walks their members iteratively in source order, preserving UID-based cycle handling. Graph projection is iterative too, and still applies the caller's `max_objects` limit. The unexplained depth cutoff is removed. A local Foundation/AppKit fixture archives a 40-child `NSView` chain. The real producer regression verifies all 41 hierarchy edges and complete coverage. Synthetic regressions cover deep NSArray-wrapped records and source order. ## Verification - `npm run test:focused -- tests/boundary/filesystem/interfaceBuilderBundle.test.ts tests/boundary/filesystem/nibNativeHierarchy.test.ts src/domain/apple/interfaceBuilderGraph.test.ts` (28 tests passed; includes macOS AppKit archive producer) - `npm run check:fast` - `npm run format:check` - `git diff --check` Real fixture execution was performed on macOS arm64 using the installed Xcode/Swift toolchain. No Windows runtime claim applies to this change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:07:25 +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#2547
No description provided.