[PR #1104] [MERGED] fix(apple): report missing keyed archive hierarchy references #2652

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1104
Author: @rudycelekli
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @N0zoM1z0

Base: main ← Head: validation/interface-builder-dangling-uid-20261008


📝 Commits (2)

  • 69afcaf test(apple): qualify malformed native hierarchy references
  • fa1ebd1 fix(apple): report missing keyed archive hierarchy references

📊 Changes

6 files changed (+475 additions, -17 deletions)

View changed files

📝 docs/native-investigation.md (+7 -0)
📝 src/domain/apple/interfaceBuilderGraph.ts (+28 -13)
📝 src/domain/apple/interfaceBuilderKeyedArchive.ts (+14 -4)
📝 tests/boundary/filesystem/nibNativeHierarchy.test.ts (+55 -0)
➕ tests/conformance/native/interface-builder-malformed-uid.swift (+170 -0)
➕ tests/fixtures/interfaceBuilderMalformedUid.ts (+201 -0)

📄 Description

Summary

A missing nonnil UID in a keyed archive hierarchy was silently discarded while the document still reported a complete hierarchy. Count those missing references and propagate the loss through existing coverage fields. Preserve decoded objects, known links, archived nil UID 0, cycle handling, and original serialized-byte evidence.

The result reports partial hierarchy coverage and an omission reason rather than calling this loss a graph limit. No public schema, workflow, dependency, or existing assertion changes.

Native reproduction and qualification

The fixture uses an actual Foundation/AppKit archive with a root and two children. An independent oracle validates original identities and links, Foundation validates the rewritten plist, and an inverse whole-table comparison proves precisely one child-reference slot changed. A separately archived optional nil is the negative control. Tests exercise the public filesystem consumer and compiled CLI without instantiating archived application classes or running a target application.

  • BEFORE: frozen tests-only signed commit 69afcaf31ad9d373e29b5049decdf7acfaa47dd2; CI 37811102031, native Apple job. Both dangling cases fail because actual hierarchy_complete is true; four original/optional-nil controls and 44 neighboring native tests pass. Producer validity, original-byte hashes, and valid root/sibling assertions pass before those failures. Later facet assertions stop at the summary failure, so BEFORE facet values are source inference.
  • AFTER: signed DCO commit fa1ebd1bdc5fa2e7c96e320743a3346a133b5de9; CI 37812934457, native Apple job. All six unchanged native cases and all 44 neighboring native tests pass; subsequent native groups of 14, 3, 4, and 41 also pass. Both dangling consumers assert summary false, partial coverage with a nonempty reason, and an omission or explicit unknown. Concrete reason/count/truncation values are source-derived rather than emitted result JSON.
  • All 22 unchanged full CI jobs pass on that exact AFTER head, including static/docs and native platform package lanes. Four digest-verified shard artifacts report 5,112 passes, 54 skips, zero retries and unhandled errors. Linux native skips are not counted as native qualification.

All three regression files are byte-for-byte unchanged between BEFORE and AFTER. Final source/policy and all-state overlap checks pass; the docs addition appends at the unchanged end and preserves accepted documentation changes. Upstream integration CI is pending after creation.

Related: #480. This is one malformed-reference coverage repair, independent of the XML byte encoding work in #1095.


🔄 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/1104 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/8/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `validation/interface-builder-dangling-uid-20261008` --- ### 📝 Commits (2) - [`69afcaf`](https://github.com/morluto/rea/commit/69afcaf31ad9d373e29b5049decdf7acfaa47dd2) test(apple): qualify malformed native hierarchy references - [`fa1ebd1`](https://github.com/morluto/rea/commit/fa1ebd1bdc5fa2e7c96e320743a3346a133b5de9) fix(apple): report missing keyed archive hierarchy references ### 📊 Changes **6 files changed** (+475 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `docs/native-investigation.md` (+7 -0) 📝 `src/domain/apple/interfaceBuilderGraph.ts` (+28 -13) 📝 `src/domain/apple/interfaceBuilderKeyedArchive.ts` (+14 -4) 📝 `tests/boundary/filesystem/nibNativeHierarchy.test.ts` (+55 -0) ➕ `tests/conformance/native/interface-builder-malformed-uid.swift` (+170 -0) ➕ `tests/fixtures/interfaceBuilderMalformedUid.ts` (+201 -0) </details> ### 📄 Description ## Summary A missing nonnil UID in a keyed archive hierarchy was silently discarded while the document still reported a complete hierarchy. Count those missing references and propagate the loss through existing coverage fields. Preserve decoded objects, known links, archived nil UID 0, cycle handling, and original serialized-byte evidence. The result reports partial hierarchy coverage and an omission reason rather than calling this loss a graph limit. No public schema, workflow, dependency, or existing assertion changes. ## Native reproduction and qualification The fixture uses an actual Foundation/AppKit archive with a root and two children. An independent oracle validates original identities and links, Foundation validates the rewritten plist, and an inverse whole-table comparison proves precisely one child-reference slot changed. A separately archived optional nil is the negative control. Tests exercise the public filesystem consumer and compiled CLI without instantiating archived application classes or running a target application. - BEFORE: frozen tests-only signed commit `69afcaf31ad9d373e29b5049decdf7acfaa47dd2`; [CI 37811102031](https://github.com/rudycelekli/rea/actions/runs/37811102031), [native Apple job](https://github.com/rudycelekli/rea/actions/runs/37811102031/job/113427928182). Both dangling cases fail because actual `hierarchy_complete` is true; four original/optional-nil controls and 44 neighboring native tests pass. Producer validity, original-byte hashes, and valid root/sibling assertions pass before those failures. Later facet assertions stop at the summary failure, so BEFORE facet values are source inference. - AFTER: signed DCO commit `fa1ebd1bdc5fa2e7c96e320743a3346a133b5de9`; [CI 37812934457](https://github.com/rudycelekli/rea/actions/runs/37812934457), [native Apple job](https://github.com/rudycelekli/rea/actions/runs/37812934457/job/113435070127). All six unchanged native cases and all 44 neighboring native tests pass; subsequent native groups of 14, 3, 4, and 41 also pass. Both dangling consumers assert summary false, partial coverage with a nonempty reason, and an omission or explicit unknown. Concrete reason/count/truncation values are source-derived rather than emitted result JSON. - All 22 unchanged full CI jobs pass on that exact AFTER head, including static/docs and native platform package lanes. Four digest-verified shard artifacts report 5,112 passes, 54 skips, zero retries and unhandled errors. Linux native skips are not counted as native qualification. All three regression files are byte-for-byte unchanged between BEFORE and AFTER. Final source/policy and all-state overlap checks pass; the docs addition appends at the unchanged end and preserves accepted documentation changes. Upstream integration CI is pending after creation. Related: #480. This is one malformed-reference coverage repair, independent of the XML byte encoding work in #1095. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:08:39 +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#2652
No description provided.