Repository navigation
Describe usage reporting's fail-closed switch accurately in TESTING.md - #265
Merged
Merged
Conversation
docs/TESTING.md still said only an explicit 0/false/no/off opts out and an unreadable notify.env just warns, which #263 and #264 changed: the switch fails closed, an unreadable notify.env is off, and near-miss opt-out spellings count as off. README and usage.py's docstring now also say that an environment variable saying on wins over an unreadable notify.env, as tests/test_usage.py asserts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review: no issues found. The
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.
Summary
docs/TESTING.md'stests/test_usage.pyparagraph still said "only an explicit0/false/no/offopts out, an unreadable file degrades to a stderr warning". fix: keep usage reporting off once it is turned off #263 and fix: count a near-miss usage-reporting opt-out as off #264 changed both. The switch now fails closed: onlytrue/on/yes/1keeps reporting on. An unreadablenotify.envcounts as off, and so does an opt-out under a near-miss name. The paragraph now describes whatTestSettingsactually asserts:test_the_setting_fails_closed,test_the_notify_env_setting_fails_closed_too,test_an_opt_out_written_under_a_near_miss_name_is_an_opt_out,test_near_miss_names_that_say_on_are_not_an_opt_out,test_other_programs_switches_in_the_environment_are_not_gardenersandtest_a_missing_config_file_means_defaults_and_an_unreadable_one_means_off.README.md's "Usage reporting" section andgardener/usage.py's module docstring said an unreadablenotify.envturns reporting off, with no exception.usage.enabledchecks a non-blankGARDENER_USAGE_REPORTING_ENABLEDenv var before it looks at an unreadable file, so an env var saying on still wins.tests/test_usage.py:213-216asserts this. Both docs now state that exception.Documentation only.
usage.pychanges only in its docstring, and no code behaviour changes.Test plan
python3 -m compileall gardenerpassed.tests/andintegration/'s offline tier): CI on this PR is the anchor of record. The sandbox'spython3is 3.8.10, belowpyproject.toml's>=3.10floor, so a local run would not be meaningful.dispatch.py,dev_loop.pyand the prompt templates are not touched.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