Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
ad439bd
feat(environment): extract the initial state a capture's reads observed
earakely-scale Oct 20, 2026
7a668b7
Merge main into feat/environment-state-view
earakely-scale Oct 20, 2026
f2c9a2e
fix(environment): bound state at redacted writes; infer identity only…
earakely-scale Oct 20, 2026
2999128
fix(environment): keep first sightings, one list pointer and linear f…
earakely-scale Oct 20, 2026
a5c7b92
fix(environment): keep post-write values and partial lists out of the…
kaoru0822-kitauji Oct 20, 2026
4e93547
docs(environment): scope item-shaped and deleted written paths out of…
kaoru0822-kitauji Oct 20, 2026
aba9cb1
fix(environment): count writes in flight when a value changes between…
kaoru0822-kitauji Oct 20, 2026
856c8c0
Merge main into feat/environment-state-view
kaoru0822-kitauji Oct 20, 2026
55480bd
chore: merge main (5fa4defc) into environment state view
earakely-scale Oct 20, 2026
9fee36d
fix(environment): catch cross-tool changes across writes; read only i…
earakely-scale Oct 20, 2026
3c64cbe
chore: merge the branch's own main merge (856c8c0b), identical to 554…
earakely-scale Oct 20, 2026
47f8a27
chore: merge main (f93a0335, rich captures) into environment state view
earakely-scale Oct 20, 2026
32fbaa5
chore: merge main into environment state view
gensokyo-dev Oct 20, 2026
04e2c56
fix(environment): keep post-write observations out of initial state
gensokyo-dev Oct 20, 2026
3daeebb
chore: retain author main integration in environment state view
gensokyo-dev Oct 20, 2026
25923c3
chore: sync environment state view with latest main
gensokyo-dev Oct 20, 2026
6ad63bc
fix(environment): retain field provenance and bound state inference work
gensokyo-dev Oct 20, 2026
2bd0b3c
feat(environment): serve tool calls from the environment state
earakely-scale Oct 20, 2026
35aee7c
feat(environment): render more read tools from the state and describe…
earakely-scale Oct 20, 2026
9f60e54
Merge the environment state view's review fixes into feat/environment…
earakely-scale Oct 20, 2026
62708a8
Merge the environment state view's review fixes into feat/environment…
earakely-scale Oct 20, 2026
cb04dcd
docs(environment): record verification after merging the state view's…
earakely-scale Oct 20, 2026
9dfc05f
docs(environment): record verification after merging the state view's…
earakely-scale Oct 20, 2026
aa48c74
Merge main (#5319 squashed, #5349) into feat/environment-state-coverage
earakely-scale Oct 20, 2026
e96484b
Merge main (#5319 squashed, #5349) into feat/environment-state-serve
earakely-scale Oct 20, 2026
5bb7ca4
fix(environment): stop identity checks at the first missing or repeat…
earakely-scale Oct 20, 2026
6676582
feat(environment)!: serve the environment state by default
earakely-scale Oct 20, 2026
83fcc73
fix(environment): bound data-plane replies, keep batch order, cancel …
earakely-scale Oct 20, 2026
d9c0357
fix(environment): keep bodies too deep for the state's nesting out of…
earakely-scale Oct 20, 2026
d9a717e
Merge main (#5350 write cutoffs, #5031 protobuf bodies) into feat/env…
earakely-scale Oct 20, 2026
57b1168
fix(environment): measure data-plane replies before building them
earakely-scale Oct 20, 2026
5956e00
chore: merge main (d2a3269d) into environment state serve
earakely-scale Oct 20, 2026
bf0dd92
chore: merge environment state coverage into the state writes branch
earakely-scale Oct 20, 2026
a98df6c
chore: merge main (d2a3269d) into environment state coverage
earakely-scale Oct 20, 2026
ef49dca
fix(environment): keep changed documents out of the state; mark OPTIO…
earakely-scale Oct 20, 2026
306c3da
docs(specs): plan evidence-gated write effects on the served state
earakely-scale Oct 20, 2026
5a61853
fix(environment): release batch replies as they are encoded; judge ex…
earakely-scale Oct 20, 2026
b4b7ebc
perf(environment): intersect list identity candidates through a set
earakely-scale Oct 20, 2026
b9fbcd7
feat(environment): apply the write effects a capture confirms to the …
earakely-scale Oct 20, 2026
84291a0
fix(environment): count only applied writes and serve writes the held…
earakely-scale Oct 20, 2026
cbb7b61
test(environment): cover write plans, the write gate and served writes
earakely-scale Oct 20, 2026
e7bd24b
docs(specs): record the write effects verification
earakely-scale Oct 20, 2026
a0b3c55
Merge remote-tracking branch 'fork/feat/environment-state-serve' into…
earakely-scale Oct 20, 2026
0864bac
Merge remote-tracking branch 'fork/feat/environment-state-coverage' i…
earakely-scale Oct 20, 2026
2e89a39
Merge remote-tracking branch 'origin/main' into feat/environment-stat…
earakely-scale Oct 20, 2026
82dfd94
docs(specs): record the write effects checks after merging the base b…
earakely-scale Oct 20, 2026
ce12615
Merge remote-tracking branch 'origin/main' into feat/environment-stat…
earakely-scale Oct 20, 2026
52b6b78
docs(specs): record the checks after merging main again
earakely-scale Oct 20, 2026
dbd0dce
chore: merge main (1629266e) into environment state coverage
earakely-scale Oct 20, 2026
f6c756a
fix(environment): quote captured names in response summaries
earakely-scale Oct 20, 2026
370b9be
docs(specs): correct the showcase capture count to 50
earakely-scale Oct 20, 2026
c00fde4
fix(environment): keep room for refusals and framing in the reply budget
earakely-scale Oct 20, 2026
61c8e3e
chore: merge environment state serve (c00fde41) into environment stat…
earakely-scale Oct 20, 2026
862c88c
chore: merge environment state coverage (f6c756aa) into environment s…
earakely-scale Oct 20, 2026
b068b09
chore: merge main (1629266e) into environment state writes
earakely-scale Oct 20, 2026
82556cd
fix(environment): answer unfiltered lists from their own parent; desc…
earakely-scale Oct 20, 2026
138ea4b
fix(environment): judge writes by the full served response; model onl…
earakely-scale Oct 20, 2026
6d21b62
fix(environment): refuse writes the state could not hold or reload
earakely-scale Oct 20, 2026
f1b00f5
docs(environment): specify the write refusals, 2xx-only modelling and…
earakely-scale Oct 20, 2026
df2bded
test(environment): pin the replay card with quoted summary names; rec…
earakely-scale Oct 20, 2026
2086da6
fix(environment): make the write gate and serving agree on lines, rul…
earakely-scale Oct 20, 2026
7056f5f
docs(environment): record the second review round's verification
earakely-scale Oct 20, 2026
db8df45
fix(environment): keep checked lines' path spellings; check later slu…
earakely-scale Oct 20, 2026
5327e59
fix(environment): choose a read's checked line as replay chooses the …
earakely-scale Oct 20, 2026
b6c3b16
fix(environment): match document write paths, verbatim create collect…
earakely-scale Oct 20, 2026
f2b9535
fix(environment): answer a missing entity with a 2xx null only for reads
earakely-scale Oct 20, 2026
25b6622
chore: merge main (335c042d) into environment state serve
earakely-scale Oct 21, 2026
54d3d5e
feat(environment): decide a list's whole-collection membership per line
earakely-scale Oct 21, 2026
19ef539
chore: merge main (335c042d) into environment state coverage
earakely-scale Oct 21, 2026
87e94d1
test(environment): cover per-line list membership; document it
earakely-scale Oct 21, 2026
665112e
fix(environment): quote the prefix of a member name too long to show …
earakely-scale Oct 21, 2026
4aeefd9
chore: merge environment state serve (25b6622d) into environment stat…
earakely-scale Oct 21, 2026
9edbabe
chore: merge environment state coverage (665112e9) into environment s…
earakely-scale Oct 21, 2026
111556a
docs(specs): record per-line list membership measured on six environm…
earakely-scale Oct 21, 2026
6b8db19
fix(environment): refuse a loaded state that data/get would write pas…
earakely-scale Oct 21, 2026
fc403d9
chore: merge environment state serve (6b8db198) into environment stat…
earakely-scale Oct 21, 2026
1d1c478
fix(environment): confirm a write only by reads that still see it, an…
earakely-scale Oct 21, 2026
dc5e2aa
fix(environment): weigh an update's derived changes when a later writ…
earakely-scale Oct 21, 2026
8a374b6
Merge remote-tracking branch 'fork/feat/environment-state-writes' int…
earakely-scale Oct 21, 2026
4080063
fix(environment): count no write for a collection once a read shows i…
earakely-scale Oct 21, 2026
847b093
docs(specs): record per-line list membership over fifty captures and …
earakely-scale Oct 21, 2026
fe8ab58
fix(environment): erase overwritten fields from earlier write effects…
earakely-scale Oct 21, 2026
edc09db
Merge remote-tracking branch 'fork/feat/environment-state-writes' int…
earakely-scale Oct 21, 2026
73c0e9b
fix(environment): create in a held collection when an Evidence spelli…
earakely-scale Oct 21, 2026
b224462
chore: merge main into environment state writes
morluto Oct 21, 2026
19118fe
chore: merge environment state writes (73c0e9b5) into environment lis…
earakely-scale Oct 21, 2026
0a46f89
chore: merge main (4dfa1c67) into environment list lines
earakely-scale Oct 21, 2026
9f513d0
fix(environment): check reads on the lines serving answers, and refus…
earakely-scale Oct 21, 2026
6d28aa7
chore: merge the remote environment state writes (b2244622) into the …
earakely-scale Oct 21, 2026
2eb7be0
chore: merge environment state writes (6d28aa78) into environment lis…
earakely-scale Oct 21, 2026
7ffd077
fix(environment): take list counters from whole lines, per line, and …
earakely-scale Oct 21, 2026
bec65b3
chore: merge main (d8a9673f) into environment state writes
earakely-scale Oct 21, 2026
3580d85
fix(environment): confirm only the writes a read shows, and name and …
earakely-scale Oct 21, 2026
43d98ea
fix(environment): pin a create's observation to the id it answered, a…
earakely-scale Oct 21, 2026
3e18322
chore: merge environment state writes (43d98ea9) into environment lis…
earakely-scale Oct 21, 2026
de13b0c
docs(specs): record the list-lines re-run after the write-plan merge
earakely-scale Oct 21, 2026
264ce41
fix(environment): keep unseen writes pending, and hold later calls to…
earakely-scale Oct 21, 2026
2807278
chore: merge environment state writes (264ce410) into environment lis…
earakely-scale Oct 21, 2026
7d2587c
docs(specs): record the list-lines re-run after the third write-plan …
earakely-scale Oct 21, 2026
0ae6440
fix(environment): never rule an entity's identity, and read a zero pa…
earakely-scale Oct 21, 2026
34cbdd6
chore: merge environment state writes (0ae64400) into environment lis…
earakely-scale Oct 21, 2026
6257de9
refactor(environment): move the paging rules to environmentStatePagin…
earakely-scale Oct 21, 2026
4f40bff
chore: merge environment state writes (6257de93) into environment lis…
earakely-scale Oct 21, 2026
c68c63b
docs(specs): record the list-lines re-run after the later write-plan …
earakely-scale Oct 21, 2026
466ed8b
fix(environment): name entities and weigh interference per write as s…
earakely-scale Oct 21, 2026
f239fa3
chore: merge environment state writes (466ed8b4) into environment lis…
earakely-scale Oct 21, 2026
ed4b6db
docs(specs): record the list-lines re-run after the fourth write-plan…
earakely-scale Oct 21, 2026
7cef2fb
fix(environment): bound pages per size, refuse only read-observed rem…
earakely-scale Oct 21, 2026
8eea9f6
chore: merge environment state writes (7cef2fb2) into environment lis…
earakely-scale Oct 21, 2026
734786e
docs(specs): record the list-lines re-run after the 7cef2fb2 merge
earakely-scale Oct 21, 2026
45a5c8b
fix(environment): count interference on any target a read covers, and…
earakely-scale Oct 21, 2026
27dd606
chore: merge environment state writes (45a5c8b9) into environment lis…
earakely-scale Oct 21, 2026
325c128
fix(environment): weigh interference only where a tool's effect survives
earakely-scale Oct 21, 2026
9b868c0
chore: merge environment state writes (325c128f) into environment lis…
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
717ac2c
chore: merge main (8413ec08) into environment state writes
earakely-scale Oct 21, 2026
891f35e
chore: merge environment state writes (717ac2c4) into environment lis…
earakely-scale Oct 22, 2026
2013511
chore: merge main (2451e187) into environment list lines
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
ddab0a9
chore: merge environment state writes (2a125b71) into environment lis…
earakely-scale Oct 22, 2026
11e3f01
refactor(environment): keep the observing view helpers with the obser…
earakely-scale Oct 22, 2026
6685b37
chore: merge environment state writes (11e3f016) into environment lis…
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
ca88b5e
chore: merge environment state writes (90d90227) into environment lis…
earakely-scale Oct 22, 2026
0fe1738
refactor(environment): keep the written-field checks with the attribu…
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
79f0560
chore: merge environment state writes (3f1f825e) into environment lis…
earakely-scale Oct 22, 2026
1802e41
chore: merge main (b8c1b453) into environment list lines
earakely-scale Oct 22, 2026
0499ed1
chore: merge main (538017d1, #5600 squashed) into environment list lines
earakely-scale Oct 22, 2026
36571c4
fix(environment): preserve whole-list semantics when integrating late…
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
Prev Previous commit
Next Next commit
fix(environment): count no write for a collection once a read shows i…
…ts entity gone

A whole list's read checks the collection, so it exercised every write
that changed it since the last check. A create whose entity an
unmodelled delete removed, and a 404 then showed gone, was still among
them, so a whole list taken afterwards confirmed a create it cannot
show. The absent entity now leaves every write's claim on its
collection, as a modelled delete's replacement does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • Loading branch information
earakely-scale and claude committed Oct 21, 2026
commit 40800631d2dca5d6439d333bd3fb65f1de7e314a
4 changes: 3 additions & 1 deletion docs/specs/agent-environments/list-lines/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
2. **Counters.** Count `number`-of-items members as item totals.
3. **Consumers.** One helper says whether a view lists all on a line; serving, the write gate's list checks and the
insert retry use it, and an argument-less call may answer on any such line.
4. **Tests and docs.** Domain and serving tests as the acceptance lists; the membership row of the environment-state
4. **Absences.** When a read shows an entity absent, drop it from every write's claim on its collection, so a write
left with none no longer counts there.
5. **Tests and docs.** Domain and serving tests as the acceptance lists; the membership row of the environment-state
docs and the list answer row of the agent-environment docs.
8 changes: 7 additions & 1 deletion docs/specs/agent-environments/list-lines/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ against the whole collection, and a create's insert rule may be retried on it, a
their recorded members. Without such a line, or when every line is one, the view is unchanged and the member is absent,
so existing states keep their values.

A whole line's read checks the collection, so it exercises every write that changed the collection since it was last
read. A write whose entity a read has since shown absent, for example a create an unmodelled delete removed and a 404
then showed gone, no longer counts there, as when a modelled delete replaces it. Otherwise a whole list taken after the
entity was gone would confirm a create it cannot show.

`numberOfElements` and similar number-of-items members (`number` with `elements`, `entries`, `items` or `results`)
count the listed entities, so a whole line's counter follows the state as `totalElements` does.

## Acceptance

- Domain: a tool with a whole line and a filtered line names the whole one; a create the whole line later lists is
confirmed; a tool whose lines are all whole, or none, names none.
confirmed; a tool whose lines are all whole, or none, names none; a whole list taken after a read showed the created
entity gone confirms no create.
- Serving: after a served create, the whole line lists the created entity with its counters, and the filtered line
keeps its recorded members.
- Measured: the six published environments compared with the application before and after, on the probes of the
Expand Down
1 change: 1 addition & 0 deletions docs/specs/agent-environments/list-lines/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [x] Judge whole-collection membership per checked line.
- [x] Count number-of-items members.
- [x] Serve, check and place creates per line.
- [x] Drop a write from its collection once a read shows its entity absent.
- [x] Add domain and serving tests.
- [x] Document per-line membership.
- [x] Measure the six published environments before and after.
Expand Down
59 changes: 31 additions & 28 deletions docs/specs/agent-environments/list-lines/verification.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Verification

Verified commit: 87e94d12 (this branch before this file). Executed on macOS with Node v22.23.1 (the repository pins 24.18.0 in `.nvmrc`, which was
not installed); the probes were recorded earlier against the live applications on six disposable Linux VMs.
Verified commit: 8a374b6b (this branch with the write-plan branch's head `dc5e2aad` merged in). Executed on macOS with
Node v22.23.1 (the repository pins 24.18.0 in `.nvmrc`, which was not installed); the probes were recorded earlier
against the live applications on six disposable Linux VMs.

## Gates

- `npm run build:cached`, `npm run check:fast` (typecheck and lint), `npm run format:check`, `npx knip`,
`npm run scan:todos`, `npm run docs:check`, `npm run verify:test-discovery` and `npm run mcp-catalog:check`: passed.
- `npm run jscpd`: 3.46% duplicated lines over 3601 files, under the 3.5% gate.
- `npx vitest run --project domain --project services`: 7479 passed, 5 pre-existing skips.
- `npm run jscpd`: 3.45% duplicated lines over 3646 files, under the 3.5% gate.
- `npx vitest run --project domain --project services`: 7615 passed, 5 pre-existing skips.
- `npm run test:prepare`, then `npm run test:focused --` the environment serve and export CLI boundaries, the serve
and served-writes MCP boundaries, the analysis-view CLI and MCP boundaries, the compact input schema boundary and
tool schema validity: 8 files, 78 passed.
Expand All @@ -18,37 +19,39 @@ one, with `numberOfElements` and `totalElements` as counters, and a create the w
whose lines are all whole, or none, names none) and one serving test in `environmentStateWriteAnswer` (after a served
create, the whole line lists the created book with its counters, and the filtered line keeps its recorded member).

## Six published environments before and after
## Fifty published captures

The six published environments of the fidelity comparison (NetBox, Komga, Mealie, n8n, Shlink, self-hosted Sentry),
each built from its original capture, were compared with `environment-compare` before and after this change. The
probes were recorded against each application restored from one snapshot: the fidelity comparison's capture re-run,
create/read/update/delete scenario and read of every seeded entity, and held-out sessions recorded later with values
no capture sent (two creates, updates and deletes of created and seeded entities, and the reads and lists after them).
Both builds merged the environment-compare and prefix-variance branches, which the comparison and the manifests need.
The environment-state view ran over the 50 published captures with each manifest's template rules, on builds with and
without this change. Both merged the prefix-variance branch, which some manifests need.

- 47 list views in 20 environments gain a whole line, among them Komga's books, series, collections and read lists,
BookStack's books, chapters and pages, Mealie's cookbooks, shopping lists, categories and tags, WordPress's posts and
comments, Vikunja's labels and Paperless's groups. On that line a call now lists the state's entities, including
those a task loads with `data/add` and those served writes create or delete, where it listed only the recorded
members.
- Served write tools go from 31 to 33: Komga's collection create, which a whole list after the create confirms, and
Airbyte's tag delete. Four of the gained lists belong to a type with a served write (Airbyte tags, BookStack books,
Komga collections, Linkding tags).
- Komga's list views also count `numberOfElements`. No other view or write plan changed.

## Six environments against their applications

The six environments of the fidelity comparison (NetBox, Komga, Mealie, n8n, Shlink, self-hosted Sentry) were compared
with their applications by `environment-compare` with and without this change. The probes were the comparison's capture
re-run, create/read/update/delete scenario and read of every seeded entity, and held-out sessions recorded later with
values no capture sent. Both builds merged the environment-compare and prefix-variance branches.

| Environment | Steps | Before | After | Ignoring order, before | After |
| ----------- | ----: | -----: | ----: | ---------------------: | ----: |
| NetBox | 479 | 98.5% | 98.5% | 98.5% | 98.5% |
| Komga | 600 | 94.7% | 95.2% | 94.7% | 95.5% |
| Komga | 600 | 91.5% | 91.5% | 91.5% | 91.5% |
| Mealie | 449 | 94.0% | 94.0% | 94.9% | 94.9% |
| n8n | 278 | 71.6% | 71.6% | 84.2% | 84.2% |
| Shlink | 202 | 87.1% | 87.1% | 90.1% | 90.1% |
| Sentry | 372 | 24.5% | 24.5% | 47.6% | 47.6% |

Komga is the one environment whose list tools have both kinds of line: `/api/v1/collections` lists every collection,
`?library_id=…` filters them. After the change the whole line lists created collections with `totalElements` and
`numberOfElements` following, which three list reads after creates now agree on; in two more the created collection
is listed but placed where the insert rule puts it, not where Komga sorts it (`order`). No step of any environment
agreed before and differs after.

The other environments' lists did not meet the per-line conditions or did not need them:

- NetBox's sites list was already `all`.
- Mealie's recipe lines all carry ordering or search parameters.
- Shlink's short-URL list replays (`query-varies`).
- n8n's workflow list is `list-differs`.

Their remaining differences are elsewhere: sets the application returns in varying order, writes the capture never
confirmed, preconditions such as n8n's archive-before-delete, and, for Sentry, values the capture's preparation
replaced before inspection.
No step changed. This Komga environment's capture creates, updates and deletes a collection before any whole list, so
with the write-plan branch's head its create and update are unconfirmed and serve nothing a list could show. Before
that head (at `f2b95351`), when a list taken after the delete still confirmed them, the same comparison moved Komga
from 94.7% to 95.2%: three list reads after creates agreed and two more differed only in where the created collection
was placed. None of the other five environments has a list tool with both kinds of line and a served write on its type.
5 changes: 3 additions & 2 deletions docs/web-network-captures.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,9 @@ with its recording as the read plans are, as the whole response it would serve:
the entity or list rendered into the envelope of the item view's or the line's
base recording, with the members the state still holds. A 400, 404 or 410 (or a
`null` body) agrees with an entity the copy does not hold. A match confirms
the writes that changed its entity or collection since it was last read; a
mismatch contradicts them, or, when an unmodelled write came after them, is
the writes that changed its entity or collection since it was last read, less
those whose entity a read since showed absent, which no longer count for the
collection; a mismatch contradicts them, or, when an unmodelled write came after them, is
checked only on the members they sent; a mismatch no write explains marks the related writes since as
`side-effect`. A plan is `served` when a read confirmed it and none
contradicted it; otherwise its `reason` is the first of its build reason
Expand Down
5 changes: 5 additions & 0 deletions src/domain/analysisView/EnvironmentStateWriteSimulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ export class EnvironmentStateWriteSimulation {
this.#touched.delete(target);
if (isAbsence(record.status)) {
this.#state.remove(entity);
this.#effects.removed(
this.#touched,
target,
collectionTarget(entity.type, entity.collection),
);
return;
}
const object = this.#input.io.withBody(record.ordinal, (body) =>
Expand Down
12 changes: 12 additions & 0 deletions src/domain/analysisView/environmentStateWriteChecks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,18 @@ export class WriteEffects {
this.#members.delete(key);
}

/** A read showed the entity absent: no write's effect on it remains, so a write left with no entity drops from the collection. */
removed(touched: TouchedTargets, entity: string, collection: string): void {
this.#changed.delete(entity);
const byTool = this.#members.get(collection);
if (byTool === undefined) return;
for (const [tool, entities] of byTool) {
if (!entities.delete(entity) || entities.size > 0) continue;
byTool.delete(tool);
touched.get(collection)?.delete(tool);
}
}

supersede(
touched: TouchedTargets,
writer: string,
Expand Down
15 changes: 15 additions & 0 deletions src/domain/analysisView/environmentStateWrites.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,21 @@ describe("list lines", () => {
});
});

it("confirms no create by a whole list taken after a read showed its entity gone", () => {
const rows: TimedCaptureRow[] = [
...BOOK_INIT_ROWS,
["POST", "/api/books", THIRD_BOOK, 201, { name: "Third Book" }],
// A redirected delete is not modelled; the read after it shows the book gone.
["DELETE", "/api/books/3", "", 302],
["GET", "/api/books/3", BOOK_NOT_FOUND, 404],
["GET", "/api/books", [FIRST_BOOK, SECOND_BOOK]],
];
expect(planOf(stateOf(rows), "post_books")).toMatchObject({
served: false,
reason: "unconfirmed",
});
});

it("names no line when every line lists its whole collection, or none does", () => {
const listOf = (rows: readonly TimedCaptureRow[]) =>
stateOf(rows).views.find((view) => view.tool === "get_books");
Expand Down