[PR #5114] fix(apple): derive keyed archive classes from their descriptors #6769

Open
opened 2026-11-01 21:42:54 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5114
Author: @AlexandreAbreuCzr
Created: 10/18/2026
Status: 🔄 Open

Base: main ← Head: codex/fix-keyed-archive-class-identity


📝 Commits (1)

  • ebed97d fix(apple): derive keyed archive classes from their descriptors

📊 Changes

3 files changed (+146 additions, -10 deletions)

View changed files

📝 src/domain/apple/interfaceBuilderGraph.test.ts (+75 -0)
📝 src/domain/apple/interfaceBuilderKeyedArchive.ts (+18 -10)
📝 tests/boundary/filesystem/interfaceBuilderBundle.test.ts (+53 -0)

📄 Description

Summary

Interface Builder decoding can report an archived NSView as NSButton when its data contains className: "NSButton". Reversing dictionary key order changes the reported class, and the authored field is lost either way. A dictionary containing only className can also be mistaken for an archived object.

Cause and change

The resolver renamed $class to a synthetic className property in the same object as authored fields. Derive identity independently through the existing classNameOf(raw) owner, retain authored fields and inline $class references, and keep missing class descriptors unresolved. UID reference stubs retain their existing shape.

This corrects existing static decoding. No new provider, execution authority, inputs, schemas, dependencies or generated metadata are introduced. Advance maintainer scope approval is not applicable. No specific duplicate fix was found in the searches performed, so no issue is marked as fixed.

Evidence and validation

  • Four new domain cases fail against original production code at 29910d16b and pass with the fix. They cover both binary-plist key orders, unresolved classes, ordinary dictionaries and inline fields.
  • A new compiled CLI regression verifies that both objects remain view/NSView and retain their authored className attributes.
  • npm run check passed: typecheck, lint, formatting, Knip, metadata, module boundaries and architecture guards.
  • Domain suite: 220 files / 4,329 tests passed. Targeted Interface Builder/keyed archive/plist selection: 42 passed.
  • npm run build:cached, npm run verify:test-discovery and git diff --check passed.
  • Focused filesystem/CLI and MCP selection: 24 passed, 1 failed, 24 skipped. The new CLI regression and MCP summary test passed. The failure is the preexisting decodes an archive whose date the decoder cannot represent expectation; it also fails with the original production file. The current decoder represents its year-11507 fixture as +011507-08-17T05:20:00.000Z, so the expected unknown-date limitation is absent. That independent test drift is unchanged here.

Compatibility and limitations

Affected archives now report descriptor-derived class/kind values and preserve authored className data. Inline dictionaries retain $class rather than a synthesized className; UID stub shape is unchanged. This changes incorrect prior output without changing the public input schemas.

Tested on Windows x64 with Node 24.18.0/npm 11.16.0 and the verified native controls from the matching official rea-agents@6.7.0 package. No real macOS/Foundation/Xcode, disassembler or real-application verification was performed. The complete suite and check:pr were not run. No target execution, injection, mutation, additional network access or performance improvement is introduced or claimed by this change.

Author readiness

Human owner: @AlexandreAbreuCzr (Alexandre Abreu).

  • 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.

🔄 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/5114 **Author:** [@AlexandreAbreuCzr](https://github.com/AlexandreAbreuCzr) **Created:** 10/18/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/fix-keyed-archive-class-identity` --- ### 📝 Commits (1) - [`ebed97d`](https://github.com/morluto/rea/commit/ebed97d5a6f4c07d94b6ad5b83e25ed5aac88cbf) fix(apple): derive keyed archive classes from their descriptors ### 📊 Changes **3 files changed** (+146 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/apple/interfaceBuilderGraph.test.ts` (+75 -0) 📝 `src/domain/apple/interfaceBuilderKeyedArchive.ts` (+18 -10) 📝 `tests/boundary/filesystem/interfaceBuilderBundle.test.ts` (+53 -0) </details> ### 📄 Description ## Summary Interface Builder decoding can report an archived `NSView` as `NSButton` when its data contains `className: "NSButton"`. Reversing dictionary key order changes the reported class, and the authored field is lost either way. A dictionary containing only `className` can also be mistaken for an archived object. ## Cause and change The resolver renamed `$class` to a synthetic `className` property in the same object as authored fields. Derive identity independently through the existing `classNameOf(raw)` owner, retain authored fields and inline `$class` references, and keep missing class descriptors unresolved. UID reference stubs retain their existing shape. This corrects existing static decoding. No new provider, execution authority, inputs, schemas, dependencies or generated metadata are introduced. Advance maintainer scope approval is not applicable. No specific duplicate fix was found in the searches performed, so no issue is marked as fixed. ## Evidence and validation - Four new domain cases fail against original production code at `29910d16b` and pass with the fix. They cover both binary-plist key orders, unresolved classes, ordinary dictionaries and inline fields. - A new compiled CLI regression verifies that both objects remain `view`/`NSView` and retain their authored `className` attributes. - `npm run check` passed: typecheck, lint, formatting, Knip, metadata, module boundaries and architecture guards. - Domain suite: **220 files / 4,329 tests passed**. Targeted Interface Builder/keyed archive/plist selection: **42 passed**. - `npm run build:cached`, `npm run verify:test-discovery` and `git diff --check` passed. - Focused filesystem/CLI and MCP selection: **24 passed, 1 failed, 24 skipped**. The new CLI regression and MCP summary test passed. The failure is the preexisting `decodes an archive whose date the decoder cannot represent` expectation; it also fails with the original production file. The current decoder represents its year-11507 fixture as `+011507-08-17T05:20:00.000Z`, so the expected unknown-date limitation is absent. That independent test drift is unchanged here. ## Compatibility and limitations Affected archives now report descriptor-derived class/kind values and preserve authored `className` data. Inline dictionaries retain `$class` rather than a synthesized `className`; UID stub shape is unchanged. This changes incorrect prior output without changing the public input schemas. Tested on Windows x64 with Node 24.18.0/npm 11.16.0 and the verified native controls from the matching official `rea-agents@6.7.0` package. No real macOS/Foundation/Xcode, disassembler or real-application verification was performed. The complete suite and `check:pr` were not run. No target execution, injection, mutation, additional network access or performance improvement is introduced or claimed by this change. ## Author readiness Human owner: @AlexandreAbreuCzr (Alexandre Abreu). - [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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#6769
No description provided.