Repository navigation
Log install ID file failures with a single [trace] prefix - #22
Merged
Merged
Conversation
The constructor handed the instance Log method to ReadOrCreateInstallId, which reports through Note, so the prefix was added twice. Pass the raw callback instead; Note already guards against a null or throwing logger. The read-path test that pinned the doubled prefix now expects one, and the write-path test checks the full single-prefixed message. Fixes #21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (one pass, anchored on CI run 40985877536):
Observation outside the diff: No judgment calls remain, so no inline findings were raised. 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
TraceClient.cs: the constructor now passes the program's rawlogcallback (_log) toReadOrCreateInstallIdinstead of the instanceLogmethod.LogwrapsNote, which adds the[trace]prefix, so install ID file failures were logged as[trace] [trace] using an in-memory install ID ....Notealready guards against a null or throwing logger, so no protection is lost.InstallIdTest.Client_WithAnUnreadableFileLogsWhyAndLeavesItAlone: the assertion that pinned the doubled prefix (added in Test an unreadable install ID file through the constructor #20) now expects a single prefix.InstallIdTest.Client_WithAnUnwritableFileStillReportsWithAnInMemoryId: the looseContains("in-memory install ID")check is tightened toStartsWith("[trace] using an in-memory install ID for this process: could not write "), so the write path is covered as well.No change to the wire format, the opt-outs, the public API or the README. The log message wording stays the same; only the duplicate prefix is removed.
Test plan
Buildworkflow green on ubuntu-latest (net8.0)Buildworkflow green on windows-latest (net8.0 + net48)dotnetis not available in the dispatch sandbox, so nothing was run locally. CI on the PR head is the anchor.Deferred
User-Agentwire format shared with the Java and Python clients, so the maintainer has to pick an option. It is not suitable for an autonomous cycle.Closes #21
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