Repository navigation
Test reporting from several threads and Close racing Report - #19
Merged
Merged
Conversation
Nothing exercised Report from more than one thread, nor the "could not queue" path when Close lands between Report's enabled check and its enqueue. Lock in that concurrent reports are all delivered intact and that a Close on another thread never throws into the reporting thread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (head fc5af9b):
Judgment calls noted for a human reader:
The diff is test-only and touches no do-not-auto-merge path. This review comment 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.
Summary
Stage B (unit-test expansion) cycle: concurrent use of
TraceClient. No test exercisedReportfrom more than one thread, and nothing drove thecould not queuebranch inReport(thecatchtaken whenCloselands between theIsEnabledcheck and_queue.TryAdd).Report_DeliversEveryEventReportedFromSeveralThreadsAtOnce— four threads report 40 distinct events each (160, well underQueueCapacity); every event is asserted delivered exactly once, untorn, with nothing logged.Report_NeverThrowsWhileAnotherThreadCloses— a background thread keeps reporting whileCloseruns on the test thread and for 100 ms afterwards; no exception may escapeReport, the client ends disabled, and the only log lines allowed arecould not queue busy: ...(the race) orqueue full, dropped busy(a cold-runner first request letting the queue fill). Every delivered body is asserted intact.Characterization only — no production code changed. Test-only diff (+79 lines in
tests/TraceClient.Tests/TraceClientTest.cs).Test plan
Buildworkflow green on ubuntu-latest (net8.0)Buildworkflow green on windows-latest (net8.0 + net48)dotnetis not installed in the dispatch sandbox, so the local run is UNVERIFIED; the CI matrix on the PR head is the anchor.Skipped backlog
User-Agent) — a wire-format contract decision shared with the Java and Python clients; left for the maintainer.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