Repository navigation
Cover the server-id append into an existing server-wide file - #17
Merged
Merged
Conversation
An empty file, one ending in a newline, one whose server-id: line is unusable, and the FINE lines logged when the file cannot be read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (anchored on CI run 38225373526 and
Judgment call flagged for the maintainer:
No do-not-auto-merge path is touched; the PR is test-only. 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.
Stage B — unit-test expansion for the
server-id:append path inresolveInstallId. OnlyTraceClientTest.javais changed; no production code is touched.Summary
Four characterization tests are added for branches of the append path that no existing test drove:
installId_anUnreadableConfigIsLoggedFineAndNotAppendedTo: when the server-wide file cannot be read, bothFINElines (could not read server-wide config …andusing an in-memory server-id for this process: server-wide config was not readable) are asserted. Before this, only the fallback ID was checked, and neither message was.installId_isAppendedToAnEmptyConfigWithoutALeadingBlankLine: covers theexisting.length > 0false branch. A 0-byte file that already exists gets the comment block and theserver-id:line with no leading newline, and it counts as enabled.installId_isAppendedDirectlyBelowAConfigThatEndsInANewline: covers an existing file that ends in\n, where no extra newline is inserted. Before this, only the no-trailing-newline case was covered for a file that was not freshly created.installId_anUnusableServerIdLineGetsAUsableOneAppendedAndKept: an operator's invalidserver-id: has spaceis left in place. A valid line is appended, the read-back picks it, and a second build appends nothing more.All four pass against the current code. None of them revealed a bug.
Test plan
mvn -B verifylocally (Java 21):Tests run: 76, Failures: 0, Errors: 0, Skipped: 0(72 before this change, plus 4)build (8),build (17),build (21)green on the PR headDeferred
withVersionexceedsMAX_TAGS) was not picked up. It changes what is sent on the wire, which is a maintainer decision per the issue's own options list. It is already pinned bywithVersion_addsTheVersionEvenToAnEventAlreadyAtMaxTags.No tracking issue: this coverage gap was found during triage.
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