[GH-ISSUE #495] [Feature] Decode Foundation keyed archives into object-reference graphs #265

Closed
opened 2026-10-15 18:23:12 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @morluto on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/495

Area

Evidence, artifacts, or reconstruction

Current limitation

REA can normalize property lists and decode compiled Interface Builder archives into UI graphs. General Foundation NSKeyedArchiver payloads remain a property-list-shaped object table: callers must manually resolve $top, $objects, CF$UID references, class descriptors, conditional links, and cycles to understand the saved model graph.

Use cases

  • Inspect application save files and persisted model state without launching the application.
  • Understand nested model ownership and identity links in local or cloud archive payloads.
  • Compare serialized object graphs across app versions while keeping build-specific schema claims explicit.

Desired outcome

Provide a read-only, bounded decoder for Foundation keyed archives that returns roots, typed object nodes, keyed/array edges, class descriptors, and UID/reference edges with cycle handling. Preserve original archive bytes and artifact provenance. Never instantiate application classes or run decoding code from the target. Unrecognized classes and unsupported value types should remain explicit unknown nodes rather than disappearing or being coerced to empty values.

Success criteria

  • Deterministic fixtures cover binary and XML property-list keyed archives, nested dictionaries/arrays, shared and cyclic references, conditional references, class descriptors, missing roots, and malformed UIDs.
  • Results distinguish archived null/nil, missing keys, unresolved references, unsupported types, and decoder failures.
  • Limits and truncation counts are exact; original artifact digest and source path/object identity are retained.
  • A selected root can be inspected without implicitly extracting or modifying files.
  • Tests verify the parser never loads or executes archived classes.

Relationship to existing capabilities

This complements inspect_plist and decode_interface_builder. Interface Builder decoding is a specialized archive interpretation; this capability should expose the reusable Foundation object/reference graph primitive and allow higher-level formats to add semantic projections later.

Originally created by @morluto on GitHub (Oct 2, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/495 ## Area Evidence, artifacts, or reconstruction ## Current limitation REA can normalize property lists and decode compiled Interface Builder archives into UI graphs. General Foundation `NSKeyedArchiver` payloads remain a property-list-shaped object table: callers must manually resolve `$top`, `$objects`, `CF$UID` references, class descriptors, conditional links, and cycles to understand the saved model graph. ## Use cases - Inspect application save files and persisted model state without launching the application. - Understand nested model ownership and identity links in local or cloud archive payloads. - Compare serialized object graphs across app versions while keeping build-specific schema claims explicit. ## Desired outcome Provide a read-only, bounded decoder for Foundation keyed archives that returns roots, typed object nodes, keyed/array edges, class descriptors, and UID/reference edges with cycle handling. Preserve original archive bytes and artifact provenance. Never instantiate application classes or run decoding code from the target. Unrecognized classes and unsupported value types should remain explicit unknown nodes rather than disappearing or being coerced to empty values. ## Success criteria - Deterministic fixtures cover binary and XML property-list keyed archives, nested dictionaries/arrays, shared and cyclic references, conditional references, class descriptors, missing roots, and malformed UIDs. - Results distinguish archived null/nil, missing keys, unresolved references, unsupported types, and decoder failures. - Limits and truncation counts are exact; original artifact digest and source path/object identity are retained. - A selected root can be inspected without implicitly extracting or modifying files. - Tests verify the parser never loads or executes archived classes. ## Relationship to existing capabilities This complements `inspect_plist` and `decode_interface_builder`. Interface Builder decoding is a specialized archive interpretation; this capability should expose the reusable Foundation object/reference graph primitive and allow higher-level formats to add semantic projections later.
bsakaguchi 2026-10-15 18:23:12 +00:00
Author
Owner

@morluto commented on GitHub (Oct 8, 2026):

Verified fixed on main (7a7460f0). KeyedArchiveReader.ts + domain/apple/keyedArchive.ts ship object-reference graph decoding with keyedArchive.test.ts passing. Closing per audit.

<!-- gh-comment-id:6071373871 --> @morluto commented on GitHub (Oct 8, 2026): Verified fixed on main (7a7460f0). KeyedArchiveReader.ts + domain/apple/keyedArchive.ts ship object-reference graph decoding with keyedArchive.test.ts passing. Closing per audit.
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#265
No description provided.