Repository navigation
Test the constructor's trimming and report's tag cleaning - #17
Merged
dmccoystephenson merged 1 commit intoOct 18, 2026
Merged
Conversation
The constructor strips surrounding whitespace from base_url, application and key, and report() drops None tag keys/values and stringifies the rest before merging in the program version, but no test exercised either. Lock in that a padded base URL, application and key still yield /api/metrics, "Bearer <key>" and the bare application name, and that a None "version" tag does not suppress the program's own version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (one intrinsic pass, anchored on CI run 39014267037):
Findings:
Summary: tests-only, CI green across the matrix; ready for human review. 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) cycle: two characterization tests are added for constructor and
report()branches that had no coverage. Production code is unchanged.Summary
test_constructor_trims_the_base_url_application_and_key— a base URL, application and key padded with whitespace are shown to still yieldPOST /api/metrics,Authorization: Bearer k-123,"application":"MyGame"and aUser-Agentending(MyGame). Previously only a trailing slash and a blank key were exercised.test_report_drops_none_tags_and_stringifies_the_rest_before_adding_the_version— through the realreport()path (not just_json), aNonetag key and value are shown to be dropped, a non-string value stringified, and a{"version": None}tag shown not to suppress the program's ownversion.No tracking issue — gap found during triage. One behavior found while scanning, the
versiontag being added even pastMAX_TAGS, was deliberately not characterized here and is filed as #16, because the fix would be Java-visible.Test plan
python3 -m unittest -vlocally —Ran 50 tests ... OK(48 before)Buildmatrix green on 3.8 / 3.10 / 3.12Java parity
No Java-visible behavior changed (tests only).
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