[PR #6164] [CLOSED] feat(environment): compare an environment with probe captures of its application #7177

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/6164
Author: @morluto
Created: 10/21/2026
Status: ❌ Closed

Base: main ← Head: cursor/rebase-5699


📝 Commits (3)

  • 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
  • 12d2bc3 feat(environment): compare an environment with probe captures of its application

📊 Changes

87 files changed (+15257 additions, -453 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/references/evidence-workflows.md (+10 -6)
📝 docs/agent-environments.md (+171 -45)
📝 docs/cli.md (+18 -1)
📝 docs/mcp-contracts.md (+1 -1)
➕ docs/specs/agent-environments/fidelity-compare/plan.md (+12 -0)
➕ docs/specs/agent-environments/fidelity-compare/spec.md (+75 -0)
➕ docs/specs/agent-environments/fidelity-compare/tasks.md (+12 -0)
➕ docs/specs/agent-environments/fidelity-compare/verification.md (+146 -0)
➕ docs/specs/agent-environments/state-coverage/plan.md (+32 -0)
➕ docs/specs/agent-environments/state-coverage/spec.md (+94 -0)
➕ docs/specs/agent-environments/state-coverage/tasks.md (+16 -0)
➕ docs/specs/agent-environments/state-coverage/verification.md (+112 -0)
📝 docs/specs/agent-environments/state-serve/spec.md (+1 -6)
📝 docs/specs/agent-environments/state-serve/verification.md (+0 -7)
➕ docs/specs/agent-environments/state-writes/plan.md (+45 -0)
➕ docs/specs/agent-environments/state-writes/spec.md (+406 -0)
➕ docs/specs/agent-environments/state-writes/tasks.md (+22 -0)
➕ docs/specs/agent-environments/state-writes/verification.md (+360 -0)
📝 docs/testing.md (+1 -1)
📝 docs/web-network-captures.md (+87 -27)

...and 67 more files

📄 Description

Summary

Replacement for fork PR #5699, stacked on the squashed rebases of #5352 (95c8c9d15) and #5600 (ad8f674d2). Fork force-with-lease to feat/environment-fidelity was rejected because the app token cannot update .github/workflows/ci.yml.

Problem and expected behavior

#5699 could not merge. After rebase, environment-compare should still compare a served environment with probe captures of its application, on top of the rebased coverage and write-effect commits.

Change and scope

Merged pull/5699/head onto the rebased #5600 tip. Kept that tip where #5699 was still on the pre-exhaustion write gate or on the older file-close path. Exported isPagingParameter so compare matching can share the paging rule. Squashed to one commit. Not a new provider or target-execution capability. Maintainer scope decision: not applicable.

Follow the contribution scope.

Contract and boundary impact

  • Semantic owner and earliest changed stage: environment-compare in the environment application layer, after a probe capture is supplied.
  • Contribution scope fit and linked maintainer decision: read-only comparison of an environment and a capture; not applicable.
  • CLI and MCP/tool-catalog contract: adds environment-compare. Serving behavior stays the rebased #5600 behavior.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: comparison reports agreement and does not treat unobserved probe fields as agreement.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): probe requests stay on the application's origin.
  • Generated metadata: none committed.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: #5699 compare unit tests and environmentCompareCli boundary test.
  • Base reproduction or other evidence: npm run typecheck passed on this tree.
  • User-visible CLI/MCP output (if applicable): rea environment-compare is registered.
  • Remaining proof gaps: the environment test suite was not executed in this rebase. One follow-up worth a later pass is replaying the compare tests against the rebased write gate.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run typecheck — passed after conflict resolution, including the isPagingParameter export (same tree as 12d2bc3cb).

Compatibility, safety, and release

  • Breaking changes or migration steps: none intended. Compare is a new command.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable. Live probe runs from the original PR were not repeated.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: compare reads local captures; it does not add a new network client in this rebase.

This branch contains the #5352 commit, the #5600 commit, and this one. Merging it into main lands the whole stack. Prefer merging #5352, then #5600, then this PR, or merge only this PR if the whole stack should land together.

Author readiness

Human owner: @morluto

  • 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.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.
Open in Web Open in Cursor 

🔄 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/6164 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/21/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `cursor/rebase-5699` --- ### 📝 Commits (3) - [`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 - [`12d2bc3`](https://github.com/morluto/rea/commit/12d2bc3cb2f7f518e11fad47cbe5f22694df8163) feat(environment): compare an environment with probe captures of its application ### 📊 Changes **87 files changed** (+15257 additions, -453 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/references/evidence-workflows.md` (+10 -6) 📝 `docs/agent-environments.md` (+171 -45) 📝 `docs/cli.md` (+18 -1) 📝 `docs/mcp-contracts.md` (+1 -1) ➕ `docs/specs/agent-environments/fidelity-compare/plan.md` (+12 -0) ➕ `docs/specs/agent-environments/fidelity-compare/spec.md` (+75 -0) ➕ `docs/specs/agent-environments/fidelity-compare/tasks.md` (+12 -0) ➕ `docs/specs/agent-environments/fidelity-compare/verification.md` (+146 -0) ➕ `docs/specs/agent-environments/state-coverage/plan.md` (+32 -0) ➕ `docs/specs/agent-environments/state-coverage/spec.md` (+94 -0) ➕ `docs/specs/agent-environments/state-coverage/tasks.md` (+16 -0) ➕ `docs/specs/agent-environments/state-coverage/verification.md` (+112 -0) 📝 `docs/specs/agent-environments/state-serve/spec.md` (+1 -6) 📝 `docs/specs/agent-environments/state-serve/verification.md` (+0 -7) ➕ `docs/specs/agent-environments/state-writes/plan.md` (+45 -0) ➕ `docs/specs/agent-environments/state-writes/spec.md` (+406 -0) ➕ `docs/specs/agent-environments/state-writes/tasks.md` (+22 -0) ➕ `docs/specs/agent-environments/state-writes/verification.md` (+360 -0) 📝 `docs/testing.md` (+1 -1) 📝 `docs/web-network-captures.md` (+87 -27) _...and 67 more files_ </details> ### 📄 Description <!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Summary Replacement for fork PR #5699, stacked on the squashed rebases of #5352 (`95c8c9d15`) and #5600 (`ad8f674d2`). Fork force-with-lease to `feat/environment-fidelity` was rejected because the app token cannot update `.github/workflows/ci.yml`. ## Problem and expected behavior #5699 could not merge. After rebase, `environment-compare` should still compare a served environment with probe captures of its application, on top of the rebased coverage and write-effect commits. ## Change and scope Merged `pull/5699/head` onto the rebased #5600 tip. Kept that tip where #5699 was still on the pre-exhaustion write gate or on the older file-close path. Exported `isPagingParameter` so compare matching can share the paging rule. Squashed to one commit. Not a new provider or target-execution capability. Maintainer scope decision: not applicable. Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). ## Contract and boundary impact - Semantic owner and earliest changed stage: `environment-compare` in the environment application layer, after a probe capture is supplied. - Contribution scope fit and linked maintainer decision: read-only comparison of an environment and a capture; not applicable. - CLI and MCP/tool-catalog contract: adds `environment-compare`. Serving behavior stays the rebased #5600 behavior. - Provider, bridge, target-format, or platform compatibility: none. - Evidence, artifact, provenance, or reconstruction contract: comparison reports agreement and does not treat unobserved probe fields as agreement. - Target selection, authority, upstream behavior, and cleanup details (if applicable): probe requests stay on the application's origin. - Generated metadata: none committed. Expected effects: - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: #5699 compare unit tests and `environmentCompareCli` boundary test. - Base reproduction or other evidence: `npm run typecheck` passed on this tree. - User-visible CLI/MCP output (if applicable): `rea environment-compare` is registered. - Remaining proof gaps: the environment test suite was not executed in this rebase. One follow-up worth a later pass is replaying the compare tests against the rebased write gate. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run typecheck` — passed after conflict resolution, including the `isPagingParameter` export (same tree as `12d2bc3cb`). ## Compatibility, safety, and release - Breaking changes or migration steps: none intended. Compare is a new command. - Real Hopper/Ghidra, browser, or OS coverage: not applicable. Live probe runs from the original PR were not repeated. - Package or release metadata impact: none. - Security, privacy, process, or containment review: compare reads local captures; it does not add a new network client in this rebase. This branch contains the #5352 commit, the #5600 commit, and this one. Merging it into main lands the whole stack. Prefer merging #5352, then #5600, then this PR, or merge only this PR if the whole stack should land together. ## Author readiness Human owner: @morluto - [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. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-fb2387c4-1d12-56e2-b39a-246f74373650?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-fb2387c4-1d12-56e2-b39a-246f74373650&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div> --- <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#7177
No description provided.