Repository navigation
Characterize how usage reporting reads a mis-shaped settings block - #71
Merged
dmccoystephenson merged 1 commit intoNov 16, 2026
Merged
Conversation
A usage_reporting value that is not an object is replaced by the default block with reporting on, and enabled is read by truthiness, so the string "false" leaves reporting on. Both are now asserted by tests and described in the README; the behaviour itself is tracked in #70. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (head
Findings to note, not fix:
This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
dmccoystephenson
deleted the
feature/characterize-settings-value-shapes
branch
November 16, 2026 06:52
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
Stage B (unit-test expansion) cycle for
usage_reporting.py. It covers two wayssettings.jsoncan hold ausage_reportingblock of the wrong shape. Neither was tested or documented before. Production code is not changed.test_a_block_that_is_not_an_object_is_replaced_by_the_defaultsasserts what happens whenusage_reportingisfalse, a string, a list ornull. The value is overwritten with the default block, with reporting on. The first-run notice is shown again, and other entries in the file are kept.test_enabled_is_read_by_truthinessasserts thatenabledgoes throughbool()."false","off"and1leave reporting on, while0,""andnullturn it off withdisabled_reason == "config". A missingenabledleaves reporting on.Usage reportingsection gains one paragraph that describes both behaviours, so a reader who wants to opt out writes the JSON valuefalse.Both behaviours turn an attempted opt-out into reporting, so they were filed as #70 for a decision rather than changed in this test cycle. This PR does not close #70.
Test plan
python3 -m py_compile *.pypython3 -m unittest discover -s tests: 216 tests ran, OK (local, Python 3.8)isinstance(section, dict)was changed tosection is not None, andbool(enabled)toenabled is True. Six subtests failed across the two new tests. With the source restored they pass, andusage_reporting.pyhas no diff.Testsworkflow is green on this headManual validation of the render path is not applicable, since neither
main.pynor any rendering or Viron-service code is touched.Issues not picked this cycle
Vironsubmodule, which needs explicit authorization.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
drafted by Claude on behalf of Daniel Stephenson
🤖 Generated with Claude Code