Skip to content

fix: keep usage reporting off once it is turned off - #30

Merged
dmccoystephenson merged 1 commit into
mainfrom
fix/opt-out-fails-closed
Nov 19, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
fix/opt-out-fails-closed

Conversation

@dmccoystephenson

@dmccoystephenson dmccoystephenson commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

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_REPORTING set to anything but blank/true/on/yes/1, or DO_NOT_TRACK set to anything but blank/0/false/off/no, turns reporting off.
  • Fail-open paths fixed in Collide itself:
    • enabled was read with bool(...), so "enabled": "false" (or "off") kept reporting on. It is now read through allows_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.
  • README documents the fail-closed values.

Tests

New tests cover quoted/misspelt enabled values, on-strings, a quoted opt-out not being rewritten, and a non-block usage_reporting value 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

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>
@dmccoystephenson
dmccoystephenson merged commit 264b982 into main Nov 19, 2026
2 checks passed
@dmccoystephenson
dmccoystephenson deleted the fix/opt-out-fails-closed branch November 19, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant