Skip to content

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

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

dmccoystephenson merged 2 commits into
mainfrom
fix/opt-out-fails-closed

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

A server operator reported usage reporting turning itself back on after being disabled. Two fail-open paths in Interakt's own settings handling are fixed here, along with the vendored client.

  • Unreadable settings file read as on: when usage-reporting.properties existed but could not be read, the error was logged and reporting kept its defaults - on. A file that cannot be read may say enabled=false, so it now turns reporting off (reason: <path> cannot be read) and is never rewritten.
  • Missing key read as on: Boolean.parseBoolean(getProperty(ENABLED_KEY, "true")) turned a file without an enabled line back on. The setting is now read through TraceClient.allowsReporting: only true/on/yes/1 keeps reporting on; false, off, blank, a typo or a missing line is off. On a first run, when there is no file yet, the default (on) still applies and is written as before.
  • Vendored client: trace-client-java 0.7.0 -> 0.8.0 (Make every opt-out fail closed (0.8.0) trace-client-java#51, not yet released), unmodified apart from the package line. TRACE_USAGE_REPORTING set to anything but blank or an on-value, DO_NOT_TRACK set to anything but blank or 0/false/off/no, or an unreadable environment, now turns reporting off. (The client's own test file is not vendored here, as before: this project runs JUnit 4.10.)
  • The off reason for the settings switch now reads usage_reporting.enabled is not true in <path>; the test that pinned the old wording is updated.
  • The browser build's BrowserMain already writes enabled=false before start; unchanged.
  • README describes the fail-closed rules.

Tests

  • mvn test: 267 tests, 0 failures, 0 errors, including new tests for off-values, a missing line, on-values and an unreadable settings file.

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

dmccoystephenson and others added 2 commits November 18, 2026 21:26
A settings file that existed but could not be read left usage reporting at
its defaults, i.e. on; it now turns reporting off and is left alone. A
settings file without a usage_reporting.enabled line also defaulted to on.
The setting is now read through the trace client's allowsReporting and
fails closed: only true/on/yes/1 keeps reporting on (the default still
applies on a first run, when there is no file yet).

Re-vendors trace-client-java 0.8.0, whose TRACE_USAGE_REPORTING /
DO_NOT_TRACK checks fail closed too. README updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The old link went to a repository visitors cannot open.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dmccoystephenson
dmccoystephenson merged commit e003d88 into main Nov 19, 2026
1 check 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