[PR #6195] [MERGED] fix(pcap): locate parent validation issues within analysis-view source #7196

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6195
Author: @xiajiahang
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @morluto

Base: main ← Head: codex/fix-6130-pcap-parent-path


📝 Commits (1)

  • 65e4969 fix(pcap): locate parent validation issues within analysis-view source

📊 Changes

2 files changed (+125 additions, -14 deletions)

View changed files

📝 src/domain/analysisView/pcapCaptureView.ts (+6 -14)
➕ tests/boundary/mcp/pcapParentIssuePath.test.ts (+119 -0)

📄 Description

Summary

Fixes #6130. Malformed inspect_pcap_capture parent results now locate validation issues beneath source.normalized_result, matching the existing analysis-view convention for both inline and retained Evidence.

Problem and expected behavior

A digest-valid parent with target.path: 123 was rejected with an issue at ["target", "path"]. It should be rejected at ["source", "normalized_result", "target", "path"], preserving the type issue and input-contract recovery.

Change and scope

Use the existing parseAnalysisViewResult owner instead of duplicating schema-error projection in the pcap branch. Exact subject path/digest validation remains in the pcap parser. Routine correction within existing static analysis scope; no new provider or authority, so an advance scope decision is not applicable.

Contract and boundary impact

  • Semantic owner: shared analysis-view parent parser; failure occurs during parent-result validation.
  • CLI/MCP: corrected structured diagnostic paths; no schema, catalog, package, or generated metadata changes.
  • Evidence and authority: preserves the owning schema, provenance, caller-selected source, and exact subject validation; no new execution, mutation, network, or cleanup behavior.

Evidence and regression coverage

A new test calls the registered MCP tool through SDK InMemoryTransport. A valid parent succeeds; malformed inline and retained parents retain invalid_request / invalid_input, retryable: false, type information, and input-contract recovery. A subsequent ping succeeds.

Before the fix, the new test failed because the actual path omitted source.normalized_result. After the fix it passes. Reports and Evidence storage are synthetic; no Wireshark decoder, real packet capture, CLI, or Evidence-file workflow was exercised.

Validation performed

  • npm run test:focused -- tests/boundary/mcp/pcapParentIssuePath.test.ts src/domain/analysisView/pcapCaptureView.test.ts — 2 files, 2 tests passed.
  • npm run check:fast and npm run check — passed (lint has existing warnings; zero errors).
  • npm run verify:test-discovery — all 1958 test files discovered exactly once.
  • git diff --check — passed.

Final commands used pinned Node v24.18.0 / npm 11.16.0 on macOS arm64. Static/build tasks reused Turbo cache populated by successful Node v24.21.0 runs; focused tests ran fresh on both versions.

Compatibility, safety, and release

No breaking changes or release metadata changes. This is a diagnostic correction over existing Evidence; real provider execution is outside the changed boundary and was not verified.

Author readiness

Human owner: @xiajiahang

  • 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/6195 **Author:** [@xiajiahang](https://github.com/xiajiahang) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/fix-6130-pcap-parent-path` --- ### 📝 Commits (1) - [`65e4969`](https://github.com/morluto/rea/commit/65e49690d4cdb864ba3753c5e0340d697298e6f3) fix(pcap): locate parent validation issues within analysis-view source ### 📊 Changes **2 files changed** (+125 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/analysisView/pcapCaptureView.ts` (+6 -14) ➕ `tests/boundary/mcp/pcapParentIssuePath.test.ts` (+119 -0) </details> ### 📄 Description ## Summary Fixes #6130. Malformed `inspect_pcap_capture` parent results now locate validation issues beneath `source.normalized_result`, matching the existing analysis-view convention for both inline and retained Evidence. ## Problem and expected behavior A digest-valid parent with `target.path: 123` was rejected with an issue at `["target", "path"]`. It should be rejected at `["source", "normalized_result", "target", "path"]`, preserving the type issue and input-contract recovery. ## Change and scope Use the existing `parseAnalysisViewResult` owner instead of duplicating schema-error projection in the pcap branch. Exact subject path/digest validation remains in the pcap parser. Routine correction within existing static analysis scope; no new provider or authority, so an advance scope decision is not applicable. ## Contract and boundary impact - Semantic owner: shared analysis-view parent parser; failure occurs during parent-result validation. - CLI/MCP: corrected structured diagnostic paths; no schema, catalog, package, or generated metadata changes. - Evidence and authority: preserves the owning schema, provenance, caller-selected source, and exact subject validation; no new execution, mutation, network, or cleanup behavior. ## Evidence and regression coverage A new test calls the registered MCP tool through SDK InMemoryTransport. A valid parent succeeds; malformed inline and retained parents retain `invalid_request` / `invalid_input`, `retryable: false`, type information, and input-contract recovery. A subsequent ping succeeds. Before the fix, the new test failed because the actual path omitted `source.normalized_result`. After the fix it passes. Reports and Evidence storage are synthetic; no Wireshark decoder, real packet capture, CLI, or Evidence-file workflow was exercised. ## Validation performed - `npm run test:focused -- tests/boundary/mcp/pcapParentIssuePath.test.ts src/domain/analysisView/pcapCaptureView.test.ts` — 2 files, 2 tests passed. - `npm run check:fast` and `npm run check` — passed (lint has existing warnings; zero errors). - `npm run verify:test-discovery` — all 1958 test files discovered exactly once. - `git diff --check` — passed. Final commands used pinned Node v24.18.0 / npm 11.16.0 on macOS arm64. Static/build tasks reused Turbo cache populated by successful Node v24.21.0 runs; focused tests ran fresh on both versions. ## Compatibility, safety, and release No breaking changes or release metadata changes. This is a diagnostic correction over existing Evidence; real provider execution is outside the changed boundary and was not verified. ## Author readiness Human owner: @xiajiahang - [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:46:04 +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#7196
No description provided.