Repository navigation
Test an unreadable install ID file through the constructor - #20
Merged
Merged
Conversation
Drive the "could not read" install-ID branch through a client with a log callback: the message names the path, the directory in the way is left alone, and the event still carries an in-memory ID. A second test pins that a throwing logger on that path cannot break the constructor. Also mention the install tag in Report's XML doc, which only named version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI showed the constructor's install-ID log messages carry the prefix twice. This is a characterization cycle, so the test records current behaviour and the bug is tracked in #21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (anchored on CI run 40801191296 on head 061a9fa):
Observations:
Do-not-auto-merge paths: none matched. This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
2 tasks
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 on the install-ID failure paths, plus one doc-comment fix found on the way.
Client_WithAnUnreadableFileLogsWhyAndLeavesItAlone: the "could not read" branch ofReadOrCreateInstallIdwas covered only through the staticInstallIdFromFile(nolog). It is now driven through the constructor. The test checks that thelogmessage readsusing an in-memory install ID for this process: could not read <path>:, that no "could not write" message follows (an unreadable file is not overwritten), that the directory in the way is left alone, and that the event still carries the in-memory ID.Client_WhoseIdFileFailsStillConstructsWhenTheLoggerThrows: on the same path, a logger that throws is still called, but it cannot break the constructor, and the event is still delivered.ReportXML doc: it named only theversiontag thatReportadds. It now also namesinstall(fromInstallId), along with the cases whereinstallis left off: when the event's own tags already have one, or when adding it would passMaxTags. This matchesWithInstalland the class<remarks>. Only the comment changed; behaviour is the same.These are characterization tests only, and no production code was changed. No tracking issue exists; the gap was found during triage.
Bug found and pinned, not fixed: the first CI run showed that these messages reach the
logcallback as[trace] [trace] using an in-memory install ID ..., with the prefix doubled. The cause is that the constructor passes the already-prefixingLogintoReadOrCreateInstallId. Per the characterization rule, the test pins the current doubled prefix (with a comment) and the fix is tracked in #21. When #21 is fixed, that assertion should change to a single prefix.Deferred
User-Agent): deferred. It changes the wire format and needs a decision on parity with the Java and Python clients, which is a maintainer call per this loop's contract-change rule.Test plan
Buildworkflow green on ubuntu-latest (net8.0: 91/91 passed)Buildworkflow green on windows-latest (net8.0: 91/91, net48: 91/91 passed)Local
dotnet testcould not run because thedotnetSDK is not available in this dispatch sandbox (UNVERIFIED locally). The CI matrix on the PR head (run 40801191296) is the gate.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