Repository navigation
feat(environment): serve sorted creates, listed references and toggles - #7600
Merged
morluto merged 102 commits intoOct 29, 2026
Merged
Conversation
…m fields
- A create member a recording sent empty ("", null, false, [] or {}) is no
longer required; a call that leaves it out is applied as sending that value
(body.blank).
- List views render envelope members that list the listed entities' ids
(Paperless's `all`), so creates in such collections are confirmed.
- Updates move their entity in collections kept sorted by a field they write,
and a failed whole-collection read after an update can teach that order.
- A later create that stores an unruled field otherwise is withheld at the
create, and an item read may fill values a create's answer had not loaded.
- An unsent field respelled between null, [] and {} is unchanged.
- The skill asks for one create with every field and one with only what a
person must give.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Agents guessed capture keys (artifacts, dom, final) to see pages behind sign-in, which inspect_web_page cannot reach. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A create that fills only what a person must give sends `null` where the full create sent a string, and `null` or `false` for the same flag. The merged plan now accepts each recorded empty value, and a call that leaves the member out is applied as the earliest call sent it. Also adds the spec folder for this change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Agents read "the form" as a cue to write through the UI, where some applications' request bodies are not exposed; a body-unusable UI write now re-records once with request steps. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rites Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Bulk updates move their entities in turn against the others' earlier values and install the final order once, as replay does. - A member's recorded empty values stay accepted once a later call teaches its default; a left-out member with a default keeps the default. - Write answers spell empty lists and maps as their recorded answers did. - A rename can teach a sort when the creates chose one by a field the update did not write, such as ids that ascend with titles. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- An item read whose object is marked deleted (deleted, isDeleted or is_deleted true) agrees with an absent entity, as EspoCRM answers a deleted record; such an object never seeds or adopts an entity. - maxSize, max_results and maxResults are page sizes, for whole-collection list lines and the list query's limit role. - An item view also shows the fields only reads after its type's first write show, when no initial entity holds them (Vikunja's task subscription), without requiring them; write answers leave such a field out for entities without it, and it no longer withholds the write as incomplete-entities. - The skill asks updates to change the fields a person would change, and expects a deleted object to read back as 404 or marked deleted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d create's order - A write answer spells an empty list or map the call did not send as its recorded answer did; one the call sent is answered as sent, so a create sending `[]` is not answered `null` because the first recorded create was. - A read listing the whole collection that placed a create leaves the create only the sorted inserts whose order that read follows, so a later rename cannot teach a sort an earlier read ruled out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… show A bulk update's answer renders each entity with the same allowance a single update's answer has: a field only reads after the type's first write showed, which no initial entity holds, is left out for an entity without it, so a bulk update of a seeded task is no longer refused for lacking it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The agent trajectories show gpt-oss passes it by creating a replacement contact and deleting the original, since the served update refuses emailAddress; the update itself is refused in both builds. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eted An application that soft-deletes still answers a deleted record by id, marked deleted. Serving now keeps an entity a served delete removed from a type whose recorded item reads show that, until a reset or load and within the size data/add loads, and answers a read of it with its last fields and the flag true, instead of refusing the read. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…th sent members, narrow inserts only on collection-order reads - A create whose item read loaded values its answer had not records them (`observation.read.unloaded`), and a served create's answer keeps them as the recorded answer showed them, a zero-time owner included, while the state holds the read's. - Replay checks a bulk update's recorded answers with each target's sent members, as serving answers them, so echoed `null` and `[]` no longer make the plan body-unusable. - A whole-collection read whose query sorts it shows the query's order, so it no longer narrows a create's sorted insert candidates. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…erged Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A query parameter accepts a number or boolean, which serving sends as its JSON text, as agents send page sizes and flags. - A sequence may start at the value its first create took above every value its type held (Vikunja's per-project task index), and a later create's composed, template or started-sequence rule is adopted when it also spells the first create's value. - A made-object rule explains an object the application makes with each created entity: members the request stamped, members holding the entity's own id, and counts one past the held objects' values. - A create's answer names the id of the one object a one-element array member holds, so bulk creates link to their type. - The skill reads each listed object by id before writing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… feat/environment-call-values
A create linked to its type's own collection, whose path has no parameters, accepts any path values when its plan stores each one in a field, as a Vikunja task stores its project; replay and serving apply it alike. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ities reaches it Serving moves only the entities a write changes in a collection kept sorted, so replay now tries a sort after a rename only when the entities no write the read exercised changed already follow it. Seeded folders listed out of title order no longer teach a title sort that serving would answer with another order. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… feat/environment-call-values
…cho, and learn no sort from query-sorted reads - A served create keeps a value its recorded answer had not loaded unless the call sent that member and the plan stores it as sent, so a create sending `active: false` is answered `false` as recorded while the state holds the read's `true`. - A rename no longer teaches a sort from a whole-collection read its query sorts, whose ties need not follow the collection's own order. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… feat/environment-call-values
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rve by it Extraction now records the member later item reads set true on a record the application soft-deleted, and the item view carries it as `deleted_flag`. Serving reads that fact instead of scanning recorded bodies itself, so one owner decides what a soft delete looks like. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…e clocks by serving's rule A default a PUT learns must also agree with what the read after an earlier or the current call showed for the member its answer left out, so a call whose read showed the member kept withholds a later clearing default. Replay and serving now choose an update clock's stored spelling by one rule, readSpellsCoarser: the read after it at a coarser precision in the same zone and separator. A read in another zone or separator is no longer adopted by replay, which serving could not store, and a create's plain clocks stay as answered, as serving makes them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ded references A sort a whole listing that placed a create did not follow stays ruled out for that create, though the entity that showed it is later deleted. A create that sends a reference's member empty after a later create added the reference agrees with it, as with a reference the first create showed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
4 of 14 tasks
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Review rounds from
|
Main squash-merged morluto#7332 (308aebf), which this branch already holds, so the merge takes 308aebf as its base. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A create the plan observes that left out a reference's member stored no such field, so a served call leaving the member out stores none either, though a later recorded create sent it empty; a call sending it empty still stores that. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… main Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e update clocks by the kept read Replay now keeps the largest value a sequence took, as serving's commitWrite does, so a lower sent value no longer lowers the next number. Serving stores every update's clocks in the spelling of the read the plan keeps as observation.read; replay now does the same through readSpelledClocks, instead of adopting each update's own read, so a later update whose read spells its clock otherwise contradicts the plan. The plain clock branch of restampedFields, which no caller used any more, is gone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…3b800a1 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the merged member-write behavior from morluto#7539 and retain this branch's sorted creates, listed references, and toggles.
Do not adopt a sort an earlier update already ruled out. Learn a list reference only when every element shows the same nonempty fields. Promote a toggle only when every call started from a boolean.
The mixed-field case uses the held tag's color, so rejection comes from the field set rather than a value the recording never stored.
The compare_bundles rejection reports each relative path as an invalid_format issue instead of one joined diagnostic sentence.
Relative bundle paths and rejected ABI selectors are reported as input issues on those fields, not as one joined diagnostic sentence.
2 tasks done
3 of 11 tasks
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #7539 (#7332 is merged); its own changes are its
feat,fixanddocscommits, merged with #7539's head3b800a10.Summary
Over 148 recorded captures, #7539 withholds 302 of 694 write plans. A short diagnosis of the largest clusters found
three gaps REA could close:
after the seeded one, so the create plan settled on
last; the second sorted before the first, the list after itcontradicted the plan, and the folder update and delete after that went unconfirmed.
parentIdandtagIdsand answers withparentandtagsobjects. REA modelled a parent but not a list of tags, and a create that sent
nulland[]disagreed with onethat named both.
PUT /v1/entries/{id}/bookmark. Chromium exposesno body for it, which REA read as unusable, and a call flipping the flag back was taken to contradict the call that
set it.
This PR:
listing placed it last, the type's id field last among the candidates.
referencewithmanyfor a field holding one object per id a sent list names, in order, and lets acreate that sent the member as
nullor[]agree with one that named entities. Serving accepts anullid onlywhere a recorded create sent one.
Content-Type.Every
POST,PUTorPATCHwhose body the captures retained names one (835 of 835).togglerule: an item action a later call shows flipping back a boolean an earlier call set, when no callfound it set already, flips the field on each served call.
sets or flips (skill 55).
Results:
changes: Grafana's folder create, update and delete in a fresh recording, Homebox's item create in another, and
Miniflux's bookmark toggle in three recordings. Views are unchanged.
Problem and expected behavior
value, as a single reference does.
Change and scope
EnvironmentStateWriteSimulation.ts):#settledInsertskeeps creates another read placed;#narrowInsertsadds the sorts a listing's items show;#retryInsertretries a placed create's sorted candidates.environmentStateWriteReferences.ts,environmentStateWriteRules.ts,environmentStateView.ts,environmentStateWriteCreateCalls.ts):listReferenceRule,many,emptyReference;mergedFieldandreleasedlet an empty reference agree.scenarioCaptureRecords.ts):unsentBodygives such a request abodySizeof 0.environmentStateWriteCalls.ts,environmentStateWriteEffects.ts,environmentStateWriteApply.ts,environmentStateWriteVerdict.ts):toggledRules, serving and the action verdict.docs/web-network-captures.md,docs/agent-environments.md,docs/specs/agent-environments/write-sorts-references-toggles/.Not included: the order an application gives a list read with no sort parameter when it is not state order
(Miniflux lists starred entries by
published_at, which keeps the toggle withheld in two recordings); Homebox'sassetIdnumbering and item updates; Linkding renumbering bundles after a delete.Contract and boundary impact
environment-stateviews may carryreference.manyandtogglerules. Thecompact MCP catalog stays under its frame.
names no
Content-Typeis projected withbodySize: 0for the manifest and state views; replay records areunchanged. Views with the new members are refused by earlier REA versions, whose schemas are strict.
Expected effects:
Evidence and regression coverage
Write plans (#7539 at
3b800a10against this branch, 148 captures): 694 plans; served 392 and 399; no write fromserved to withheld; no served plan changes; five withheld plans explain more; views unchanged (3,188).
src/domain/analysisView/environmentStateItemWrites.test.ts,src/application/environment/environmentStateItemWritesAnswer.test.tsand a case insrc/domain/analysisView/scenarioCaptureRecords.test.ts, with fixtures intests/fixtures/environmentStateItemWrites.tsand
tests/fixtures/browserScenarioCapture.ts. The twelve behaviour tests fail on feat(environment): serve writes whose calls send different members #7539 at3b800a10; the threethat guard toggles and
nullids pass there too.For evidence-bearing changes:
Validation performed
npm run -s check:fast,format:check,knip,scan:todos,docs:check,verify:test-discovery,mcp-catalog:checkandjscpd: passed.npx vitest run --project domain --project services: 11,886 passed, 6 skipped, merged with3b800a10. An earlier run failed aSetupRegistrationPrewarmrunner test that outran its 5-second timeout; alone it passes here and on feat(environment): serve writes whose calls send different members #7539.npm run -s test:focused --environment build, export and serve CLI, analysis-view CLI and MCP, environment serveMCP boundaries: 7 files, 81 passed.
outputSchemaProfile,toolSchemaValidity,mcpSchemaValidation,outputSchemaSemanticConstraintsandanalysisViewMcp: 5 files, 54 passed.3b800a10and pass here.Review round (Greptile on
4e777d28, five findings):8cf5e046: a sort an earlier whole listing ruled out came back from a later listing once the entitythat ruled it out was deleted; and a create sending a reference's member empty after a later create added the
reference was withheld. Both tests fail on
4e777d28.308aebf0(feat(environment): serve query numbers, counted values and made objects #7332); the update default and the read clockspelling are fixed by feat(environment): serve writes whose calls send different members #7539's
174a0ff2, merged here.f7c1bfe9found one more, fixed here: a served create that left out a reference's memberstored
nullwhere the create the plan observes left it out and stored no such field.3b800a10, merged here: sent sequencenumbers are remembered alike in replay and serving, and update clocks are stored in the plan's one kept spelling.
Compatibility, safety, and release
state holds; a served create stores the entities a call's ids name.
Author readiness
Human owner: @earakely-scale
🤖 Generated with Claude Code