mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-04 08:04:37 +08:00
An untyped write of a present declared field of a live record capsule now stores into the native record through a per-shape `set` hook (checked like the commit, refusing to the snapshot path for values the field cannot hold), so the capsule keeps answering from the record instead of turning into a permanent snapshot. Object.assign from a plain object takes the same path, and checked conversions and matches read a capsule through a fresh, uncached snapshot. A checked conversion of a record capsule into a record type whose storage is a same-offset prefix of the capsule's record (and whose extra fields hold no references) passes the pointer: both names keep one object, writes show through either, and the record remembers its own capsule parameters, so every later box of it and the narrower type's reflective surfaces answer for the whole object (decision D3). Other cross-layout conversions keep the refreshed copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>