The store's own copy of one record's value, at every depth.
`ownRequest` lifts each record out of its descriptor into an object with
no prototype. That closed threat 27 for the record set and left it open one
level down: the values inside were kept by reference, so an object nested
in a record still inherited from `Object.prototype`, a list from
`Array.prototype`, and `JSON.stringify` still ran whatever `toJSON` a
polluted prototype carried, a getter, or a class's own method, while the
commit reported success.
This walks a value once and rebuilds it from descriptors, holding it to
the rules the record set follows: plain objects and lists only, string
keys, enumerable data properties, nothing JSON cannot carry, and no cycle.
Every container comes back frozen with no prototype, so the text
`JSON.stringify` writes depends only on data the store read itself.
Values stay the caller's. An `undefined` field is left out, as an absent
optional field reads back, and a number JSON cannot write becomes `null`,
exactly as before. What changed is that nothing can run while the text is
produced, and nothing leaves the shape without a failure.
A failure names the record only. A nested key can be data the caller
would never log, so no message repeats one.
The store's own copy of one record's value, at every depth.
`ownRequest` lifts each record out of its descriptor into an object with no prototype. That closed threat 27 for the record set and left it open one level down: the values inside were kept by reference, so an object nested in a record still inherited from `Object.prototype`, a list from `Array.prototype`, and `JSON.stringify` still ran whatever `toJSON` a polluted prototype carried, a getter, or a class's own method, while the commit reported success.
This walks a value once and rebuilds it from descriptors, holding it to the rules the record set follows: plain objects and lists only, string keys, enumerable data properties, nothing JSON cannot carry, and no cycle. Every container comes back frozen with no prototype, so the text `JSON.stringify` writes depends only on data the store read itself.
Values stay the caller's. An `undefined` field is left out, as an absent optional field reads back, and a number JSON cannot write becomes `null`, exactly as before. What changed is that nothing can run while the text is produced, and nothing leaves the shape without a failure.
A failure names the record only. A nested key can be data the caller would never log, so no message repeats one.