Repository navigation
fix: keep usage reporting off once it is turned off - #78
Merged
Merged
Conversation
usage.reporting.enabled / USAGE_REPORTING_ENABLED turned reporting off only for "false": off, no, 0, a blank value or a typo all left it on. It is now read through the trace client's allowsReporting helper and fails closed: only true/on/yes/1 keeps reporting on. docker-compose.yml passes a blank USAGE_REPORTING_ENABLED through rather than replacing it with true. Re-vendors trace-client-java 0.8.0 (TraceClient + its tests), whose TRACE_USAGE_REPORTING / DO_NOT_TRACK checks fail closed too. Tests that pinned the old behaviour are updated; docs and CHANGELOG updated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2 of 3 tasks
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. In gh-backup the program's own switch was fail-open, and that is fixed here along with the vendored client.
usage.reporting.enabled/USAGE_REPORTING_ENABLEDwas compared with!"false".equalsIgnoreCase(...), so onlyfalseturned reporting off:off,no,0, a blank value or a typo left it on (andCOMMANDS.mddocumented that). It is now read throughTraceClient.allowsReporting: onlytrue/on/yes/1(any case) keeps reporting on, anything else turns it off.docker-compose.yml:${USAGE_REPORTING_ENABLED:-true}replaced an explicit blank value withtrue; it is now${USAGE_REPORTING_ENABLED-true}.DockerComposeEnvironmentTestaccepts both forms.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.TraceClient.javaandTraceClientTest.javaare copied unmodified apart from the package line.blankEnabledValueMeansOn...,onlyFalseTurnsReportingOff...) are rewritten to the fail-closed rules; new environment tests coverTRACE_USAGE_REPORTING/DO_NOT_TRACKvalues and thatTRACE_USAGE_REPORTING=ondoes not override the program's own off..env.example,docker-compose.ymland CHANGELOG (Fixed) updated.Tests
mvn test: 300 tests, 0 failures, 0 errors, 1 skipped (pre-existing skip).🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson