[PR #5293] [MERGED] feat(analysis-view): project rich captures from an Evidence file and template path pairs #6863

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

📋 Pull Request Information

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

Base: main ← Head: feat/analysis-view-rich-captures


📝 Commits (10+)

  • a64367a feat(analysis-view): project rich captures from an Evidence file and template path pairs
  • 0814658 docs(analysis-view): record the rich-capture verification
  • a89e15a fix(analysis-view): honour cancellation and memory for file sources; merge pairs first
  • 4597b73 fix(analysis-view): observe cancellation after synchronous work; keep pair roles
  • e77707b chore: merge main (b4938aed) into rich captures
  • 3314fad chore: merge main (bf1eeee9) into rich captures
  • 80bda28 fix(analysis-view): keep large scenario files projectable; observe cancellation before auth failures
  • 4fee6ea chore: merge main (83313650) into rich captures
  • e725fbd fix(analysis-view): count each scenario body on its own when reserving derived text
  • 2c7862a fix(analysis-view): keep trailing literal pairs out of sibling-pair-variance

📊 Changes

28 files changed (+1227 additions, -66 deletions)

View changed files

📝 docs/cli.md (+7 -0)
➕ docs/specs/agent-environments/rich-captures/plan.md (+18 -0)
➕ docs/specs/agent-environments/rich-captures/spec.md (+56 -0)
➕ docs/specs/agent-environments/rich-captures/tasks.md (+10 -0)
➕ docs/specs/agent-environments/rich-captures/verification.md (+104 -0)
📝 docs/specs/agent-environments/scenario-capture/spec.md (+6 -3)
📝 docs/web-network-captures.md (+22 -8)
📝 src/application/analysisView/AnalysisViewService.test.ts (+233 -1)
📝 src/application/analysisView/AnalysisViewService.ts (+84 -4)
➕ src/application/analysisView/evidenceFileSource.test.ts (+64 -0)
➕ src/application/analysisView/evidenceFileSource.ts (+125 -0)
📝 src/cli/analysisViewCommands.ts (+7 -5)
📝 src/contracts/analysisViewToolContracts.ts (+1 -1)
📝 src/domain/analysisErrorProjection.ts (+8 -0)
📝 src/domain/analysisView/EnvironmentManifestAccumulator.ts (+17 -8)
📝 src/domain/analysisView/WebNetworkProjectionAccumulator.ts (+8 -9)
📝 src/domain/analysisView/analysisView.ts (+15 -1)
📝 src/domain/analysisView/analysisViewDataAdmission.ts (+3 -7)
📝 src/domain/analysisView/environmentManifestRules.ts (+125 -10)
📝 src/domain/analysisView/environmentManifestView.test.ts (+132 -0)

...and 8 more files

📄 Description

Summary

Allow realistic captures to become environment manifests without sending the complete Evidence inline. inspect_analysis_view accepts an authenticated local evidence-file source; the opt-in sibling-pair-variance rule groups owner/repository paths only when a shared literal follows the pair. Trailing profile sub-resources remain separate tools.

Refs #4933. This extends existing read-only analysis of caller-selected local Evidence. It adds no provider, target execution, network request, mutation, or transport default change.

Changes

  • Read and authenticate Evidence within the request's cancellation and artifact-resource scope, with file-reader and authentication heap checks. CLI resolves relative paths; MCP requires an absolute path.
  • Keep file authentication at the file-source boundary. Invalid file contents return EvidenceFileError with the selected path and file-relative content_issues, rather than fictional source.path.<field> request locations.
  • Apply pair templating before single-segment inference and preserve namespace/name roles. The rule remains an opt-in inference, not proof of handler identity.
  • Keep the 96 MiB projection budget. Retained/file scenario sources reserve validation scratch and derived request text without charging borrowed response strings as inline input. Inline admission is unchanged.

Validation

  • 16 relevant source files / 298 tests passed; 5 compiled CLI/MCP and downstream environment boundary files / 48 tests passed.
  • Serial static/build/artifact gate: 11 tasks passed. Docs/catalog checks: 8 tasks passed. Architecture guards passed.
  • Real Gitea 28.2.0 + Chromium: 9 transactions, 45 events, zero drops, 12.6 MB capture. Inline refused within the unchanged budget; file CLI and default stdio MCP agreed on 5 tools, including separate trailing profile sub-resources. HTTP SDK checked 6 complete small responses and 12 correctly flagged 256 KiB large-response prefixes.
  • One CPU / one worker; sampled peak process-family RSS: source tests 765 MiB, boundaries 1,795 MiB, static/build 4,677 MiB, real application workflow 2,146 MiB. No OOM. Model token usage unmeasured; detailed timing and limits in the verification document.

Original macOS/Gitea/model-task experiments and their limitations are recorded in verification.md. In particular, the author's 63-tool / 12-task run predates the trailing-pair guard and is not evidence of the final guard's tool count. Current follow-up does not claim new macOS/Windows runtime or model-task verification.

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.

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.

🤖 Generated with Claude Code


🔄 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/5293 **Author:** [@earakely-scale](https://github.com/earakely-scale) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/20/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `feat/analysis-view-rich-captures` --- ### 📝 Commits (10+) - [`a64367a`](https://github.com/morluto/rea/commit/a64367a9125d2735128ead8306a117c063b2798a) feat(analysis-view): project rich captures from an Evidence file and template path pairs - [`0814658`](https://github.com/morluto/rea/commit/081465859d1cfa6e1c3016f0593722576db7d2d2) docs(analysis-view): record the rich-capture verification - [`a89e15a`](https://github.com/morluto/rea/commit/a89e15ac117edc620c6912421d7f6e1859605f5f) fix(analysis-view): honour cancellation and memory for file sources; merge pairs first - [`4597b73`](https://github.com/morluto/rea/commit/4597b73b5cc996518fe284442c20fe43c8661378) fix(analysis-view): observe cancellation after synchronous work; keep pair roles - [`e77707b`](https://github.com/morluto/rea/commit/e77707ba51384d280058c0c55ab2816b497b0c30) chore: merge main (b4938aed) into rich captures - [`3314fad`](https://github.com/morluto/rea/commit/3314fad0cdee9ec4e5671fac69c1d7e4c975479f) chore: merge main (bf1eeee9) into rich captures - [`80bda28`](https://github.com/morluto/rea/commit/80bda28c30def3f191ca500e4cdd63d82f2d3559) fix(analysis-view): keep large scenario files projectable; observe cancellation before auth failures - [`4fee6ea`](https://github.com/morluto/rea/commit/4fee6ea22b6c33d7315f7d382d8a1766705895d1) chore: merge main (83313650) into rich captures - [`e725fbd`](https://github.com/morluto/rea/commit/e725fbd48d31dd6fbc0f5d7b75abb284151e7e64) fix(analysis-view): count each scenario body on its own when reserving derived text - [`2c7862a`](https://github.com/morluto/rea/commit/2c7862a245d91b367859efaef4726dd15ca1dd2e) fix(analysis-view): keep trailing literal pairs out of sibling-pair-variance ### 📊 Changes **28 files changed** (+1227 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `docs/cli.md` (+7 -0) ➕ `docs/specs/agent-environments/rich-captures/plan.md` (+18 -0) ➕ `docs/specs/agent-environments/rich-captures/spec.md` (+56 -0) ➕ `docs/specs/agent-environments/rich-captures/tasks.md` (+10 -0) ➕ `docs/specs/agent-environments/rich-captures/verification.md` (+104 -0) 📝 `docs/specs/agent-environments/scenario-capture/spec.md` (+6 -3) 📝 `docs/web-network-captures.md` (+22 -8) 📝 `src/application/analysisView/AnalysisViewService.test.ts` (+233 -1) 📝 `src/application/analysisView/AnalysisViewService.ts` (+84 -4) ➕ `src/application/analysisView/evidenceFileSource.test.ts` (+64 -0) ➕ `src/application/analysisView/evidenceFileSource.ts` (+125 -0) 📝 `src/cli/analysisViewCommands.ts` (+7 -5) 📝 `src/contracts/analysisViewToolContracts.ts` (+1 -1) 📝 `src/domain/analysisErrorProjection.ts` (+8 -0) 📝 `src/domain/analysisView/EnvironmentManifestAccumulator.ts` (+17 -8) 📝 `src/domain/analysisView/WebNetworkProjectionAccumulator.ts` (+8 -9) 📝 `src/domain/analysisView/analysisView.ts` (+15 -1) 📝 `src/domain/analysisView/analysisViewDataAdmission.ts` (+3 -7) 📝 `src/domain/analysisView/environmentManifestRules.ts` (+125 -10) 📝 `src/domain/analysisView/environmentManifestView.test.ts` (+132 -0) _...and 8 more files_ </details> ### 📄 Description ## Summary Allow realistic captures to become environment manifests without sending the complete Evidence inline. `inspect_analysis_view` accepts an authenticated local `evidence-file` source; the opt-in `sibling-pair-variance` rule groups owner/repository paths only when a shared literal follows the pair. Trailing profile sub-resources remain separate tools. Refs #4933. This extends existing read-only analysis of caller-selected local Evidence. It adds no provider, target execution, network request, mutation, or transport default change. ## Changes - Read and authenticate Evidence within the request's cancellation and artifact-resource scope, with file-reader and authentication heap checks. CLI resolves relative paths; MCP requires an absolute path. - Keep file authentication at the file-source boundary. Invalid file contents return `EvidenceFileError` with the selected path and file-relative `content_issues`, rather than fictional `source.path.<field>` request locations. - Apply pair templating before single-segment inference and preserve namespace/name roles. The rule remains an opt-in inference, not proof of handler identity. - Keep the 96 MiB projection budget. Retained/file scenario sources reserve validation scratch and derived request text without charging borrowed response strings as inline input. Inline admission is unchanged. ## Validation - 16 relevant source files / 298 tests passed; 5 compiled CLI/MCP and downstream environment boundary files / 48 tests passed. - Serial static/build/artifact gate: 11 tasks passed. Docs/catalog checks: 8 tasks passed. Architecture guards passed. - Real Gitea 28.2.0 + Chromium: 9 transactions, 45 events, zero drops, 12.6 MB capture. Inline refused within the unchanged budget; file CLI and default stdio MCP agreed on 5 tools, including separate trailing profile sub-resources. HTTP SDK checked 6 complete small responses and 12 correctly flagged 256 KiB large-response prefixes. - One CPU / one worker; sampled peak process-family RSS: source tests 765 MiB, boundaries 1,795 MiB, static/build 4,677 MiB, real application workflow 2,146 MiB. No OOM. Model token usage unmeasured; detailed timing and limits in the verification document. Original macOS/Gitea/model-task experiments and their limitations are recorded in [verification.md](docs/specs/agent-environments/rich-captures/verification.md). In particular, the author's 63-tool / 12-task run predates the trailing-pair guard and is not evidence of the final guard's tool count. Current follow-up does not claim new macOS/Windows runtime or model-task verification. ## 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. ## 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:43:37 +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#6863
No description provided.