Repository navigation
feat(environment): serve query numbers, counted values and made objects - #7332
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]>
…eated answers' nested members as recorded A whole list in collection order that showed a renamed entity where a sort by the renamed field would have moved it now rules that sort out, so a later rename of the same entity cannot teach it. A create's answer leaves out members its item read added inside an object the answer showed, as the recorded answer did; the state still stores them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ater-reads # Conflicts: # src/domain/analysisView/environmentStateWriteApply.ts
…its request stamped followsMadeObjects only checked that a made object's clocks parsed, so a later create whose object showed an older clock still passed, while serving stamps the write's clock. Its clocks must now be in the rule's format and within the stamp window of that create's request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| .every((segment) => | ||
| plan.rules.some( | ||
| (rule) => rule.rule === "path" && rule.from === segment.slice(1, -1), | ||
| ), |
There was a problem hiding this comment.
Creates ignore project arguments
anyLinkedSource can approve a path value that no rule stores. Format-based templates keep repeated placeholders, so /api/projects/{numeric}/sections/{numeric}/tasks/bulk contains numeric twice. pathValuesOf keeps only the last value, and one section_id path rule satisfies both checks here.
A linked create recorded with project_id: 5 and section_id: 9 can therefore accept another project argument while still storing project_id: 5. Track path parameters by segment position, or keep these paths pinned until every position has its own rule.
Knowledge Base Used: Analysis environments
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/domain/analysisView/environmentStateWriteLinks.ts
Line: 419-422
Comment:
**Creates ignore project arguments**
`anyLinkedSource` can approve a path value that no rule stores. Format-based templates keep repeated placeholders, so `/api/projects/{numeric}/sections/{numeric}/tasks/bulk` contains `numeric` twice. `pathValuesOf` keeps only the last value, and one `section_id` path rule satisfies both checks here.
A linked create recorded with `project_id: 5` and `section_id: 9` can therefore accept another project argument while still storing `project_id: 5`. Track path parameters by segment position, or keep these paths pinned until every position has its own rule.
**Knowledge Base Used:** [Analysis environments](https://app.greptile.com/pre/-/custom-context/knowledge-base/morluto/rea/-/docs/analysis-environments.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| ownMadeMembers(plan.rules, written, idField); | ||
| const unspelled = derive(plan.rules, observed, written, call.body ?? {}); |
There was a problem hiding this comment.
ownMadeMembers runs before derive, which can still change the entity's ID. explainCreate allows the ID field to use a slug rule from the request title.
For a create recorded as id: "new-task" from title: "New Task", calling the served tool with title: "Another Task" first copies "new-task" into subscription.entity_id, then changes id to "another-task". The stored subscription points at the old ID. Set own-ID members after all rules have written the final ID.
Knowledge Base Used: Analysis environments
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/domain/analysisView/environmentStateWriteApply.ts
Line: 382-383
Comment:
**Made objects keep old IDs**
`ownMadeMembers` runs before `derive`, which can still change the entity's ID. `explainCreate` allows the ID field to use a `slug` rule from the request title.
For a create recorded as `id: "new-task"` from `title: "New Task"`, calling the served tool with `title: "Another Task"` first copies `"new-task"` into `subscription.entity_id`, then changes `id` to `"another-task"`. The stored subscription points at the old ID. Set own-ID members after all rules have written the final ID.
**Knowledge Base Used:** [Analysis environments](https://app.greptile.com/pre/-/custom-context/knowledge-base/morluto/rea/-/docs/analysis-environments.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| if (rule.own.includes(member)) return scalarText(value) === id; | ||
| const count = rule.counts.find((entry) => entry.member === member); | ||
| if (count === undefined) | ||
| return same(value, ownMember(exemplar, member)); | ||
| return ( | ||
| sequenceNumber(value) === |
There was a problem hiding this comment.
followsMadeObjects drops JSON types when checking own-ID members and counts. A first subscription.id: 21 followed by a recorded subscription.id: "22" passes because sequenceNumber("22") equals the expected count. Replay keeps that raw string, so confirming reads can pass.
Serving instead uses spelledLike with the first numeric member and returns 22 as a number. Callers that validate replies or compare IDs can fail. Compare the recorded object with what the shared renderer would produce, including member types and formatting.
Knowledge Base Used: Analysis environments
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/domain/analysisView/environmentStateWriteCreate.ts
Line: 672-677
Comment:
**Nested IDs change JSON type**
`followsMadeObjects` drops JSON types when checking own-ID members and counts. A first `subscription.id: 21` followed by a recorded `subscription.id: "22"` passes because `sequenceNumber("22")` equals the expected count. Replay keeps that raw string, so confirming reads can pass.
Serving instead uses `spelledLike` with the first numeric member and returns `22` as a number. Callers that validate replies or compare IDs can fail. Compare the recorded object with what the shared renderer would produce, including member types and formatting.
**Knowledge Base Used:** [Analysis environments](https://app.greptile.com/pre/-/custom-context/knowledge-base/morluto/rea/-/docs/analysis-environments.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.…es held alike A count only a later create shows starts at the exemplar's value, which is right only while the exemplar is the one create accepted: creates accepted after it showed the member unchanged, which a count would have moved. The merge now refuses such a count, as the top-level sequence check does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
Builds on #7274 (and #7260): the branch holds their commits until they merge; this PR's own changes are its
featcommits.Summary
Agent trajectories from 418 eval runs on rebuilt environments, and the write plans of the recordings they ran on, showed
three gaps REA could close:
numbers and booleans (
maxSize: 50,withItems: true). The MCP server refused those calls before REA saw them: 63runs hit it in EspoCRM, Homebox and PhotoPrism, and 18 never got the tool to answer.
identifier, and makes asubscriptionobject with each task. A second create disagreed with the first on all three,so task creates were withheld.
POST /projects/{id}/tasks/bulk, wrapping the task intasks: [ … ]both ways. REA linked the call to no type, and a linked create served only the project it was recordedin.
This PR:
sequencestart where the first create stood (start), and adopts a later create'scomposed,templateorstarted
sequencerule when it also spells the first create's value.made-objectrule: an object made with the entity, its stamped members taking the write's clock, membersholding the entity's id taking it, and counts going one past the held objects' values.
values when it creates into its type's own parameterless collection and stores each path value in a field.
fields its own read shows can be neither read by id nor updated.
Results:
task create. Vikunja's task create in main's recording is explained too, but main's
unknown-clockwithholds it inboth builds (before that rule: 339 to 341).
28/58 and 23/58, and no recording passes fewer: Vikunja's bulk-create recording passes its create task with both
models.
Problem and expected behavior
entity should not contradict the creates that show them.
fields.
Change and scope
environmentTools.ts,environmentToolAnswer.ts): the query property'soneOfgainsnumberandboolean;withQueryTextspells them where a call enters serving, for replay and state alike.environmentStateWriteCreate.ts,environmentStateWriteCreateCalls.ts,environmentStateWriteValues.ts,environmentStateWriteAnswer.ts): the exemplar records integer fields above everyheld value; the merge adopts a later rule that spells the exemplar's value;
startedSequencefloors replay andserving.
environmentStateWriteStamps.ts,environmentStateWriteRules.ts,environmentStateView.ts,environmentStateWriteApply.ts):createdMadeObjectrequires a member the request stamped; counts merge with theexemplar's value as start; later calls are checked by
followsMadeObjects; serving keys each count's sequence.environmentStateWriteLinks.ts):respondedIdsreads a one-element array member;anyLinkedSourceapplies in replay and serving.docs/web-network-captures.md,docs/agent-environments.md,docs/specs/agent-environments/write-call-values/.Not included: path parameters given as numbers (required properties, kept free of combinators); a counter one
create alone shows; recordings whose request bodies Chromium did not expose.
Contract and boundary impact
numberandbooleanfor queryparameters.
environment-stateviews may carrysequence.startandmade-objectrules. The compact MCP catalogstays under its frame.
versions, whose schemas are strict.
Expected effects:
Evidence and regression coverage
Write plans (#7274 at
67afb9dfagainst this branch at34372105, 130 captures): 615 plans; served 332 and 333;no write from served to withheld; six plans that stay withheld explain more fields; views change only in #7260's two Vikunja recordings whose
UI bodies were lost, where a scratch task the bulk create made is no longer held as seeded.
The same recordings, built by #7274 and by this branch (gpt-oss, GLM):
unknown-clockwithholds the task create and tag create of main's Vikunja and Homebox recordings in bothbuilds. Before that rule, rebuilt on feat(environment): serve the writes that later reads explain #7274 at
4ede1305, this batch made main's Vikunja create task pass with bothmodels and changed nothing else.
src/domain/analysisView/environmentStateMadeValues.test.ts,src/application/environment/environmentStateMadeValuesAnswer.test.ts,src/application/environment/environmentQueryText.test.tsand a case intests/boundary/mcp/environmentServeMcp.test.ts, with fixtures intests/fixtures/environmentStateMadeValues.ts.4ede1305.For evidence-bearing changes:
Validation performed
npm run -s check:fast,format:check,scan:todos,docs:check,verify:test-discovery,mcp-catalog:checkandjscpd: passed, merged with feat(environment): serve the writes that later reads explain #7274 at45832406.npx knip:staticFileUrlPathandObjcClassImportBindingCoverageonly, which main8706068badded.npx vitest run --project domain --project services: 11,430 passed, 6 skipped.--project adapters: 7,437 passed,19 skipped, 3 failed (the Inspector cancellation test and two AppKit asset-catalog tests), as on feat(environment): serve the writes that later reads explain #7274 at
e29e9c74.npm run -s test:focused --environment build, export and serve CLI, analysis-view CLI and MCP, environment serveMCP boundaries: 7 files, 80 passed.
outputSchemaProfile,toolSchemaValidity,mcpSchemaValidation,outputSchemaSemanticConstraintsandanalysisViewMcp: 5 files, 54 passed.4ede1305and pass here.Review round at
34372105, on macOS with Node v24.22.1:6f2553aefixes four Greptile threads (replied in each):made-objectrules count as clock writes, so main'sunknown-clockwithholds them without a clock anchor; a made object links to the id field the create used, includingone the caller chose; later creates are checked against made objects as recorded, before any rewrite; and a template
is adopted only when it spells the later create's value. Its four tests fail on
c94d0559.ed83de32and2e392016merge feat(environment): serve the writes that later reads explain #7274's2887dbf0and88e16f10, which carry the fixes for the other two Greptilethreads: feat(environment): serve the writes callers make without recorded form fields #7260's sort checks against entities a list last showed in place, and feat(environment): serve the writes that later reads explain #7274's soft-delete flag.
33f954f3correctsverification.md: six plans that stay withheld explain more, not seven; the seventh, Vikunja'sbulk task create, is served.
34372105merges feat(environment): serve the writes that later reads explain #7274's67afb9df, which answers served deletes with the deleted flag their recorded answershowed and carries feat(environment): serve the writes callers make without recorded form fields #7260's in-turn sort retry (Greptile follow-ups, one posted here). Its census matches
33f954f3with no plan or view changing; static checks pass but
knip;domain+services11,445 passed; focused boundaries80 passed; the five MCP schema files: 54 passed.
knip, as on main;domain+services11,442 passed; focused boundaries 80 passed;outputSchemaProfile,toolSchemaValidity,mcpSchemaValidation,outputSchemaSemanticConstraintsandanalysisViewMcp: 5 files, 54 passed.c94d0559the only plan thatchanges is feat(environment): serve the writes callers make without recorded form fields #7260's Metabase
put_card_by_id, which loses a name sort only its create guessed.Main merge at
6bb373a4(main5aa23c3d), on macOS with Node v24.22.1:Main's feat(browser): reuse saved response values across scenario steps #7267 overlaps this branch in
environmentStateWriteCreate.ts,environmentStateWriteCreateCalls.tsand therecording steps.
2ee34513merges feat(environment): serve the writes callers make without recorded form fields #7260's main merge up to its set-aside;121b7f9amerges main taking main's sidewhere they overlap, so it commits without a conflict (a conflicted merge's pre-commit autofix rewrites main's own
files);
938402f8merges feat(environment): serve the writes that later reads explain #7274'sebeea8ce; and6bb373a4puts this branch's side back beside main's:made-object agreement next to the
&slug spellings, sequence starts in the earlier evidenceearlierOfnowbuilds, the combined value imports, and recording step 2 next to main's UI-first step 3. It takes skill 53 above
feat(environment): serve the writes that later reads explain #7274's 52. The diff against main touches the same 59 files as before.
Static checks pass but
knip, which reportsstaticFileUrlPath,ObjcClassImportBindingCoverageandAndroidManifestComponentInventory, as main does.domain+services: 11,684 passed, 8 failed(
appleApplication.test.ts), which fail the same way on main. Focused boundaries 80 passed; the five MCP schemafiles 54 passed.
Census over the 130 captures: main 279, feat(environment): serve the writes that later reads explain #7274 332 and this branch 333, as before the merge, and no write goes from
served to withheld. Against
34372105only three Grafana folder creates change, to the rules main gives them.2232a53dkeeps a later create's made object only when its clocks are in the rule's format and within the stampwindow of that create's own request (Greptile on feat(environment): serve writes whose calls send different members #7539, which builds on this branch). Its test fails on
7d01a5d5.Over the 130 captures and the 10-27 round's 18 recordings, no plan changes; static checks pass but
knip(main'sthree findings);
domain+services11,688 passed and 8 failed (main'sappleApplication.test.ts); focusedboundaries 80 passed.
308aebf0(on2362564c) adds no made-object count a later create alone shows once more than the exemplar wasaccepted, since those creates held the member unchanged, as the top-level sequence check already refuses (Greptile on
feat(environment): serve writes whose calls send different members #7539). Its direct merge test fails on
2362564c. Static checks pass (kniponcedistis built, which the workersubpath imports resolve into);
domain+services11,852 passed; focused boundaries 81 passed. Over the 148captures, 694 plans and 380 served, the same as
2362564cwith no plan changing.Compatibility, safety, and release
into any project its plan stores in a field.
Maintainer validation
At ba8f1a2, the branch inherits 1106a52 and rejects a newly learned sequence when earlier accepted creates contradict it. The new sequence regression fails on 2232a53.
check:fastand five focused source test files passed (149 tests). No new real-provider run was performed.At 0528093, this branch inherits #7274’s initial soft-delete handling. The focused later-read and made-value source tests passed (33 tests).
Merge update at 06cdfe7: resolved conflicts with main 7bc6c5b, retaining skill version 53 and the create request timing used by made-object rules.
check:fast, 73 focused source tests, and 6 MCP boundary tests passed. No new real-provider run was performed.Review fix at 2362564: list admission now checks the same live entity membership serving uses. When a captured list includes an initially deleted entity, its state-backed view is withheld as
list-differsand the recorded response is replayed; item observations remain available. The new producer and serving tests fail on 06cdfe7.check:fast, 145 focused source tests, and 7 built MCP boundary tests passed. Lists requiring replay do not gain dynamic state-backed behavior; no new real-provider run was performed.Author readiness
Human owner: @earakely-scale
🤖 Generated with Claude Code