Repository navigation
Cover withServerWideTags directly and a valueless enabled: line - #28
Merged
Merged
Conversation
withServerWideTags drops null tags, lets the event's own tag win, keeps event tags first, and never modifies the caller's map; none of that was asserted on the helper itself, and its null-dropping cannot be reached through report(). The cap is now also pinned for an event already at or over MAX_TAGS. A bare "enabled:" is skipped while a comment-only one is taken as the switch; the test pins that, and #27 asks whether it should. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (head
Finding fixed during review: Judgment call for the maintainer: 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 (the server-wide tag merge and the
enabled:line reader). Test code only; no production change.Summary
withServerWideTags_dropsNullTagsLetsTheEventWinAndNeverModifiesTheCallersMap: the helper's own Javadoc promises (null key/value counts as absent, the event's tag wins, the caller's map is untouched) were asserted only end to end, and its null-dropping cannot be reached throughreport()at all, becausewithVersiondrops nulls first. The key order (event tags first, then server-wide) and an event withnulltags are now pinned too.withServerWideTags_addsNoneToAnEventAlreadyAtOrOverMaxTags: the cap was covered only for an event belowMAX_TAGS. This pins that an event at the limit gains nothing, that one already over it (aswithVersionproduces today, see withVersion pushes an event already at MAX_TAGS over the server's tag limit #13) is neither trimmed nor grown, and that one short of it takes exactly the first server-wide tag.serverWideConfig_aValuelessEnabledLineIsSkippedButACommentOnlyOneIsTheSwitch: a characterization test. A bareenabled:is passed over and a laterenabled: falsedisables, butenabled: # ...captures#, becomes the switch, and a laterenabled: falseis ignored (fail-open). Filed as A comment-only enabled: line in the server-wide config shadows a later enabled: false #27 for a maintainer decision rather than changed here. The test pins the current behaviour and should be updated by whichever PR settles A comment-only enabled: line in the server-wide config shadows a later enabled: false #27.Test plan
mvn -B verifylocally on JDK 21:Tests run: 84, Failures: 0, Errors: 0, Skipped: 0(81 before, 3 new)build (8),build (17),build (21)green on the PR head (onlyjava.util.ArrayListis added, which is available on Java 8)Deferred issues
withVersionignoresMAX_TAGS) and A quoted enabled: "false" in the server-wide config does not turn reporting off #15 (quotedenabled: "false") were skipped. Both change the wire format or the opt-out contract and are waiting on a maintainer decision.enabled:value throughscalar()would likely settle A quoted enabled: "false" in the server-wide config does not turn reporting off #15 and A comment-only enabled: line in the server-wide config shadows a later enabled: false #27 together.No tracking issue for the coverage work. The 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