Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
b49177e
fix(environment): keep read-only POSTs out of the write list
earakely-scale Oct 22, 2026
d5a1fa9
fix(environment): take an entity an unplanned write made when a read …
earakely-scale Oct 22, 2026
004b064
fix(environment): plan a create into the type its returned id is read…
earakely-scale Oct 22, 2026
d8f9c05
fix(environment): end a type's initial reads at the write its reads d…
earakely-scale Oct 22, 2026
64e472a
fix(environment): replay request lines that show entities in another …
earakely-scale Oct 22, 2026
28c3ae9
docs(environment): specify and record the state-target changes
earakely-scale Oct 22, 2026
48d7fae
fix(environment): keep a read-only POST a write when its evidence is …
earakely-scale Oct 22, 2026
5d48df7
fix(environment): answer a field selection only when the state shows …
earakely-scale Oct 22, 2026
ce2301d
fix(environment): hold adopted entities and linked creates to what th…
earakely-scale Oct 22, 2026
48106e1
Merge remote-tracking branch 'origin/main' into feat/environment-stat…
earakely-scale Oct 22, 2026
6656816
docs(environment): record the review fixes' measurements
earakely-scale Oct 22, 2026
22e27b1
fix(environment): release a discarded planning pass before planning a…
earakely-scale Oct 22, 2026
5702983
fix(environment): link no create whose id an earlier read showed, and…
earakely-scale Oct 22, 2026
0cf3b27
fix(environment): let the gate skip exactly the reads serving replays
earakely-scale Oct 22, 2026
096b1ca
Merge remote-tracking branch 'origin/main' into feat/environment-stat…
earakely-scale Oct 22, 2026
197b1a3
docs(environment): record the second review round's checks
earakely-scale Oct 22, 2026
5e2e84c
Merge remote-tracking branch 'origin/main' into st
earakely-scale Oct 23, 2026
0ed9e8c
fix(environment): read writes, links and creation cuts only from evid…
earakely-scale Oct 23, 2026
ed78be2
docs(environment): record the third review round's checks
earakely-scale Oct 23, 2026
c983edf
fix(environment): tie linked creates to their returned ids and order …
earakely-scale Oct 23, 2026
fa9f69c
docs(environment): record the fourth review round's checks
earakely-scale Oct 23, 2026
b8c164e
Merge commit '5d6b8a0ab' into st
earakely-scale Oct 23, 2026
f044816
Merge commit 3c5c887a2 into st
earakely-scale Oct 23, 2026
a6adf12
Merge commit '5f702dd6c^' into st
earakely-scale Oct 23, 2026
92f88a9
Merge commit 5f702dd6c into st
earakely-scale Oct 23, 2026
d04ba9d
Merge remote-tracking branch 'origin/main' into st
earakely-scale Oct 23, 2026
294fa3c
fix(environment): keep foreign keys, stale reads and double decoding …
earakely-scale Oct 23, 2026
ce9a153
docs(environment): record the fifth review round's checks
earakely-scale Oct 23, 2026
169842b
fix(environment): compare linked sources by position, decode path fie…
earakely-scale Oct 23, 2026
e3c5b23
docs(environment): record the sixth review round's checks
earakely-scale Oct 23, 2026
a3dbf79
Merge remote-tracking branch 'origin/main' into st
earakely-scale Oct 23, 2026
ca3eead
fix(environment): replay late and variant-only items, fill linked pat…
earakely-scale Oct 23, 2026
eb9344b
docs(environment): record the seventh review round's checks
earakely-scale Oct 23, 2026
94b8c55
fix(environment): blame a failed read on the writes whose fields it d…
earakely-scale Oct 23, 2026
fcf8d1a
fix(environment): explain unsent update changes and nested clocks by …
earakely-scale Oct 23, 2026
b1ca254
fix(environment): order collections by whole lines and sort only arra…
earakely-scale Oct 23, 2026
59439f5
Merge remote-tracking branch 'origin/main' into st
earakely-scale Oct 23, 2026
189152d
feat(environment): serve bulk writes at a collection and target item …
earakely-scale Oct 23, 2026
147ff45
fix(environment): decide late item lines against the lines left, char…
earakely-scale Oct 23, 2026
8876143
docs(environment): record the eighth review round's checks
earakely-scale Oct 23, 2026
6037875
fix(environment): set aside response members a path mints anew on eve…
earakely-scale Oct 23, 2026
342933e
fix(environment): count only reads finished before a linked create be…
earakely-scale Oct 23, 2026
0caf400
Merge #6385 head 342933ea into feat/environment-write-rules
earakely-scale Oct 23, 2026
cfa8310
fix(environment): count a list total nested in a paging object
earakely-scale Oct 23, 2026
65ba035
fix(environment): take a created entity's nested clocks from its read…
earakely-scale Oct 23, 2026
9d0dc27
fix(environment): import the compare tool definition as a type
earakely-scale Oct 23, 2026
c567281
docs(environment): describe the new write rules and trim repeated par…
earakely-scale Oct 23, 2026
7ef08a3
fix(environment): confirm no update whose clocks or fields the eviden…
earakely-scale Oct 23, 2026
434db04
fix(environment): show pinned query and body values in the served cat…
earakely-scale Oct 23, 2026
08c2532
docs(environment): specify and record the write-rule changes
earakely-scale Oct 23, 2026
456cfdf
Merge remote-tracking branch 'origin/main' into st
earakely-scale Oct 23, 2026
e08f003
fix(environment): keep served creates' items missing, check same-type…
earakely-scale Oct 23, 2026
e4c4940
docs(environment): record the ninth review round's checks
earakely-scale Oct 23, 2026
fd67f4f
Merge commit '0bbd635ab^' into wr2
earakely-scale Oct 23, 2026
d447349
Merge commit 0bbd635ab into wr2
earakely-scale Oct 23, 2026
391fe2c
Merge commit 'e4c494087' into wr2
earakely-scale Oct 23, 2026
1c8588a
Merge remote-tracking branch 'origin/main' into st
earakely-scale Oct 23, 2026
6ee9703
fix(environment): link creates past empty item reads, sweep repeated …
earakely-scale Oct 23, 2026
88ee22e
docs(environment): record the tenth review round's checks
earakely-scale Oct 23, 2026
72f0442
Merge commit '88ee22e2d' into wr2
earakely-scale Oct 23, 2026
d3828d5
fix(environment): take bulk ids literally, check each recorded call's…
earakely-scale Oct 23, 2026
364891b
docs(environment): record the review fixes' checks
earakely-scale Oct 23, 2026
2c0e7bd
Merge remote-tracking branch 'origin/main' into st
earakely-scale Oct 23, 2026
12e4df7
Merge remote-tracking branch 'origin/main' into wr2
earakely-scale Oct 24, 2026
5d612dc
Merge commit '2c0e7bdde' into wr2
earakely-scale Oct 24, 2026
c166a69
Merge remote-tracking branch 'origin/main' into st
earakely-scale Oct 24, 2026
4e622bb
Merge commit 'c166a694e6abd7e9c3c16ae4f938d0ef9f0d8fb6' into wr2
earakely-scale Oct 24, 2026
9614465
perf(environment): compare variant lines through shared entities and …
earakely-scale Oct 24, 2026
53b2966
docs(environment): record the eleventh review round's checks
earakely-scale Oct 24, 2026
715c578
Merge commit '53b2966c5' into wr2
earakely-scale Oct 24, 2026
f151988
Merge remote-tracking branch 'origin/main' into feat/environment-stat…
kaoru0822-kitauji Oct 24, 2026
b82e276
Merge remote-tracking branch 'origin/main' into feat/environment-writ…
kaoru0822-kitauji Oct 24, 2026
3dd85f2
perf(environment): list a type's collections only when the path's own…
earakely-scale Oct 24, 2026
f55c731
Merge remote-tracking branch 'origin/main' into st
earakely-scale Oct 24, 2026
6273d9b
Merge commit 'f55c73151' into wr2
earakely-scale Oct 24, 2026
dee4dd7
docs(environment): record the twelfth review round's checks and the s…
earakely-scale Oct 24, 2026
751af03
Merge commit 'dee4dd757a5a55f920f32c956f951ab4509c07f0' into wr2
earakely-scale Oct 24, 2026
f01215d
docs(environment): record the 50-capture sweep's wall, CPU and peak m…
earakely-scale Oct 24, 2026
3608c5a
Merge remote-tracking branch 'fork/feat/environment-state-targets' in…
earakely-scale Oct 24, 2026
5a6b4f1
Merge commit '3608c5aa2c2bd5aaa4c9786bdb9855996134e11b' into wr2
earakely-scale Oct 24, 2026
7584387
Merge remote-tracking branch 'fork/feat/environment-write-rules' into…
earakely-scale Oct 24, 2026
192db6c
chore: integrate latest main into environment write rules
gensokyo-dev Oct 24, 2026
3b66ee2
fix(environment): remove duplicate schema after main integration
gensokyo-dev Oct 24, 2026
f501e23
fix(environment): honor recorded bulk identity kinds
gensokyo-dev Oct 24, 2026
2c62bb9
fix(environment): retain scoped evidence and honor write defaults
gensokyo-dev Oct 24, 2026
352c027
test(environment): keep SDK regressions independently scoped
gensokyo-dev Oct 24, 2026
de4035a
docs(environment): record scoped write verification and measured costs
gensokyo-dev Oct 24, 2026
9942863
Merge remote-tracking branch 'origin/main' into integrate/6897-write-…
gensokyo-dev Oct 24, 2026
b3d706f
chore: merge main into environment write rules
morluto Oct 24, 2026
41aff3d
fix(environment): serve bulk writes whose response lists each entity …
earakely-scale Oct 24, 2026
a319ba1
docs(environment): measure the 50 captures at the scoped-envelope head
earakely-scale Oct 24, 2026
3fe3b0a
fix(environment): classify bulk responses and release verifier transf…
morluto Oct 24, 2026
f4bc513
fix(environment): classify and verify complete bulk responses
gensokyo-dev Oct 24, 2026
390541e
fix(javascript): retain capture context along covered mutation paths
morluto Oct 24, 2026
72ce7d6
merge: retain author bulk regressions with shared response verification
gensokyo-dev Oct 24, 2026
5ae634f
test(environment): verify bulk responses through the real MCP SDK
gensokyo-dev Oct 24, 2026
585d71c
test(environment): separate bulk response proof regressions
gensokyo-dev Oct 24, 2026
e73355e
chore: retain concurrent bulk response verification
morluto Oct 24, 2026
3e1b023
fix(environment): preserve request absence and generated value relati…
gensokyo-dev Oct 24, 2026
ac5f217
Merge commit 'e73355e1326aeaf4558d5a913596de627ae35bb2' into integrat…
gensokyo-dev Oct 24, 2026
034eed4
merge: sync main and keep its canonical JavaScript mutation analysis
gensokyo-dev Oct 24, 2026
75817ba
fix(environment): verify complete nested clocks on creates
gensokyo-dev Oct 24, 2026
5b91c99
fix(javascript): erase inline type imports before binding values
morluto Oct 24, 2026
ea64ca4
chore: sync main and retain canonical JavaScript binding fixes
morluto Oct 24, 2026
130121f
fix(environment): share complete generated value verification
gensokyo-dev Oct 24, 2026
7f01865
fix(verifiers): load the Windows source graph only when needed
gensokyo-dev Oct 24, 2026
7360127
fix(environment): validate write responses before stored clock restamps
gensokyo-dev Oct 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(environment): describe the new write rules and trim repeated par…
…sing

The environment and capture docs describe sorted arrays, per-response members, nested
counters, item actions, bulk writes, the new write rules and refusals, and their known
limits. `_order` is a direction only. Sorted-array retries and the per-response scan
parse only the reads they need, and identifier words come from one helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • Loading branch information
earakely-scale and claude committed Oct 23, 2026
commit c56728186b5e5cb045fa3b88047377317eff0cee
61 changes: 52 additions & 9 deletions docs/agent-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,14 @@ An item or list view that always spells a clock field otherwise than the
entity's stored value names that spelling in `clock_formats`, and a value it
never recorded, such as a created entity's clock, is rendered in it: a list that
writes `+00:00` where item reads write `Z` lists a new entity the same way.
A view that names a field in `sorted_arrays` lists that string array sorted, as
a read-back showed the application does, while the state keeps it in the order
it was written, so a write's own answer echoes it. Members a view names in
`per_response_members`, such as a request id each response mints, keep the
value its recording carried. A list's `counters` and `query.totals` are
top-level members or members one level down in a paging object
(`/pageInfo/totalRows`); either is set to the number listed or matched, and
members beside it such as `isLastPage` stay as recorded.

A list or document call that names no checked line, including a line recorded
after a write or with other query values, answers from the recording. Every
Expand Down Expand Up @@ -475,20 +483,38 @@ tools are not served, so no call claims a change it does not make; each one's
plan states why in its `reason`. A served write changes the live state, which
every MCP session and `data/get` then see:

| Effect | Call |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `create` | Adds an entity to the collection the path names, built from the observed entity with each ruled field taken from the call or generated, at the plan's `insert` position. A plan tied to its exemplar's collection writes only there. |
| `update` | Sets the sent members on the entity the path names, constants for members accepted only with their recorded value, and the clock, nested clock, increment, slug, stamp, derived, unique and renewed changes the plan models. |
| `delete` | Removes the entity the path names. |
| `document` | Merges the body into the plan's document object, or replaces it for `PUT`. |
| Effect | Call |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `create` | Adds an entity to the collection the path names, built from the observed entity with each ruled field taken from the call or generated, at the plan's `insert` position. A plan tied to its exemplar's collection writes only there. |
| `update` | Sets the sent members on the entity the path names, constants for members accepted only with their recorded value, and the clock, nested clock, increment, slug, stamp, derived, unique and renewed changes the plan models. |
| `update` (action) | A `POST`, `PUT` or `PATCH` to an item path plus an action segment (`/{type}/{id}/archive`) sets, on the entity before the segment, each scalar the recorded calls showed the action set (`set`), with any sent members; it is served only when a recorded call found those fields already set, so a toggle never is. |
| `delete` | Removes the entity the path names. |
| bulk `update` or `delete` | A `DELETE`, `PUT` or `PATCH` at a collection, or a `POST` to it plus `delete`, `remove` or `destroy`, applies its effect to every entity the body names, as recorded: an array of ids or of objects carrying the id field, at the root or as the body's one array member (`{"IDs": […], "Read": true}`). |
| `document` | Merges the body into the plan's document object, or replaces it for `PUT`. |

An update's unsent changes follow the plan's rules. A `held-clock` is a clock
the client sends back as it read it and the application stamps anew (Ghost's
`updated_at`): the call must send the entity's value and the field takes the
write's clock. A `nested-clock` sets the clocks inside an object the entity
holds, in that object's recorded format. A `stamp` writes the acting user
the entity already names under its `created…by` counterpart into a
`modified…by` or `updated…by` field. A `derived` field takes a value showing
the one sent member's text that the entity stores nowhere (a field Ghost
derives from `html`), only with that member's recorded value. An action's
`set` rule sets a scalar to the value the recorded calls left it at.

Its answer has the status and content type of the plan's recorded response,
with the written entity or its identity rendered in, no body, or the recorded
body. A call whose body is not an object, sends a member the capture did not
show stored, sends a fixed member with another value or a member of another
JSON type, or lacks a required member is a tool error naming the accepted
members; so is a rendered answer missing a field the recorded response
carried, and an update or delete of an entity the state does not hold answers
members; so is a call sending query parameters other than the exemplar's (they
may change what the body does), a body not wrapped in the exemplar's envelope
(Ghost's `{"posts": [{…}]}`), a bulk call naming an id the state does not hold,
a `held-clock` member sent with another value than the entity holds, a call
sending a `derived` rule's member to an entity that does not hold the value the
recorded call found, a nested clock on an entity holding no such object, and a
rendered answer missing a field the recorded response carried, and an update or delete of an entity the state does not hold answers
the recorded 400, 404 or 410 of the tool or of an item view of the type, if
any. A refused call leaves the state unchanged. Values a write generates are
deterministic: the clock starts at `write_clock` and advances one second per
Expand All @@ -497,7 +523,8 @@ largest they generated, and UUIDs and tokens derive from the state Evidence
id, tool, field and write count, skipping held values. `data/reset` and
`data/add` restart the clock, counter and sequences, so the same calls after a
reset give the same state. Answers carry `state: {"source": "state", "view":
"create" | "update" | "delete", …}` or `"document-write"`.
"create" | "update" | "delete", …}` or `"document-write"`; a bulk answer adds
`ids`, every entity it wrote in body order, with `id` naming the first.

The data plane serves three JSON-RPC methods:

Expand Down Expand Up @@ -652,6 +679,22 @@ after an update and referential rules on delete are not modelled. An exported
bundle carries no state file: its server derives the state at startup, as the
export does to predict what it serves.

Known limits of served writes:

- A recorded view answers from its recordings after a served write: Mailpit's
`get_messages`, recorded as `list-differs`, still lists a message a served
delete removed.
- Served n8n workflow updates accept any `versionId`, while served Ghost post
updates require `updated_at` to match the entity (a `held-clock`).
- A slug derived from a title can repeat across served creates with the same
title, where the application would make it unique.
- A served create's sequence id is the state's next value, not the gaps an
application's own sequence would leave.
- Nested clocks are served in the spelling of the write's own response, which
can differ from what a later read of the application shows.
- A served write to an entity that a replayed (unserved) create made answers
as for a missing entity, since the state never held it.

## Export a bundle

`rea environment-export` writes the same pair as a bundle folder the agentenv
Expand Down
39 changes: 23 additions & 16 deletions docs/web-network-captures.md
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,11 @@ repeated reads of one full request line whose list membership changes across a
write, including transitions to or from an empty list, or whose entity fields
are added or removed. A type whose reads still disagree keeps every tool a
recorded view with reason `fields-differ`. Different query strings remain distinct request lines. Sparse responses do not erase the last observation of a field supplied by another request line. Entities are ordered
by type, collection and first sighting; that order is a list's state order.
by type and collection, and within a collection as the first line that lists
every entity any initial read shows in it and names no sort, direction or
random parameter (`random`, `rand`, `shuffle`, `seed`) lists them; a collection
without such a line keeps its entities' earliest sightings. That order is a
list's state order.
Every entity cites its `record_ordinals`.

`views` lists one plan per read tool in tool order:
Expand Down Expand Up @@ -644,22 +648,25 @@ collection, what each query parameter does, and names the result in `query`.
Each such line is explained by the first combination of roles that lists
exactly what it recorded from the collection's initial entities:

| Role | Parameter | Effect |
| ----------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `filter` | any, on a `field` every listed item holds the value in | entities whose field equals the value as text, or whose array field holds it directly or as an object's `id`, `slug` or `name` |
| `search` | `q`, `query`, `search`, `searchTerm`, `term`, `keyword`(s) | entities with one of `fields` containing the value, ignoring case; the fields are those it matched in the listed items, URLs only where nothing else matched |
| `sort` | `order`, `orderBy`, `ordering`, `sort`, `sortBy` (and `_by` spellings) | ordered by the field the value names (`name`, `-name`, `name:desc`, `name-ASC`): numbers by value, text ignoring case, null last ascending, ties in state order |
| `direction` | `dir`, `direction`, `order`, `orderDirection`, `sortDir`, `sortOrder` with `asc` or `desc` | the sort's direction |
| `limit` | `limit`, `per_page`, `perPage`, `page_size`, `size`, `count`, `take`, `itemsPerPage` | page size; zero or a negative value lists every match |
| `offset` | `offset`, `start`, `_start`, `skip` | matches skipped before the page |
| `page` | `page` | page number, counted from `first` (1 or 0, whichever explains the line) |
| `inert` | any | changes nothing for its recorded `values`; other values are not computed |

Lines that disagree on a parameter's role drop it, inert values gather and
search fields unite. `query.record_ordinals` are the lines the merged roles
| Role | Parameter | Effect |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `filter` | any other, on a `field` every listed item holds the value in; one not named like the field (`shelf`, or `shelf_id`, for `shelf`) stands only when lines giving it two different values agree on it | entities whose field equals the value as text, or whose array field holds it directly or as an object's `id`, `slug` or `name` |
| `search` | `q`, `query`, `search`, `searchTerm`, `term`, `keyword`(s) | entities with one of `fields` containing the value, ignoring case; the fields are those it matched in the listed items, URLs only where nothing else matched; a term that matched no field leaves the parameter inert until another line's term does |
| `sort` | a name asking for an order in any common spelling: `sort`, `_sort`, `sort[]`, `sort[0][field]`, `sorters[...]`, `sortBy`, `sort-column`, `sortKey`, `order`, `orderBy`, `ordering` | ordered by the field the value names (`name`, `-name`, `name:desc`, `name-ASC`): numbers by value, text ignoring case, null last ascending, ties in state order |
| `direction` | a direction name (`dir`, `direction`, `sortDir`, `sortOrder`, `sortDirection`, `order_direction`, json-server's `_order`, and `order`) given `asc`, `desc`, `ascending` or `descending`; given anything else, `order` is a `sort` and the others are ordinary parameters | the sort's direction |
| `limit` | `limit`, `per_page`, `perPage`, `page_size`, `size`, `count`, `take`, `itemsPerPage` | page size; zero or a negative value lists every match |
| `offset` | `offset`, `start`, `_start`, `skip` | matches skipped before the page |
| `page` | `page` | page number, counted from `first` (1 or 0, whichever explains the line) |
| `inert` | any that names no order or direction; never a true `reverse`, or a paging value that is not a safe integer | changes nothing for its recorded `values`; other values are not computed |

No two parameters of one call take the same `sort`, `direction` or paging role,
and a line with more than 12 query parameters is left unexplained. Lines that
disagree on a parameter's role drop it, inert values gather and search fields
unite. `query.record_ordinals` are the lines the merged roles
reproduce, envelope and fields included, and `query.totals` the envelope
members that count every match before paging on each of them (a
`number`-of-items member counts the page). The roles are inferences from the
members that count every match before paging on each of them, top-level or one
level down in a paging object (`/pageInfo/totalRows`); a `number`-of-items
member counts the page. The roles are inferences from the
recorded lines; a line they do not reproduce keeps its recorded members.

`writes` lists one plan per tool whose request may change state, in tool
Expand Down
Loading