[PR #3156] [CLOSED] fix(apple): mark limited Interface Builder hierarchies incomplete #5645

Closed
opened 2026-10-31 01:08:13 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3156
Author: @Aliciawque
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/interface-builder-hierarchy-completeness-20261014


📝 Commits (1)

  • 559830c fix(apple): mark limited Interface Builder hierarchies incomplete

📊 Changes

3 files changed (+213 additions, -17 deletions)

View changed files

📝 docs/native-investigation.md (+6 -0)
📝 src/domain/apple/interfaceBuilderGraph.ts (+21 -17)
➕ tests/acceptance/applications/interfaceBuilderHierarchyLimits.test.ts (+186 -0)

📄 Description

Summary

At max_objects: 2, Interface Builder decoding can report a complete document hierarchy after graph limits omit its root or a required endpoint. The document summary and hierarchy coverage now share a document-local status, so CLI results, complete MCP Evidence and MCP summaries agree.

No issue is linked: searches for hierarchy_complete and hierarchy limits found #2547, which covers earlier-document truncation incorrectly affecting a retained later document. Its existing [false, true] control still passes. No overlapping open PR was found.

Problem and expected behavior

Executed against upstream 767fe0f0ccbab3ae4be28e71cc8214c7cd302133 with synthetic XML plist NIBs:

Trigger Original CLI / stdio MCP Corrected result
Two documents, one object each; the first consumes the two-node budget hierarchy_complete: [true, true]; the second hierarchy facet is already partial with one omitted edge [true, false]; that facet stays partial
One document with objects kept, omitted; hierarchy references only omitted hierarchy_complete: [true], hierarchy facet complete, despite a retained unresolved edge with endpoint_omitted_by_object_limit [false], hierarchy facet partial

Both cases retain two nodes, one edge and graph.truncated: true. An emitted unresolved edge remains examined and is not counted as an omitted edge.

Change and scope

The graph producer marks the current document's hierarchy truncated when a hierarchy source, destination or edge cannot be retained. One computed hierarchy status feeds both the document flag and coverage. This removes their duplicated completeness decisions while retaining document isolation.

The change is an ordinary correctness fix within existing static artifact decoding. A separate maintainer scope decision is not applicable. Android projection, provider acquisition and runtime target behavior are outside this PR.

Contract and boundary impact

  • Semantic owner / earliest stage: buildInterfaceBuilderAnalysis, in the domain graph producer.
  • CLI/MCP contracts: existing arguments and result schemas; corrected completeness values propagate through existing complete and summary delivery.
  • Evidence/provenance: decoded nodes, retained unresolved edges, original archive bytes and hashes remain preserved.
  • Authority / cleanup: existing read-only decoding; regression fixtures own their files and await CLI/MCP cleanup.
  • Metadata / packaging: no package, lockfile or generated contract changes.
  • Cost: no additional traversal or graph expansion. No performance improvement is claimed; CPU, peak process-family memory and model-token effects were not measured.

Expected production effect:

  • Read existing files or captured data.

Evidence and regression coverage

Added two acceptance cases using the compiled CLI and real stdio MCP SDK, including summary parent identity, CLI/MCP parity, per-document coverage, retained edge integrity and unchanged archive bytes. Before the production fix, both fail on the incorrect hierarchy_complete values after the CLI/MCP parity and summary checks succeed.

Existing interfaceBuilderGraph.test.ts retains the #2547 control. Relevant filesystem decoding and MCP summary coverage also pass.

Validation performed

Windows x64, Node 24.11.1, npm 11.12.1; these differ from the development pins (Node 24.18.0 / npm 11.16.0). Dependencies match the lockfile and came from the official npm registry, installed with lifecycle scripts disabled; the reviewed repository prepare script was run separately. Optional Frida installation was not needed.

  • Original production code + new acceptance cases: 2 expected failures, with [true, true] and [true].
  • npm run test:focused -- src/domain/apple/interfaceBuilderGraph.test.ts tests/acceptance/applications/interfaceBuilderHierarchyLimits.test.ts tests/boundary/filesystem/interfaceBuilderBundle.test.ts tests/boundary/mcp/interfaceBuilderSummaryMcp.test.ts tests/acceptance/applications/interfaceBuilderUIKitKeyedArchive.test.ts: 5 files; 40 passed, 24 skipped.
  • Final new acceptance file rerun: 2 passed.
  • npm run check: passed (typecheck, lint with zero errors and reported warnings, formatting, Knip, metadata, module boundaries and architecture guards).
  • npm run verify:test-discovery: all 1,244 test files discovered exactly once.
  • npm run docs:check: passed, including 5 README consistency tests.
  • git diff --check: passed.

Compatibility, safety, and release

No breaking schema change, migration or release metadata change. Synthetic archives verify the portable decoding workflow on Windows. The 24 platform/toolchain skips are macOS/Xcode-dependent cases; actual ibtool-generated AppKit/storyboard coverage was not run on this host. No Hopper, Ghidra or target application execution claim is made.

Before merge

  • One focused, reproduced problem and Conventional PR title.
  • Scope and authority fit existing static decoding.
  • Changed observable behavior has regression coverage.
  • Owning documentation reflects completeness and omission semantics.
  • Public CLI/MCP behavior and unavailable coverage are stated.
  • Final diff contains no generated outputs, credentials or unrelated changes.
  • Required CI checks pass for the final PR head.

CI verification for 559830c1998a3cf02bb81e1baa9a8ae67df535e2: CI run 38513116695 and Conventional PR title run 38513116815 both succeeded. Portable test aggregation reported 13,971 tests passed / 123 skipped, across 1,231 files passed / 13 skipped; source tests and all five built-dependent test shards succeeded.

Real Apple E2E and the Windows-specific lane were skipped. Actual macOS/ibtool validation remains unavailable on this host. This PR remains a draft.


🔄 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/3156 **Author:** [@Aliciawque](https://github.com/Aliciawque) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/interface-builder-hierarchy-completeness-20261014` --- ### 📝 Commits (1) - [`559830c`](https://github.com/morluto/rea/commit/559830c1998a3cf02bb81e1baa9a8ae67df535e2) fix(apple): mark limited Interface Builder hierarchies incomplete ### 📊 Changes **3 files changed** (+213 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `docs/native-investigation.md` (+6 -0) 📝 `src/domain/apple/interfaceBuilderGraph.ts` (+21 -17) ➕ `tests/acceptance/applications/interfaceBuilderHierarchyLimits.test.ts` (+186 -0) </details> ### 📄 Description ## Summary At `max_objects: 2`, Interface Builder decoding can report a complete document hierarchy after graph limits omit its root or a required endpoint. The document summary and hierarchy coverage now share a document-local status, so CLI results, complete MCP Evidence and MCP summaries agree. No issue is linked: searches for `hierarchy_complete` and hierarchy limits found #2547, which covers earlier-document truncation incorrectly affecting a retained later document. Its existing `[false, true]` control still passes. No overlapping open PR was found. ## Problem and expected behavior Executed against upstream `767fe0f0ccbab3ae4be28e71cc8214c7cd302133` with synthetic XML plist NIBs: | Trigger | Original CLI / stdio MCP | Corrected result | | --- | --- | --- | | Two documents, one object each; the first consumes the two-node budget | `hierarchy_complete: [true, true]`; the second hierarchy facet is already partial with one omitted edge | `[true, false]`; that facet stays partial | | One document with objects `kept`, `omitted`; hierarchy references only `omitted` | `hierarchy_complete: [true]`, hierarchy facet complete, despite a retained unresolved edge with `endpoint_omitted_by_object_limit` | `[false]`, hierarchy facet partial | Both cases retain two nodes, one edge and `graph.truncated: true`. An emitted unresolved edge remains examined and is not counted as an omitted edge. ## Change and scope The graph producer marks the current document's hierarchy truncated when a hierarchy source, destination or edge cannot be retained. One computed hierarchy status feeds both the document flag and coverage. This removes their duplicated completeness decisions while retaining document isolation. The change is an ordinary correctness fix within existing static artifact decoding. A separate maintainer scope decision is not applicable. Android projection, provider acquisition and runtime target behavior are outside this PR. ## Contract and boundary impact - Semantic owner / earliest stage: `buildInterfaceBuilderAnalysis`, in the domain graph producer. - CLI/MCP contracts: existing arguments and result schemas; corrected completeness values propagate through existing complete and summary delivery. - Evidence/provenance: decoded nodes, retained unresolved edges, original archive bytes and hashes remain preserved. - Authority / cleanup: existing read-only decoding; regression fixtures own their files and await CLI/MCP cleanup. - Metadata / packaging: no package, lockfile or generated contract changes. - Cost: no additional traversal or graph expansion. No performance improvement is claimed; CPU, peak process-family memory and model-token effects were not measured. Expected production effect: - [x] Read existing files or captured data. ## Evidence and regression coverage Added two acceptance cases using the compiled CLI and real stdio MCP SDK, including summary parent identity, CLI/MCP parity, per-document coverage, retained edge integrity and unchanged archive bytes. Before the production fix, both fail on the incorrect `hierarchy_complete` values after the CLI/MCP parity and summary checks succeed. Existing `interfaceBuilderGraph.test.ts` retains the #2547 control. Relevant filesystem decoding and MCP summary coverage also pass. ## Validation performed Windows x64, Node 24.11.1, npm 11.12.1; these differ from the development pins (Node 24.18.0 / npm 11.16.0). Dependencies match the lockfile and came from the official npm registry, installed with lifecycle scripts disabled; the reviewed repository prepare script was run separately. Optional Frida installation was not needed. - Original production code + new acceptance cases: **2 expected failures**, with `[true, true]` and `[true]`. - `npm run test:focused -- src/domain/apple/interfaceBuilderGraph.test.ts tests/acceptance/applications/interfaceBuilderHierarchyLimits.test.ts tests/boundary/filesystem/interfaceBuilderBundle.test.ts tests/boundary/mcp/interfaceBuilderSummaryMcp.test.ts tests/acceptance/applications/interfaceBuilderUIKitKeyedArchive.test.ts`: **5 files; 40 passed, 24 skipped**. - Final new acceptance file rerun: **2 passed**. - `npm run check`: passed (typecheck, lint with zero errors and reported warnings, formatting, Knip, metadata, module boundaries and architecture guards). - `npm run verify:test-discovery`: all **1,244** test files discovered exactly once. - `npm run docs:check`: passed, including **5** README consistency tests. - `git diff --check`: passed. ## Compatibility, safety, and release No breaking schema change, migration or release metadata change. Synthetic archives verify the portable decoding workflow on Windows. The 24 platform/toolchain skips are macOS/Xcode-dependent cases; actual ibtool-generated AppKit/storyboard coverage was not run on this host. No Hopper, Ghidra or target application execution claim is made. ## Before merge - [x] One focused, reproduced problem and Conventional PR title. - [x] Scope and authority fit existing static decoding. - [x] Changed observable behavior has regression coverage. - [x] Owning documentation reflects completeness and omission semantics. - [x] Public CLI/MCP behavior and unavailable coverage are stated. - [x] Final diff contains no generated outputs, credentials or unrelated changes. - [x] Required CI checks pass for the final PR head. CI verification for `559830c1998a3cf02bb81e1baa9a8ae67df535e2`: [CI run 38513116695](https://github.com/morluto/rea/actions/runs/38513116695) and [Conventional PR title run 38513116815](https://github.com/morluto/rea/actions/runs/38513116815) both succeeded. [Portable test aggregation](https://github.com/morluto/rea/actions/runs/38513116695/job/115687981825) reported **13,971 tests passed / 123 skipped**, across **1,231 files passed / 13 skipped**; source tests and all five built-dependent test shards succeeded. Real Apple E2E and the Windows-specific lane were skipped. Actual macOS/ibtool validation remains unavailable on this host. This PR remains a draft. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:08:13 +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#5645
No description provided.