Repository navigation
Conversation
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.
Problem
While skipping an incomplete session, the traffic_dump post-processor
indexes optional connection-time and start-time fields in its diagnostic
path. Missing fields can raise a second exception and terminate the worker
before pending and subsequent valid sessions are written. The CLI can
still return success with an incomplete output summary.
For example, an incomplete session such as
{"transactions": []}raises a verification error, but the diagnostic handler then raises
KeyError: 'connection-time'. With valid sessions before and after thisentry, the worker can exit before writing either valid session, while
the CLI still exits with status 0.
Changes
Read optional timestamps safely and use the resolved value in the log
message. Preserve the existing behavior of skipping incomplete sessions.
Add function and CLI regressions that retain distinct valid sessions
before and after invalid entries. Check the output JSON, session and
transaction counts, and absence of worker-thread exceptions. Also verify
that the legacy start-time fallback is logged correctly.
Register the Python test with CTest when a Python 3.11+ interpreter is
available.
Validation
and Python 3.11.2.
five subtest failures and five subtest errors. All three test methods
pass after the fix.
traffic_dump_response_body, and traffic_dump_sni_filter.
git diff --check passed.
The regression test can be run directly from the repository root
with Python 3.11+:
The suite contains three test methods: a valid-session control,
plus function and CLI tests that each exercise six incomplete-session
variants: null, an empty object, missing timestamps, a legacy start-time
only, a zero connection-time, and a nonzero connection-time.