Repository navigation
fix: keep usage reporting off once it is turned off - #171
Merged
Merged
Conversation
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]>
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
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.
usage-reporting.propertiesexisted but could not be read, the error was logged and reporting kept its defaults - on. A file that cannot be read may sayenabled=false, so it now turns reporting off (reason:<path> cannot be read) and is never rewritten.Boolean.parseBoolean(getProperty(ENABLED_KEY, "true"))turned a file without anenabledline back on. The setting is now read throughTraceClient.allowsReporting: onlytrue/on/yes/1keeps 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.TRACE_USAGE_REPORTINGset to anything but blank or an on-value,DO_NOT_TRACKset to anything but blank or0/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.)usage_reporting.enabled is not true in <path>; the test that pinned the old wording is updated.BrowserMainalready writesenabled=falsebefore start; unchanged.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