Repository navigation
feat(environment): explain values an application derives from other fields - #7025
Conversation
…ields Prompt-built environments withheld creates whose responses carry values the application derives deterministically, which the write model kept as constants or could not match across calls: - A composed string is literal text plus parts read from the fields other rules write: a field's value, its slug, or a clock's calendar digits. A create composes a string only when another entity of the type spells it the same way and none spells it otherwise, and never from two sources serving could tell apart; an update composes an unsent change from members stored as sent and unchanged fields that also spell its value before the call. A composed field no longer pins the members it reads. - A trimmed clock format drops trailing fraction zeros, as Go spells nanoseconds. It is learned from the type's values, a later create or a later update, and spreads to the plan's other clocks unless a value shows a fixed width. - A large integer no entity of the type holds, among distinct ones of the same length and kind, is a generated unique value, served as a seeded integer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gates, tests, write plans over 69 recorded captures and served write tasks on the baseline and on this branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; no new blocking issue was found. SummaryThis PR rebuilds strings from other fields, learns clocks with trailing zeros removed, and generates fresh large integer IDs.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Recorded responses] --> B[Learn write rules]
B --> C[Apply sent and generated values]
C --> D[Rebuild composed fields]
D --> E[Served response]
E --> F[Check each response spells its composition]
F --> G[Compare source fields once]
Reviews (7) · Last reviewed commit: "fix(environment): preserve composed part..." · Reviewed by Greptile |
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. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ce1127b5d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…s honest - A later update's clocks take the plan's spelling, sibling-trimmed clocks included, wherever the call's values fit it, so an update whose later call trims only one of two clocks is served. - A held value that ends its fraction in a zero keeps a create's clock at a fixed width, whatever order the held spellings come in. - A large integer that another field of the created entity also holds is linked, as a repeated token is: it is never unique, and the create is withheld as unexplained-change. - Composed parts are delimited by whole characters through the shared joinsBefore/joinsAfter, so an astral letter joins a match to its word. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A held .123456780 beside a held .12345678 keeps the create's clock at nine digits in either order; the cases fail on 8ce1127. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pe a plan - A composed string whose part has nothing to spell refuses the create or update through the apply Result instead of keeping a stale value. - A composition learned on a later call is rebuilt from each earlier call's fields, so an earlier call that left the value otherwise contradicts it. - An update adopts its fitted clock spellings only after the unknown-entity and contradiction checks, so a call on an entity an unmodelled write left unknown no longer trims a served plan's clock. - Sibling trimming on a later create also checks that call's fields, so a sibling clock it shows with a trailing zero stays fixed-width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takes morluto#7025's review fixes: a create refuses a linked generated token or integer, sibling clocks fit the call's fields, and composed parts are rechecked. The create-call helper's linked check uses the same predicate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09c48c5928
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…ce through a plan - A plan keeps the first value that showed each clock at a fixed width, from held entities and every accepted create or update. No later fit or sibling trim widens that field, and a later call that shows it shorter is withheld. - Two stamped clocks are one composed source only when they share a zone offset. A held entity that holds the target field as anything the parts do not spell, a non-string included, vetoes the composition. The token index is built once, and only when a string is left to compose. - A generated integer that another field repeats as a number at any depth is linked. Compare treats two integers of one JSON kind and length under a unique rule as generated values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96783c7204
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…ved-values # Conflicts: # tests/boundary/filesystem/setupRegistrationPrewarm.test.ts
…ring repeats A unique integer whose digits show in another top-level string that no template or composed rule rebuilds from it (an echoed serialText, or a token like folder-<id>) withholds the create as unexplained-change, since serving would seed the integer and keep the string. A templated copy is still served. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3705faeb3b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…integer forms - A later create whose response spells a composed field otherwise than the plan rebuilds it is withheld as unexplained-change. - A unique field learned from a generated integer accepts only an integer of the same length and kind from a later create, as serving seeds one. - Compare counts a composed field as equal when each side's response spells it from its own fields, which compare under their own rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Environments built from a prompt withheld creates in three of five applications. In each case the response carried a
value the application derives deterministically from other fields, which the write model either kept as a constant or
could not match across calls:
web_archive_snapshot_urlishttps://web.archive.org/web/<creation time as YYYYMMDDhhmmss>/<sent url>.The plan kept it as a constant, which pinned
urlto its recorded value, so a second create was refused.urlis/dashboards/f/<uid>/<slug of the title>, which pinneduidthe same way. Itsnumeric
idis a large time-based integer, which the plan copied from the first create, so the second create'sread-back contradicted it.
(
…34.38812218Z), so a later create's clock did not follow the format learned from the first.This PR adds three rules to the write model:
clock's calendar digits.
uniqueand served as a fresh seeded integer.On the same timed captures, the baseline's 0/2 on the new create tasks becomes 2/2 with both models for Linkding's
bookmarks and Homebox's tags. A new timed Grafana recording serves its folder create, rename and delete, where the
baseline serves only the delete. Over 69 recorded captures no write goes from served to withheld, and the 50 published
environments serve the same writes as before.
Problem and expected behavior
the recording, and should not stop the call from sending other values of the fields it reads.
trimming, and served in that spelling.
Change and scope
environmentStateWriteComposed.ts):other ruled fields offer. Generated values may be short; others need eight characters, as a copy does.
spells it otherwise. One call alone cannot show which text is literal.
count as one source.
the existing rules, and only when the same parts spell the value before the call and no other entity spells it
otherwise.
against every earlier call.
something the parts do not spell, a non-string included, vetoes the composition.
environmentStateWriteClockFormats.ts):ClockFormatgainstrimmed, and a clock reading gainsfixedWidth(its fraction ends in a zero).and none ends in a zero. This is learned from the type's held values, a later create or a later update.
no fit or sibling trim makes that clock trimmed, and a later call that shows it shorter is withheld. An update
adopts a fitted spelling only after its checks pass.
kind (and none of them a clock), is
unique.create is withheld.
uniquerule as generated values.docs/web-network-captures.md, the update row and a served-write limit indocs/agent-environments.md, anddocs/specs/agent-environments/write-derived-values/.Not included:
shared, Homeboxitem creates after a location create), which is the next PR;
parent);Contract and boundary impact
src/domain/analysisView)and served write answers (
src/application/environment).reads recorded captures only and adds no new target interaction.
environment-stateview's write plans may carry acomposedrule and a clock format withtrimmed, and auniquerule may now name an integer field.because the plan schemas are strict.
Expected effects:
Evidence and regression coverage
Write plans over 69 recorded captures, built by the baseline and by this branch. The captures are the 50 published
ones, 18 Claude Code recorded from a prompt for #6946's checks, and one new timed Grafana recording:
rename (the timed one).
value and now accepts the member it reads, with the same served verdicts.
lexical: keeps itsderivedrule.Served write tasks on the same timed captures, rebuilt by the baseline and by this branch, with
fireworks_ai/gpt-oss-120bandfireworks_ai/glm-5p3-flash. The create tasks are new. Each checks the created entityfrom the environment's state, including the composed address and that nothing else changed:
environment refused each call and named the members it accepts.
only, so the models never find the item.
claude-sonnet-5-5) recorded each app from a one-paragraph prompt on Ubuntu 24.04 VMs with snapChromium 155.
browser scenarios need its request times for clock rules. The baseline is the same merge without this branch.
Tests added:
with composed addresses and generated integer ids are served.
stored otherwise than sent, a before value the parts do not spell);
Remaining proof gaps:
differs for text that needs it, which is documented as a served-write limit.
For evidence-bearing changes:
Validation performed
Current follow-up at
5fd87e9c6, based on the author'saeae47f7b(macOS, Node 24.22.1 / npm 11.16.0):environment-comparecase and existing trimmed-clock case; input Evidence files are unchanged by those workflows.check:fast(typecheck/lint),format:check,docs:check, and pre-push checks passed. Four added assertions fail onaeae47f7band pass here: equal stale compositions, differing actual inputs, unproven generated-looking inputs, and UUID-to-token drift.Completed
environment-compareCLI tasks with the same tag/bookmark captures and one create probe per case, beforeaeae47f7bversus this change. Complete canonical reports are identical for these valid tasks.Each invocation starts a fresh CLI process; OS caches were not cleared. CPU is child-family resource usage; RSS is sampled at roughly 15 ms plus process-list overhead. No resource stop occurred. These small samples establish no speedup or memory improvement. Agent/model tokens and costs on larger responses were not measured; no token savings are claimed.
Earlier revision validation and application results
Follow-up at
94f17534f(2026-10-25), after merging main2acdd5413, on macOS with Node 24.22.1 and npm 11.16.0:5f8a954c6; the subsequent main merge changes no environment source.94f17534f: 3 files, 21 passed.check:fast(typecheck/lint),format:check,docs:check, and the pre-push check: passed.2acdd5413; the merge adopts that file verbatim, retaining all four scenarios and removing the temporary branch-specific fixture cleanup.check:fastpasses again after the merge.fb0eece97versus5f8a954c6. First invocation: 0.552 → 0.529 s elapsed, 0.735 → 0.731 s CPU, 362.5 → 365.9 MiB sampled peak process-family RSS. Median of three repeat invocations: 0.519 → 0.500 s elapsed, 0.713 → 0.703 s CPU, 367.2 → 374.8 MiB RSS. Each uses a fresh CLI process; OS caches were not cleared. RSS is sampled at roughly 15 ms plus process-list overhead. These small samples establish no speedup claim. The original reports two false clock-format differences; this head reports agreement. Agent/model tokens and broader performance costs were not measured.Follow-up at
3705faeb3, on macOS with Node 24.22.1:serialText, or a token likefolder-<id>) is withheld unless atemplateorcomposedrule rebuilds that string from it; its tests fail on94f17534f, and a templated copy is still served.check:fast,format:check,docs:check,mcp-catalog:check,verify:test-discovery,scan:todos,jscpdandnpx knip: passed.domain+services+adapters: 17,323 passed, with the Inspector stat test failing as it doeson main in this environment. The 10 focused boundary files: 82 passed. Managed bundle read guards: 11 passed.
2acdd541and on this head: 124 → 129 served, the same five gains, nolosses. The 50 published environments serve the same 68 writes with 68/68 smoke calls, and all 54 rebuilt bundles are
byte-identical to the three-step path's.
Follow-up at
aeae47f7b(e54b75a17plus mainaced9fa9b), on macOS with Node 24.22.1:integer with anything but an integer of its length and kind; compare counts a composed field as equal when each side
spells it from its own fields. Each new test fails on
3705faeb3.domain+services+adapters: 17,358 passed, with the Inspector stat test failingas on main); the 10 focused boundary files: 82 passed. The 69-capture census on main
aced9fa9bis still 124 → 129with the same five gains, the 50 published environments are unchanged, and all 54 bundles are byte-identical.
Earlier author validation:
Run on macOS with Node v24.22.1 at
96783c72(main42577617plus this branch).tsc,npm run -s check:fast,format:check,docs:check,mcp-catalog:check,verify:test-discovery,scan:todosandjscpd(3.64%), andnpx knip: passed.npx vitest run --project domain --project services --project adapters: 17,274 passed and 1 failed ("stops Inspectortarget authorization after the current stat settles"), which fails the same way on main in this environment.
npm run test:focused --the environment build, export and serve CLI boundaries, the analysis-view CLI and MCPboundaries, the environment serve, served-writes and bundle MCP boundaries, MCP schema validation and output schema
constraints: 10 files, 82 passed.
42577617and on this head: 124 → 129 served, with the same fivegains and no write going from served to withheld. The review fixes change no plan in these captures, so the
served-write task results above, measured before the review fixes, still describe this head.
and all 54 rebuilt bundles are byte-identical to the three-step path's.
8ce1127bor09c48c59).tests/process-global/managedBundleReadGuards.test.ts("projects a rejected managed parent by reference withoutcloning under low headroom") failed from
9b3a6332through the earlier main42577617, with and without this branch.Compatibility, safety, and release
version or later to serve.
recordings; macOS for gates.
call sent or the state already holds.
Author readiness
Human owner: @earakely-scale
Before merge
type(scope): outcome.Part of #4933.
🤖 Generated with Claude Code