Repository navigation
Disclose usage reporting: README, environment opt-out, notice link - #27
Merged
Merged
Conversation
Re-vendor trace-client-python 0.2.0 so TRACE_USAGE_REPORTING=off and DO_NOT_TRACK=1 turn reporting off ahead of settings.json, extend the first-run notice with the details link and the environment opt-out, and promote the README section to a top-level "Usage reporting" that lists what is sent and every way to opt out. Co-Authored-By: Claude Opus 5 (1M context) <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.
Usage reporting was wired into Patchwork in #26 with a first-run notice and a README subsection, but no single-step way out that works across every trace-reporting program. This PR completes the disclosure without changing what is reported: the vendored trace client is updated to 0.2.0, which honours the
TRACE_USAGE_REPORTING=offandDO_NOT_TRACK=1environment variables ahead ofsettings.json; the first-run notice now carries the details link and the environment opt-out; and the README gains a top-level## Usage reportingsection that lists the real event and every opt-out. The endpoint, the event name and the runtime-key model (PATCHWORK_USAGE_REPORTING_KEY) are untouched. Branched frommainas it stands today (0c3c548).trace_client.py,tests/test_trace_client.py: re-vendored from trace-client-python 0.2.0 (only the vendoring note and one import path differ). The constructor now checks the environment first and exposesdisabled_reason.usage_reporting.py: the notice names the details link andTRACE_USAGE_REPORTING=off; a newfirstRunNotice()returnsUsage reporting is off (environment).instead when the environment has already opted out.buildClientalready constructs throughTraceClientwhenever the settings could be read, so the environment variables win overenabled; its docstring says so.tests/test_usage_reporting.py: the two environment variables are scrubbed in each test'ssetUp; new tests assert thatDO_NOT_TRACK=1andTRACE_USAGE_REPORTING=offsend nothing to a loopback stub even withenabled: trueand a key present, thatdisabled_reasonisenvironment, that the notice carries the link and the env-var opt-out, and that a first run under the environment opt-out logs the off line while still writing the default block. The old notice assertion was updated.README.md: the### Usage reportingsubsection under Getting Started is replaced by a top-level## Usage reportingsection before the license, per the shared wording (what is sent, what is not, every opt-out including the unset key, details link); the feature bullet links to it.Verified with
python3 -m unittest discover -s tests(Python 3.8):Ran 69 tests ... OK(59 before this change). The repository has no CI workflow.🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson