Repository navigation
Test _json's infinity/empty-tag rules and close() on a full queue - #11
Open
dmccoystephenson wants to merge 1 commit into
Open
dmccoystephenson wants to merge 1 commit into
dmccoystephenson wants to merge 1 commit into
Conversation
Characterization tests for branches with no coverage: infinite values are dropped while zero is kept, tags empty after cleaning are omitted and the rest stringified, report() after close() sends nothing, and close() on a full queue displaces the oldest report so the sentinel still stops the sender within the timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (anchored on CI run 37907573755, all three matrix jobs green on the PR head):
Judgment call flagged for a human reviewer:
Summary: a tests-only PR with no production, version or wire-format changes. None of the do-not-auto-merge paths are touched. This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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.
Stage B — unit-test expansion (
_jsoncleaning rules andclose()edge paths). Characterization only: no production code is changed.Summary
test_json_drops_infinite_values_but_keeps_zero—±infis omitted from the payload (JSON has no infinity), while0is kept as a real value rather than being treated as missing.test_json_omits_tags_that_are_empty_after_cleaning_and_stringifies_the_rest— an empty mapping, or one containing onlyNonevalues, produces notagskey; non-string keys/values are stringified.test_report_after_close_sends_nothing—report()on a closed client is a silent no-op.test_close_on_a_full_queue_drops_the_oldest_report_and_still_stops_the_sender— with one report in flight and the queue full,close()displaces the oldest queued report so the sentinel fits, returns within its timeout, and the sender thread exits once the server answers. ExactlyQUEUE_CAPACITYreports are delivered (in flight + capacity − the displaced one).These four branches of
_jsonandclose()were previously unexercised bytests/test_trace_client.py.Test plan
python3 -m unittestlocally on Python 3.8.10 —Ran 45 tests,OKBuildmatrix:test (3.8),test (3.10),test (3.12)No tracking issue — gap found during triage (no open issues existed at triage time). No open issues were skipped.
Java parity: no Java-visible behavior changed (tests only).
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson