mirror of
https://github.com/morluto/rea.git
synced 2026-10-29 02:45:58 +00:00
Foundation encodes `encode(_:forKey: "UID")` as a `$top` dictionary whose single key is `UID`. The keyed archive projection treated every one-key `UID`/`CF$UID` dictionary as a reference marker, so that root became a malformed reference and the real link to its object was lost. Treat a one-key dictionary as a UID only when its value is a number, matching the binary decoder's UID shape and Foundation's XML `CF$UID` rule; otherwise descend into it as an ordinary dictionary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>