Repository navigation
Test that close() leaves every reason as it was and sends nothing more - #33
Merged
Merged
Conversation
The README promises disabledReason() is unchanged by close(), but only a client that was reporting had that asserted, and the report made after close() in closeIsPromptAndIdempotent was never checked against what the server received. Assert both, for each disabled reason too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (head 62929ed):
Judgment notes (not blocking):
All rubric items pass, which is suspicious on its face. The diff, however, is test-only, and the mutation check provides an external signal that the new assertions bite. 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
closeLeavesTheReasonAsItWasAndSendsNothingMoretotest/test_trace_client.cpp, which is a Stage B (unit-test expansion) cycle with no production change.disabledReason()is unchanged byclose(). Until now this was asserted only for a client that was reporting (closeIsPromptAndIdempotent). The new test asserts it for every disabled reason (configviaenabled = falseand via the default constructor,no key,unavailable,environment). Forenvironment, the opt-out variable is cleared beforeclose(), so aclose()that looked at the environment again would be caught.report("after-close")call incloseIsPromptAndIdempotentwas never checked against what the server received. The new test checks that reports made afterclose()(both overloads, on enabled and disabled clients) never reach the stub server, and that a secondclose()is still a no-op.No tracking issue. The gap was found during triage. Both open issues were skipped because each needs an owner decision: #21 (version tag vs. the 32-tag cap, a wire-level choice shared with the sibling clients) and #1 (
TRACE_CLIENT_CURLon Windows, which touches the do-not-auto-mergecurl.exelookup). A Stage A documentation sweep was run first. Every README number, opt-out value, disabled reason, curl option, theUser-Agentstring and the Building/CI description matched the code, so no docs PR was opened.Test plan
make test(g++, C++11,-Werror):76 tests, 0 failed checks(75 before; the one new test is registered intests[])make testwith-std=c++17:76 tests, 0 failed checksreason_ = REASON_CONFIG;at the top ofclose()made the new test fail 4 times (the reporting client,no key,unavailable,environment). The existing test caught only the reporting-client case. The header was then restored.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