Skip to content
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
95c8c9d
feat(environment): render more read tools from the state and describe…
cursoragent Oct 21, 2026
ad8f674
feat(environment): apply evidence-gated write effects to the served s…
cursoragent Oct 21, 2026
733833e
feat(environment): model bodiless writes, omitted fields, projected r…
earakely-scale Oct 21, 2026
6f67a11
feat(environment): test and document wider write coverage
earakely-scale Oct 21, 2026
e44adb5
docs(environment): record the write-coverage checks on the current wr…
earakely-scale Oct 21, 2026
a4c4a23
docs(environment): record the re-recorded and end-to-end write-covera…
earakely-scale Oct 21, 2026
6c8f4f7
feat(environment): render more read tools from the state and describe…
cursoragent Oct 21, 2026
378a109
fix(environment): keep rendered documents and quoted samples inside t…
cursoragent Oct 21, 2026
cfb42dd
feat(environment): apply evidence-gated write effects to the served s…
cursoragent Oct 21, 2026
5d0e096
fix(environment): bound and validate write state history
morluto Oct 21, 2026
5b42469
feat(environment): render more read tools from the state and describe…
cursoragent Oct 21, 2026
54c8934
fix(environment): keep rendered documents and quoted samples inside t…
cursoragent Oct 21, 2026
19b50ea
feat(environment): apply evidence-gated write effects to the served s…
cursoragent Oct 21, 2026
a057ea9
fix(environment): bound and validate write state history
morluto Oct 21, 2026
f79f1e1
fix(environment): bound additional collection history
morluto Oct 21, 2026
4a678f1
Merge remote-tracking branch 'live-5600/feat/environment-state-writes…
morluto Oct 21, 2026
7de20bc
fix(environment): credit sent fields, negative sequences, and encoded…
cursoragent Oct 21, 2026
a1076ca
Merge live environment write verification fixes
morluto Oct 21, 2026
d3015d2
test(environment): cover resolved encoded update identities
morluto Oct 21, 2026
cddd3e6
fix: validate timed update observations
morluto Oct 21, 2026
fb6785d
fix(environment): share write overlap and check clocks on earlier calls
cursoragent Oct 21, 2026
d7c5c62
merge: restack environment state writes onto main after #5352
cursoragent Oct 21, 2026
3b34bbd
fix: preserve partial update evidence
morluto Oct 21, 2026
5d00ff3
Merge remote-tracking branch 'live-5600/feat/environment-state-writes…
morluto Oct 21, 2026
067f0fa
fix(environment): keep projected and partial reads out of the write g…
earakely-scale Oct 21, 2026
717ac2c
chore: merge main (8413ec08) into environment state writes
earakely-scale Oct 21, 2026
1074355
chore: merge environment state writes (717ac2c4) into environment wri…
earakely-scale Oct 22, 2026
0061234
chore: merge main (2451e187) into environment write coverage
earakely-scale Oct 22, 2026
70249b3
fix(environment): check the absence a projected read answers, and rea…
earakely-scale Oct 22, 2026
e923fc7
fix(environment): let an unmodelled write explain only the list membe…
earakely-scale Oct 21, 2026
75d7bb0
fix(environment): explain added fields, tie creates to serving's coll…
earakely-scale Oct 21, 2026
cd26a76
docs(environment): state how list reads weigh unmodelled writes, adde…
earakely-scale Oct 22, 2026
2a125b7
chore: merge main (4a4bbab3) into environment state writes
earakely-scale Oct 22, 2026
9517260
chore: merge environment state writes (2a125b71) into environment wri…
earakely-scale Oct 22, 2026
11e3f01
refactor(environment): keep the observing view helpers with the obser…
earakely-scale Oct 22, 2026
cfc43a7
chore: merge environment state writes (11e3f016) into environment wri…
earakely-scale Oct 22, 2026
53a7866
fix(environment): resolve unmodelled writes onto the held collection
cursoragent Oct 22, 2026
329aeed
fix(environment): confirm no write through volatile fields or overwri…
earakely-scale Oct 22, 2026
ccdf091
fix(environment): leave unknown entities unchecked by failed reads, v…
earakely-scale Oct 22, 2026
1c97933
fix(environment): fill a create's path fields from the collection ser…
earakely-scale Oct 22, 2026
90d9022
fix(environment): name unmodelled writes as modelled ones, count fiel…
earakely-scale Oct 22, 2026
54f7d85
fix(environment): note omitted fields only from reads the gate checks
earakely-scale Oct 22, 2026
3ac1136
chore: merge environment state writes (90d90227) into environment wri…
earakely-scale Oct 22, 2026
756c631
fix(environment): let a document replacement overwrite everything und…
earakely-scale Oct 22, 2026
3f1f825
chore: merge the published environment state writes (756c6312)
earakely-scale Oct 22, 2026
caf2acf
chore: merge environment state writes (3f1f825e) into environment wri…
earakely-scale Oct 22, 2026
613048a
chore: merge main (b8c1b453) into environment write coverage
earakely-scale Oct 22, 2026
e21f6c5
chore: merge main (538017d1, #5600 squashed) into environment write c…
earakely-scale Oct 22, 2026
06ec0d4
fix(merge): preserve write coverage with query-aware validation
morluto Oct 22, 2026
f5162bb
fix(environment): align write inference with resolved state facts
morluto Oct 22, 2026
17c5a44
chore: integrate write coverage with current main
gensokyo-dev Oct 22, 2026
8b6e35b
chore: sync write coverage with latest main
N0zoM1z0 Oct 22, 2026
6f726ef
fix(environment): preserve projection and omission evidence across wr…
gensokyo-dev Oct 22, 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
14 changes: 7 additions & 7 deletions docs/agent-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,18 +422,18 @@ member reports which applied:

Each read tool answers according to its view in the state:

| View | Answer |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `item` | The entity the path arguments name, rendered into the recorded envelope of `envelope_ordinal`. Arguments match as replay matches them: each collection segment equals the held collection's segment as written or after percent-decoding, and the identity is the last argument percent-decoded, then as written; values are never re-split on `/`. Any entity the state holds answers, including one `data/add` loaded; query arguments only decide `replay.exact_match`. An entity the state does not hold answers the tool's latest recorded 400, 404 or 410 response with `state.view` `missing`, or is a tool error when none was recorded; one lacking a field every recording carried is a tool error; a body is never invented. |
| `list` | When the arguments name one of the lines the view checked exactly (its latest recordings before the first related write; every path and query value equal to the recording's, and every recorded query parameter supplied), that recorded envelope with its array rendered from the state: every entity of the collection in state order for `membership: "all"`, or the recorded members still held. A call with no query argument to a `membership: "all"` view answers from a checked line of the collection its path arguments name that only pages its list, with `replay.exact_match` false. A member lacking a field every recording carried makes the call a tool error rather than a partial list. |
| `document` | When the arguments name the document's checked line exactly, the state's value for it; a tool error when the state holds none. |
| `recorded` | The recording, as replay answers it. |
| View | Answer |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `item` | The entity the path arguments name, rendered into the recorded envelope of `envelope_ordinal`. Arguments match as replay matches them: each collection segment equals the held collection's segment as written or after percent-decoding, and the identity is the last argument percent-decoded, then as written; values are never re-split on `/`. Any entity the state holds answers, including one `data/add` loaded; query arguments only decide `replay.exact_match`. An entity the state does not hold answers the tool's latest recorded 400, 404 or 410 response with `state.view` `missing`, or is a tool error when none was recorded; one lacking a field every recording carried is a tool error, unless a read showed the application leaves that field out; a body is never invented. |
| `list` | When the arguments name one of the lines the view checked exactly (its latest recordings before the first related write; every path and query value equal to the recording's, and every recorded query parameter supplied), that recorded envelope with its array rendered from the state: every entity of the collection in state order for `membership: "all"`, or the recorded members still held. A call with no query argument to a `membership: "all"` view answers from a checked line of the collection its path arguments name that only pages its list, with `replay.exact_match` false. A member lacking a field every recording carried makes the call a tool error rather than a partial list. |
| `document` | When the arguments name the document's checked line exactly, the state's value for it; a tool error when the state holds none. |
| `recorded` | The recording, as replay answers it. |

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
answer has the replay shape plus `state`: `{"source": "state", "view": …}`
naming the entity, collection or document path, or `{"source": "recording",
"reason": …}` with the view's reason, `no-view`, `unrecorded-request` or `page-exceeded` (a call naming a page of a whole list that the collection has outgrown). A
"reason": …}` with the view's reason, `no-view`, `unrecorded-request`, `page-exceeded` (a call naming a page of a whole list that the collection has outgrown) or `projection` (a call to an item tool whose recordings asked for some fields only, naming such a parameter for an entity the state holds; the answer is a recording, so it does not show served writes). A
state answer carries the base record's status, content type and `replay`
provenance with `truncated: false`; one whose JSON would exceed 256 KiB is
refused as a `resource_constraint` tool error rather than cut. Extraction does
Expand Down
6 changes: 5 additions & 1 deletion docs/specs/agent-environments/manifest-view/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ manifest are later increments.
value anywhere in the result.
- List records as pointers (`ordinal`, `method`, `path`, `status`,
`content_type`) and excluded groups with reason `other-origin`,
`ui-page-or-asset` or `non-json`.
`ui-page-or-asset` or `non-json`. A write group (`POST`, `PUT`, `PATCH`,
`DELETE`) whose every response had no body (a 204 or 205, an empty text or a
recorded size of zero) and at least one succeeded is kept whatever its content
type: the empty reply is its answer. A missing body text alone does not count,
as it may be a body the capture did not keep.
- Mark the Evidence inferred whenever any tool or excluded group is templated,
derived otherwise; keep the parent's authority.
- Admit the capture clone, the inline envelope, every retained pointer, group,
Expand Down
11 changes: 11 additions & 0 deletions docs/specs/agent-environments/state-view/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ later increments.
- Prove an item type's identity field from the requested path value its
responses repeat; otherwise infer it from a fixed list of identity names that
every listed item carries distinctly, which needs at least one listed item.
An item read that asked for some fields only (`fields`, `fields[...]`,
`select`, `$select`) and does not return the item is left out of the proof
and of the view's checks; the view lists it in `projected_record_ordinals`,
and serving replays any call to that tool that names a projection parameter
for an entity the state holds. The write gate also leaves out any read that
names one and leaves out a field its view requires.
- A field every recording of a view carried is required: serving refuses an
entity lacking it. Once a successful read the write gate checks, naming no
projection parameter, shows the application leaves the field out of an entity
the state holds (APIs that omit empty or false members), no view of the type
requires it.
Never treat an envelope that is itself an entity as a list.
- Merge observations into one entity per collection and identity: item views'
latest values win over list views', differing views keep their own values,
Expand Down
6 changes: 5 additions & 1 deletion docs/specs/agent-environments/state-writes/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ identity the client sends is an echo:
format is kept: ISO-8601 with its separator, fraction digits and zone, or
epoch seconds or milliseconds.
7. **Sequence.** An integer one greater than the largest value of the field in
the collection, else in the type.
the collection, else in the type. The integer may be written as `-`-separated
digit groups of one width of at least two digits (an asset number `000-005`;
not a date, version or address); a served value keeps the recorded value's
groups and zero padding, and digits that outgrow them lead. A later call must
record the value spelled that way.
8. **Unique.** A UUID-shaped string that no other entity of the type shares.
9. **Template.** A string containing a generated value as a delimited token
(for example a URL that ends in the new id). It is rebuilt around the new
Expand Down
12 changes: 12 additions & 0 deletions docs/specs/agent-environments/write-coverage/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Implementation plan

1. **Bodiless writes.** The manifest accumulator tracks, per write group, whether every response was empty, and keeps
the group when one succeeded.
2. **Omitted fields.** The write simulation records required fields its successful reads show missing, and the
extracted state's views drop them.
3. **Projected reads.** Item planning sets aside unlocated projected reads and the view records their ordinals; the gate
skips them, and serving replays projected calls to such a view.
4. **Sequences.** A values helper reads a digit-group value as an integer and fills the next one into its mask; the
write rules, the gate and serving number sequences through it.
5. **Schema, tests and docs.** The view schema, manifest, gate, serving and unit tests, and the manifest, capture,
state-view and state-writes docs.
44 changes: 44 additions & 0 deletions docs/specs/agent-environments/write-coverage/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Wider write coverage

Issue: https://github.com/morluto/rea/issues/4933

## Outcome

Four recording shapes kept write tools out of the manifest or left their writes unserved, although the recordings showed
what the writes did:

- **Bodiless replies.** A write answered `204` with no body (Jellyfin's and Shlink's deletes, Miniflux's and Keycloak's
updates) had no JSON-like content type, so its group was excluded as `non-json` and never became a tool.
- **Omitted fields.** A field every recording of a view carried was required, so an application that leaves empty or
false members out of some entities (Go's `omitempty`) made the write gate refuse its own read-backs.
- **Projected reads.** An item read asking for some fields only (Directus's `/items/provisions/2?fields=title`) does not
repeat the requested id, so it blocked the identity proof of the whole item view, and the view's writes had no state
target.
- **Digit-group sequences.** A sequence spelled in digit groups (Homebox's asset number `000-005`) was not an integer, so
a create that numbers it had no rule for it and was contradicted.

## Behaviour

- **Manifest.** A write group (`POST`, `PUT`, `PATCH`, `DELETE`) is kept as a tool when every response had no body (a
`204` or `205`, an empty text, or a recorded size of zero) and one succeeded. A missing text alone does not count.
- **Omitted fields.** The write gate notes required fields missing from the entities the state holds that successful
reads it checks return, when the read names no projection parameter: the item whose id the path names, or the listed
items. No view of the type requires them any more. A read that checks nothing, such as one begun while a modelled
write to its targets still ran or a page the collection has outgrown, notes none.
- **Projected reads.** An item read naming `fields`, `fields[...]`, `select` or `$select` that does not return the item
is left out of the identity proof and the view's checks. The view lists it in `projected_record_ordinals`, and serving
replays a call to that tool naming such a parameter, for an entity the state holds, with the reason `projection`;
the replay shows the recording, not served writes. The write gate neither checks nor learns a write's effect from a
successful read that names such a parameter and leaves out a field its view requires; a 400, 404 or 410 such a read
answers is still the absence it checks.
- **Sequences.** A sequence value may be `-`-separated digit groups of one width of at least two digits, not a date,
version or address. The next value keeps the exemplar's groups and zero padding; digits that outgrow them lead. A
later create must record its value spelled that way. A held value whose digits outgrew the mask (`100-00` after
`99-99`) counts only when it is the exemplar's spelling of its number, so a reloaded state numbers on from it.

## Acceptance

- Over the 50 published captures, no write group is excluded as `non-json`, served write tools rise from 35 to 39, and
no write tool is served on the base and unserved here.
- The re-recorded Homebox capture's create is served.
- Every served write tool of those captures applies.
10 changes: 10 additions & 0 deletions docs/specs/agent-environments/write-coverage/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Tasks

- [x] Keep write groups answered with no body as tools.
- [x] Stop requiring fields a successful read shows the application leaves out.
- [x] Set projected item reads aside from the identity proof and replay projected calls.
- [x] Number sequences spelled in digit groups.
- [x] Add manifest, gate, serving and unit tests, failing on the previous head.
- [x] Document the manifest rule, the view member, the replay reason and the sequence spelling.
- [x] Measure the 50 published captures, the re-recorded Homebox capture and the served smoke.
- [x] Run static, formatting, duplication, documentation and test gates.
Loading
Loading