Repository navigation
Test the package's exports, version agreement, reason constants and non-mapping tags - #18
Merged
Merged
Conversation
…on-mapping tags Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (head of
Judgment notes (non-blocking):
Ready to merge: tests-only, CI green, no do-not-auto-merge path touched. This review 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: characterization tests are added for the package's public surface and release identity, which until now were guarded only by convention. No production code is changed.
Summary
test_every_place_the_version_is_written_agrees_with_version— both module headers (trace_client/trace_client.py,trace_client/__init__.py) andpyproject.tomlare checked to name__version__, so a release that bumps one place and not the others fails CI instead of shipping a vendored file that names two versions.test_the_package_exports_every_public_name_of_the_module—trace_client.__all__is checked to equal the module's own public names (plus__version__), each re-exported as the same object, so a public constant added to the single-file distribution cannot be silently missing from the package import.test_disabled_reason_values_are_the_exported_constants—REASON_ENVIRONMENT/REASON_CONFIG/REASON_NO_KEYare pinned to the strings the README documents, anddisabled_reasonis checked to take those constants' values.test_report_does_not_raise_for_tags_that_are_not_a_mapping— a list or int passed astagsis confirmed to be dropped and logged at DEBUG ([trace] could not queue <name>), never raised.Test plan
python -m unittest -vlocally on Python 3.8.10:Ran 54 tests ... OK(50 before).pyproject.tomlbumped to0.4.2andINSTALL_TAGremoved from__all__, both failed; both files were restored afterwards.test (3.8),test (3.10),test (3.12)green.Java parity
No Java-visible behavior changed — tests only.
Deferred
MAX_TAGS) is not picked: its fix changes the wire format/README promise and needs a coordinated decision with trace-client-java, so it is left for the owner. The new tests deliberately do not characterize that path.No tracking issue — gap 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