[PR #6169] [MERGED] feat(environment): serve writes behind bodiless replies, omitted fields, projected reads and digit-group sequences #7179

Closed
opened 2026-11-01 21:45:56 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6169
Author: @earakely-scale
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @gensokyo-dev

Base: main ← Head: feat/environment-write-coverage


📝 Commits (10+)

  • 95c8c9d feat(environment): render more read tools from the state and describe responses
  • ad8f674 feat(environment): apply evidence-gated write effects to the served state
  • 733833e feat(environment): model bodiless writes, omitted fields, projected reads and masked sequences
  • 6f67a11 feat(environment): test and document wider write coverage
  • e44adb5 docs(environment): record the write-coverage checks on the current write-plan head
  • a4c4a23 docs(environment): record the re-recorded and end-to-end write-coverage results
  • 6c8f4f7 feat(environment): render more read tools from the state and describe responses
  • 378a109 fix(environment): keep rendered documents and quoted samples inside their budgets
  • cfb42dd feat(environment): apply evidence-gated write effects to the served state
  • 5d0e096 fix(environment): bound and validate write state history

📊 Changes

36 files changed (+1414 additions, -60 deletions)

View changed files

📝 docs/agent-environments.md (+2 -2)
📝 docs/specs/agent-environments/manifest-view/spec.md (+5 -1)
📝 docs/specs/agent-environments/state-view/spec.md (+11 -0)
📝 docs/specs/agent-environments/state-writes/spec.md (+5 -1)
➕ docs/specs/agent-environments/write-coverage/plan.md (+12 -0)
➕ docs/specs/agent-environments/write-coverage/spec.md (+49 -0)
➕ docs/specs/agent-environments/write-coverage/tasks.md (+10 -0)
➕ docs/specs/agent-environments/write-coverage/verification.md (+74 -0)
📝 docs/web-network-captures.md (+2 -1)
📝 src/application/environment/environmentStateAnswer.ts (+19 -1)
➕ src/application/environment/environmentStateCoverage.test.ts (+127 -0)
📝 src/application/environment/environmentStateWriteAnswer.test.ts (+187 -0)
📝 src/application/environment/environmentStateWriteAnswer.ts (+13 -3)
📝 src/domain/analysisView/EnvironmentManifestAccumulator.ts (+36 -3)
📝 src/domain/analysisView/EnvironmentStateExtraction.ts (+64 -7)
📝 src/domain/analysisView/EnvironmentStateWriteSimulation.test.ts (+96 -5)
📝 src/domain/analysisView/EnvironmentStateWriteSimulation.ts (+32 -11)
📝 src/domain/analysisView/environmentManifestView.test.ts (+40 -0)
📝 src/domain/analysisView/environmentStateGate.ts (+5 -0)
📝 src/domain/analysisView/environmentStateRules.ts (+18 -0)

...and 16 more files

📄 Description

Summary

Refs #4933. Analyze existing capture Evidence and serve local state for four previously unsupported recording shapes: bodiless write replies, proven omitted fields, identity-free projected reads, and digit-group sequences. No target execution or remote application writes.

Integrated onto current main (9512a8080). Follow-up fixes keep late projections as replay Evidence rather than initial entities, share current omitted-field facts with checks and forward observations, and classify unsuccessful responses before the projection shortcut. Existing optional contract members retain source ordinals and replay provenance; no extra cache or second CLI/MCP implementation.

Executed validation

  • 713 related source tests passed, including five new production integration guards. All five guards fail on original author head f5162bb and pass here (late projections, two omission/observation paths, contradictory projected absence, and delete confirmation).
  • 67 CLI/MCP boundary tests passed: serving/export/compare, retained analysis Evidence, named output schemas, dialect validity and compact inputs.
  • Full check (types, lint, module boundaries, architecture guards), docs check and discovery of 2047 tests passed. A latest-main targeted rebuild/recheck is recorded in the merge follow-up.
  • Independent local Codex CLI review found the status-order defect above; final read-only review found no further definite new defect. This is automated source review, not human attestation.
  • Five pinned public capture Evidence datasets (Directus, Homebox, Mealie, Keycloak, Shlink) ran through the real compiled CLI and stdio MCP. All ten manifest/state facts and Evidence IDs match across adapters and the original author control. Downloaded bytes were independently SHA-256 checked; no dataset scripts or applications were executed. Source revisions/digests and complete artifacts retained locally.
  • Sequential fresh-process repeat of that complete capture workflow: original author 23.95 s wall / 39.12 s CPU / 1183 MiB sampled process-family RSS; candidate 24.01 s / 38.54 s / 1205 MiB. Earlier loaded runs were 25.51/46.52 s respectively; do not infer a speedup. RSS is a 500 ms estimate, not an exact peak; filesystem caches were not cleared. No model-token reduction is claimed.

Scope and limitations

These checks qualify retained-data analysis and local serving, not live application write fidelity, all published datasets, or real Hopper/Ghidra/Windows behavior. Full Evidence remains accessible. Original author historical broader experiments remain in docs/specs/agent-environments/write-coverage/verification.md; they were not independently rerun in full.

Author readiness

Human owner: @earakely-scale

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/6169 **Author:** [@earakely-scale](https://github.com/earakely-scale) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `feat/environment-write-coverage` --- ### 📝 Commits (10+) - [`95c8c9d`](https://github.com/morluto/rea/commit/95c8c9d1573fcdf759da4edcf07e86a0a7c826c1) feat(environment): render more read tools from the state and describe responses - [`ad8f674`](https://github.com/morluto/rea/commit/ad8f674d221ff2bb27ed7560d2c06543f496bd3e) feat(environment): apply evidence-gated write effects to the served state - [`733833e`](https://github.com/morluto/rea/commit/733833ef1d9da7f73e7f090820e70a02f9baa876) feat(environment): model bodiless writes, omitted fields, projected reads and masked sequences - [`6f67a11`](https://github.com/morluto/rea/commit/6f67a11d05272cb3148e4746cb0e34ad8b034cb5) feat(environment): test and document wider write coverage - [`e44adb5`](https://github.com/morluto/rea/commit/e44adb5b7e90f4dea85eb4e1b76ec98ed8e3a77a) docs(environment): record the write-coverage checks on the current write-plan head - [`a4c4a23`](https://github.com/morluto/rea/commit/a4c4a23be36c30b5b97b2f41601da54ced9ee700) docs(environment): record the re-recorded and end-to-end write-coverage results - [`6c8f4f7`](https://github.com/morluto/rea/commit/6c8f4f728f0d9bbc84d9e1ce3975cafe3d9a1954) feat(environment): render more read tools from the state and describe responses - [`378a109`](https://github.com/morluto/rea/commit/378a109cc62edda924510c24122386ee69b06917) fix(environment): keep rendered documents and quoted samples inside their budgets - [`cfb42dd`](https://github.com/morluto/rea/commit/cfb42ddde0a576fa0325b008262aa54e951c5d7a) feat(environment): apply evidence-gated write effects to the served state - [`5d0e096`](https://github.com/morluto/rea/commit/5d0e0969f5c801f27f6ea9b9c582286fdba561fe) fix(environment): bound and validate write state history ### 📊 Changes **36 files changed** (+1414 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `docs/agent-environments.md` (+2 -2) 📝 `docs/specs/agent-environments/manifest-view/spec.md` (+5 -1) 📝 `docs/specs/agent-environments/state-view/spec.md` (+11 -0) 📝 `docs/specs/agent-environments/state-writes/spec.md` (+5 -1) ➕ `docs/specs/agent-environments/write-coverage/plan.md` (+12 -0) ➕ `docs/specs/agent-environments/write-coverage/spec.md` (+49 -0) ➕ `docs/specs/agent-environments/write-coverage/tasks.md` (+10 -0) ➕ `docs/specs/agent-environments/write-coverage/verification.md` (+74 -0) 📝 `docs/web-network-captures.md` (+2 -1) 📝 `src/application/environment/environmentStateAnswer.ts` (+19 -1) ➕ `src/application/environment/environmentStateCoverage.test.ts` (+127 -0) 📝 `src/application/environment/environmentStateWriteAnswer.test.ts` (+187 -0) 📝 `src/application/environment/environmentStateWriteAnswer.ts` (+13 -3) 📝 `src/domain/analysisView/EnvironmentManifestAccumulator.ts` (+36 -3) 📝 `src/domain/analysisView/EnvironmentStateExtraction.ts` (+64 -7) 📝 `src/domain/analysisView/EnvironmentStateWriteSimulation.test.ts` (+96 -5) 📝 `src/domain/analysisView/EnvironmentStateWriteSimulation.ts` (+32 -11) 📝 `src/domain/analysisView/environmentManifestView.test.ts` (+40 -0) 📝 `src/domain/analysisView/environmentStateGate.ts` (+5 -0) 📝 `src/domain/analysisView/environmentStateRules.ts` (+18 -0) _...and 16 more files_ </details> ### 📄 Description ## Summary Refs #4933. Analyze existing capture Evidence and serve local state for four previously unsupported recording shapes: bodiless write replies, proven omitted fields, identity-free projected reads, and digit-group sequences. No target execution or remote application writes. Integrated onto current main (9512a8080). Follow-up fixes keep late projections as replay Evidence rather than initial entities, share current omitted-field facts with checks and forward observations, and classify unsuccessful responses before the projection shortcut. Existing optional contract members retain source ordinals and replay provenance; no extra cache or second CLI/MCP implementation. ## Executed validation - 713 related source tests passed, including five new production integration guards. All five guards fail on original author head f5162bb and pass here (late projections, two omission/observation paths, contradictory projected absence, and delete confirmation). - 67 CLI/MCP boundary tests passed: serving/export/compare, retained analysis Evidence, named output schemas, dialect validity and compact inputs. - Full check (types, lint, module boundaries, architecture guards), docs check and discovery of 2047 tests passed. A latest-main targeted rebuild/recheck is recorded in the merge follow-up. - Independent local Codex CLI review found the status-order defect above; final read-only review found no further definite new defect. This is automated source review, not human attestation. - Five pinned public capture Evidence datasets (Directus, Homebox, Mealie, Keycloak, Shlink) ran through the real compiled CLI and stdio MCP. All ten manifest/state facts and Evidence IDs match across adapters and the original author control. Downloaded bytes were independently SHA-256 checked; no dataset scripts or applications were executed. Source revisions/digests and complete artifacts retained locally. - Sequential fresh-process repeat of that complete capture workflow: original author 23.95 s wall / 39.12 s CPU / 1183 MiB sampled process-family RSS; candidate 24.01 s / 38.54 s / 1205 MiB. Earlier loaded runs were 25.51/46.52 s respectively; do not infer a speedup. RSS is a 500 ms estimate, not an exact peak; filesystem caches were not cleared. No model-token reduction is claimed. ## Scope and limitations These checks qualify retained-data analysis and local serving, not live application write fidelity, all published datasets, or real Hopper/Ghidra/Windows behavior. Full Evidence remains accessible. Original author historical broader experiments remain in docs/specs/agent-environments/write-coverage/verification.md; they were not independently rerun in full. ## Author readiness Human owner: @earakely-scale - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:45:56 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#7179
No description provided.