This repository was archived by the owner on Nov 20, 2026. It is now read-only.
Repository navigation
fix: keep usage reporting off once it is turned off - #72
Merged
Merged
Conversation
Re-vendor trace-client-python 0.5.0 (every opt-out fails closed) and make patchwork's own switch fail closed too: - enabled is read with allows_reporting(), not bool(): "false"/"off" no longer report - "usage_reporting": false (not an object) is read as the switch and no longer overwritten with the default block (on) - a first run under TRACE_USAGE_REPORTING/DO_NOT_TRACK records enabled: false 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Usage reporting is made to stay off once it has been turned off, in the vendored client and in patchwork's own settings handling.
Changes
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. The vendored test suite is updated to match (the two package-layout tests, which readpyproject.tomland the package__init__, are left out because a single vendored module has neither).usage_reporting.py(each was pinned by a characterization test, now rewritten):enabledwas read withbool(), so"enabled": "false"or"off"reported. It is now read with the client'sallows_reporting()."usage_reporting": false(or any non-object) was overwritten with the default block, i.e. turned back on, and the on-notice shown again. It is now read as the switch itself and the file is left alone."enabled": true, so a later run without the variable reported without the on-notice ever having been shown. It now writes"enabled": false, and the notice says so.Tests
python -m unittest discover -s tests: 260 tests, OK.🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson