Skip to content

fix(pcap): retain rejected relative Wireshark tool paths in diagnostics - #7577

Closed
harshitethic wants to merge 2 commits into
morluto:mainfrom
harshitethic:fix/pcap-retain-relative-selection-7569
Closed

harshitethic wants to merge 2 commits into
morluto:mainfrom
harshitethic:fix/pcap-retain-relative-selection-7569

Conversation

@harshitethic

@harshitethic harshitethic commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #7569. REA already kept configured in PcapConfigurationFailure.diagnostics, but the provider discarded it when translating to AnalysisCapabilityUnavailableError. Pass the producing diagnostics through that existing typed error channel. The absolute-path admission rule, error category, and recovery guidance remain unchanged.

Tests and verification

  • Reproduced the missing original rel/tshark selection in CLI output before the fix.

  • Added CLI boundary regressions for both REA_TSHARK_COMMAND=rel/tshark and REA_CAPINFOS_COMMAND=rel/capinfos.

  • npx vitest run --project cli-boundary tests/boundary/cli/pcapRelativeToolDiagnostic.test.ts -> 2 passed after rebuild.

  • npm run typecheck, git diff --check, repo commit-hook oxlint/oxfmt -> passed on pinned Node 24.22.1.

  • No Wireshark executable launched in those pre-admission rejection tests.

  • Follow-up: built CLI and stdio MCP cases for both relative selections assert the structured details.diagnostics.configured value and parity; both passed on macOS. npm run check:fast and git diff --check also passed. No real Wireshark tools or Windows hosts were used.

Author readiness

  • Human owner reviewed the final diff and edge cases.
  • Human owner accepts stated verification scope and limitations.
  • Human owner requests maintainer review.

Draft pending the required human ownership review; no automated attestation is implied.

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The code appears safe to merge; the previous testing gap is fixed, and no new actionable issue was found.

Summary

Preserves rejected Wireshark tool selections by passing existing diagnostics through PcapProvider’s typed error channel.

  • Rejected Wireshark paths keep their original value in error details.

Reviews (2) · Last reviewed commit: "test(pcap): verify relative tool diagnos..." · Reviewed by Greptile

@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: I ran the new test file at draft head b013bd8 on Node 22.23.4, 24.22.1 and 26.12.1, and both tests passed on each. With src/pcap/PcapProvider.ts swapped back to the merge base ef11f77, both tests failed on all three, so they do test the fix. Three CI checks are waiting for a maintainer to approve them, and the head is 708 commits behind main.

I ran tests/boundary/cli/pcapRelativeToolDiagnostic.test.ts in a VM. The merge base is the commit where this branch split from main.

Check Node 22.23.4 Node 24.22.1 Node 26.12.1
Head b013bd8 pass: 1 file, 2 tests pass: 1 file, 2 tests pass: 1 file, 2 tests
Red run (head, with src/pcap/PcapProvider.ts from ef11f77) fail: 2 of 2 tests fail: 2 of 2 tests fail: 2 of 2 tests
  • The two tests that failed in the red run are Wireshark refuses and identifies the caller's relative REA_CAPINFOS_COMMAND selection and ... REA_TSHARK_COMMAND selection.
  • Both tests fail without the fix and pass with it.
  • CI on b013bd8: CI, PR title and Real packet capture are action_required, which means they wait for a maintainer to approve them.
  • Greptile Review passed.
  • Validate author declaration has one successful and one cancelled check run.
  • The PR readiness commit status is pending.
  • The head is 708 commits behind main b81da90. GitHub says the PR is mergeable, and its merge state is blocked.

Not run

  • A real tshark or capinfos binary.
  • A merge with current main, b81da90.
Test setup
  • Box: Fedora 44 VM (4 vCPUs, 8 GB) on my Nobara 44 PC, Linux 7.2.11
  • Node: 22.23.4, 24.22.1, 26.12.1
  • Head / base: b013bd8 / ef11f77 (merge base with main)
  • Red run: b013bd8 with src/pcap/PcapProvider.ts from ef11f77
  • Install: npm ci --offline and npm run test:prepare on Node 24.22.1, exit 0, for both trees
Commands
npm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/boundary/cli/pcapRelativeToolDiagnostic.test.ts

🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊

gensokyo-dev added a commit that referenced this pull request Nov 14, 2026
gensokyo-dev added a commit that referenced this pull request Nov 14, 2026
N0zoM1z0 pushed a commit that referenced this pull request Nov 14, 2026
@N0zoM1z0

Copy link
Copy Markdown
Collaborator

Thank you for this fix. It landed in #10499 with your authorship kept on the commit (adapted where noted in the PR), so I'm closing this PR as superseded.

@N0zoM1z0 N0zoM1z0 closed this Nov 14, 2026
@morluto morluto added bug Something isn't working provider: pcap Analysis provider / engine: pcap labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working provider: pcap Analysis provider / engine: pcap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Relative Wireshark tool refusals drop the supplied path value

4 participants