Commit Graph
8 Commits
Author SHA1 Message Date
Edgar ArakelyanandClaude Opus 5.5 9f513d07e5 fix(environment): check reads on the lines serving answers, and refuse plans later calls contradict
Greptile raised these on the list-lines branch against this branch's code.
- The gate chooses a read's line as serving does. A read with no query on a whole list falls back to a checked line that only pages it, and a line whose query repeats a name, which no call can name, is never checked.
- A read made while a modelled write to its targets was still running, starting before that write ended, checks nothing either way.
- A later call that stores a member otherwise than the plan (echoed by one call and stored as something else by another, or ruled differently) refuses the plan as unexplained, rather than keeping the first rule.
- A create keeps the spelling of a collection the capture listed empty: checked list lines of the type join the known spellings, so an encoded argument is not encoded twice.
- containsDelimited walks children one at a time, since spreading a very wide array into push overflowed the stack.
- The guide counts the confirmed write tools among the served catalog and the verifier's expected count.

Attribution bookkeeping moves to environmentStateWriteAttribution.ts and the create's collection choice to environmentStateCollections.ts, keeping files under the line limit. The verdicts over the 50 captures are unchanged plan by plan, and the smoke applies all 31 served write tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 08:22:31 -07:00
Edgar ArakelyanandClaude Opus 5.5 fe8ab58483 fix(environment): erase overwritten fields from earlier write effects, and keep the Evidence's spellings after a load
- A later write now removes the fields it overwrites from each earlier effect, and an effect is dropped once nothing is left. Two writes that together overwrite all of an update's changes leave no read able to confirm it.
- A write whose recorded outcome becomes the entity's baseline erases what earlier writes changed on that entity. Their claims on the collection go too, except a create's membership.
- A reset or load knows the collection spellings of the Evidence's own state as well as the installed state's. A create after a load that dropped a collection keeps its recorded spelling instead of encoding an encoded argument twice. Spellings from a state since replaced are still forgotten.

The verdicts over the 50 captures are unchanged plan by plan, and the smoke applies all 31 served write tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:56:56 -07:00
Edgar ArakelyanandClaude Opus 5.5 dc5e2aadff fix(environment): weigh an update's derived changes when a later write replaces it, and reset collection spellings
- An update's effect is now every field it sent or changed, derived ones included. A later write replaces it only by overwriting all of them, and an increment adds to its field rather than overwriting it. A PATCH that renames and bumps a version stays confirmed after a PUT that renames but keeps the version.
- The entity-level and collection-level records of what each write changed are kept apart, each forgotten when its own target is checked.
- A reset or load starts from the collection spellings of the state it installs, as a fresh store does, rather than keeping those of the state it replaced.

The verdicts over the 50 captures are unchanged plan by plan, and the smoke applies all 31 served write tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:18:34 -07:00
Edgar ArakelyanandClaude Opus 5.5 1d1c478764 fix(environment): confirm a write only by reads that still see it, and keep started values and spellings
- A read whose body no longer holds the entity, or no longer holds the list, or shows an entity without its required fields, now contradicts the write it checks instead of passing it by default. Serving and the gate share one required-field test.
- A later write that replaces an earlier one's effect (a create or delete, or an update rewriting the same fields) drops the earlier write from the entity and, once it has no entity left there, from the collection. A list taken after a delete no longer confirms the create it removed.
- Generated sequences skip every value the loaded state started with, so a deleted entity's id is not handed out again.
- A create into an emptied collection keeps the collection's spelling.

The 50-capture census still serves 31 write tools: Linkding's bundle create and patch are now unconfirmed, because the only list that checked them was taken after the bundle was deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:31:26 -07:00
Edgar ArakelyanandClaude Opus 5.5 5327e59852 fix(environment): choose a read's checked line as replay chooses the call's
Keying checked lines by the raw path skipped a read serving still
answers: with the list recorded at /api/orgs/%61cme1/books, a later
/api/orgs/acme1/books read names the same line through replay's decoded
fallback, so it went unchecked while serving listed the encoded
collection, and a delete it contradicted stayed served.

The gate now ranks a view's checked lines for a read as replay ranks
them for its call: every parameter the read's value verbatim or once
percent-decoded and the same query, then the most verbatim parameters,
then recorded order. A list is compared from the collection of the line
it answers from, as serving lists it, in the check, the taint checks and
the insert retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:51:36 -07:00
Edgar ArakelyanandClaude Opus 5.5 db8df45f4b fix(environment): keep checked lines' path spellings; check later slug rules by value
- Checked lines now keep the path as spelled and canonicalise only the
  query: replay prefers a verbatim path spelling, so two spellings of
  one parent (acme1 and %61cme1 under one templated tool) stay separate
  lines and each read is compared with its own line's envelope.
- A slug rule a later call shows is checked against the values earlier
  calls recorded (the slug of the source they sent against the slug
  they showed), not only their member names, so a call that resent an
  unchanged name no longer hides the tool; an increment still conflicts
  with an earlier call that showed an integer field unchanged.

The view fixture takes template rules so the gate can be tested over
templated parents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:38:28 -07:00
Edgar ArakelyanandClaude Opus 5.5 2086da6cc7 fix(environment): make the write gate and serving agree on lines, rules, inserts and documents
Five places where the gate approved a write serving would answer
differently:
- list and document reads are matched to checked lines as serving
  matches calls (path and query values decoded, the query in any
  order), so a reordered query no longer hides a contradiction;
- an increment or slug applies to every call, so a plan is
  unexplained-change when one call changes such a field and another
  leaves it as it was, in either order;
- an item read confirming a create no longer stops a later list from
  choosing another insert candidate; only a list check fixes the rule;
- the gate runs serving's document body check (accepted members, JSON
  types from the held and initial document), so a recorded write that
  serving would refuse leaves the plan unserved;
- a served create decodes its path values from the collection the call
  names, as the gate decoded the recorded path, whichever spelling the
  call used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:12:34 -07:00
Edgar ArakelyanandClaude Opus 5.5 138ea4b198 fix(environment): judge writes by the full served response; model only 2xx writes
The write gate confirmed effects the served environment would not show:
- a list check let a member the state no longer holds pass, so a
  filtered list still showing a deleted entity confirmed the delete; it
  now compares the whole list serving would return;
- item and list checks compared only the entity, so a wrapper member
  that changed after the write (a revision, say) went unnoticed while
  serving kept the base recording's; reads are now compared as the full
  response rendered into the item view's or the line's base envelope;
- a later update's constant rule kept no value, so serving stored the
  first observation's; each constant rule now carries the value the
  call that showed it recorded, and the gate and serving read it alike;
- a redirected or unanswered write could become the example or a
  modelled effect; only a 2xx write is modelled, others taint as
  unmodelled writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:09:16 -07:00