mirror of
https://github.com/morluto/rea
synced 2026-10-27 14:42:18 -04:00
113679c9a6
* feat(environment): take created entities' read-backs and re-derived update members - A create's observation takes the fields the first read of its entity shows that the answer lacks, and an item read's clock spellings, when the read agrees with the answer otherwise. The plan records the read (observation.read with its shape); an item read then observes rather than checks, a list read only adds fields and still checks. Serving merges the same recorded objects. - An update member sent back as the clock the entity held and stored as a fresh clock near the call is a clock rule; one stored as the slug of another member stored as sent is a slug rule. Both are accepted with any value, as whole-object writes send what they read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): record the write-views verification Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): reconcile write views without hiding contradictions * fix(environment): reject incompatible slug-only saves --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
3.3 KiB
3.3 KiB
Writes whose answers show the entity otherwise than reads, and whole-object updates
Issue: https://github.com/morluto/rea/issues/4933
Outcome
Agents built environments from a prompt for five applications the prompt flow had never seen (Vikunja, Ghost, EspoCRM, Paperless-ngx and Miniflux). Two write-model gaps withheld most of their creates and edits:
- A create's answer is another view of the entity than its reads. Paperless answers a tag create without the
document_countits item read shows. EspoCRM answers a contact create without nine fields its item read shows. Vikunja answers a label create with a partialcreated_byand clocks to the nanosecond, where reads show the full user and whole seconds. Ghost answers a tag create without thecountits list shows. The state built the entity from the answer alone, so the read-back contradicted the create. - A whole-object update sends back what the application derives. Paperless's UI sends the tag's old
slugwith a new name, and the application slugs the name anew. Ghost's UI sends theupdated_atit read, and the application stamps a new one. The update was withheld asunexplained-change, or its first call's value was pinned so that later calls conflicted.
Behaviour
- Read-backs. When the first read of a created entity before the next write shows fields the create's answer lacks,
or spells its clocks to another precision, the observed entity takes them, and the plan records the read
(
observation.read, with its shape).- An item read that agrees with the answer otherwise lends its fields and its clock spellings (whole seconds of a nanosecond clock, or microseconds of one), and no longer confirms the create. One that disagrees on another value, or omits an answer field its item view renders, still checks the create, which it contradicts.
- A list read, which may show fewer keys of an object, only adds fields the answer lacks and still checks the create.
- A read that shows nothing new leaves the observation as it was and still confirms the create.
- Serving merges the same two recorded objects, so a served create answers in its answer's shape and stores the fields of both. Generated clocks in the create answer retain that answer's recorded precision independently of the stored read-back precision.
- Restamped clocks. An update member sent back as the clock the entity held, and stored as a fresh clock near the
call, is a
clockrule, accepted with any value. - Re-derived slugs. An update member stored as the slug of another member the call stored as sent is a
slugrule from that member, accepted with any value. - Compatible saves. A call that echoes an already-derived slug or holds a clock in its own recorded second does not conflict with a demonstrated derivation, in either call order. A slug derivation must reproduce earlier saves as well; an explicit custom slug that disagrees still withholds the update.
Plans and views that need none of this are unchanged.
Acceptance
- The held-out recordings serve EspoCRM's contact create and Paperless's tag edit.
- A create whose item read-back disagrees with its answer on another value is still contradicted.
- No write tool of the 69 recorded captures goes from served to withheld.