Repository navigation
fix: keep usage reporting off once it is turned off - #30
Merged
Merged
Conversation
Re-vendor trace-client-python 0.5.0 (every opt-out fails closed) and make Collide's own switch fail closed too: - "enabled" is read through allows_reporting instead of bool(), so "false", "off", null or a typo turn reporting off. - "usage_reporting": false (or any non-block value) is read as the setting and left alone; it used to be replaced by the default block, which turned reporting back on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Usage reporting is now kept off once it has been turned off, following the fail-closed change in the trace client (Stephenson-Software/trace-client-python#45).
src/trace_client.py(and its vendored tests) re-vendored at trace-client-python 0.5.0:TRACE_USAGE_REPORTINGset to anything but blank/true/on/yes/1, orDO_NOT_TRACKset to anything but blank/0/false/off/no, turns reporting off.enabledwas read withbool(...), so"enabled": "false"(or"off") kept reporting on. It is now read throughallows_reporting."usage_reporting": false(any value that is not a block) was replaced by the default block on startup, turning reporting back on and saving that. It is now read as the setting and the file is left alone.Tests
New tests cover quoted/misspelt
enabledvalues, on-strings, a quoted opt-out not being rewritten, and a non-blockusage_reportingvalue being an opt-out that is not rewritten.python -m unittest discover -s tests: 130 tests, all passing.🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson