Repository navigation
fix(pcap): retain producer contradiction diagnostics - #7937
Merged
Merged
Conversation
Contributor
[Medium impact] The reviewed changes appear safe to merge; no blocking code issue was found. SummaryThe PR preserves observed packet counts and SHA-256 values when capture tools disagree. Contradictory results remain errors.
Reviews (2) · Last reviewed commit: "test(pcap): align DNS fixture with empty..." · Reviewed by Greptile |
morluto
marked this pull request as ready for review
October 28, 2026 23:24
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7293. Packet-capture inspection refused contradictory capinfos and TShark packet counts but omitted the observed counts from its public error. The capture owner now retains both counts and a mismatch reason in structured diagnostics. The analogous disagreement between the capinfos and snapshot SHA-256 values retains both digests.
Problem and expected behavior
The provider's protocol errors carried a specific internal message, while the shared projection returned generic
unreadable_outputadvice without those facts. Contradictory results remain refused; CLI and MCP should expose the producer-owned facts indetails.diagnostics.Change and scope
Bind only the parsed comparison facts at the capture producer. The common error projection already preserves diagnostics. Other packet-output parser failures can also lose internal reasons; some include arbitrary producer field names, so making those reasons public requires a separately bounded representation and is not covered here.
Contract and boundary impact
Expected effects:
Evidence and regression coverage
The issue reports a public Linux CLI reproduction with controlled tools. New Linux producer-boundary regressions cover count mismatch, equal zero counts, and digest mismatch; a new public CLI/MCP regression checks the count diagnostic. All new cases were skipped on the macOS development host. Their post-fix results are not verified; Linux CI or an admitted Linux/Windows host must run them. No real Wireshark run was performed.
Validation performed
npm run check:fast— passed.npm run test:focused -- tests/acceptance/pcapOutputUtf8CliMcp.test.ts tests/boundary/pcap/pcapProvider.test.ts— four existing tests passed and 40 skipped on macOS, including all new regressions.git diff --check— passed.Compatibility, safety, and release
No successful output or error-code change; unreadable-output errors for these contradictions gain structured diagnostics. Real-tool and admitted-host verification remain outstanding.
Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.