Repository navigation
fix: count a near-miss usage-reporting opt-out as off - #172
Merged
Merged
Conversation
usage_reporting.disabled=true, usage_reporting.enable=false, usage-reporting=false and other spellings next to the default usage_reporting.enabled=true were ignored and reporting stayed on. Each now counts as off. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LYNeupL3KtraCJoZMADVQE
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.
What
hasNearMissOptOutis added toLocalUsageReportingService: a line inusage-reporting.propertiesother thanusage_reporting.enablednow counts as off whenusage-reporting.enabled,usageReporting.Enabled,usage_reporting.enable, bareenabled, ...) and its value is not clearly on;usage_reporting.disabled,usage_reporting.disable, ...) and its value is on;usage-reporting=false,usageReporting=off) that is not clearly on.Why
A real-server repro of a Bukkit plugin showed that an opt-out written under another spelling was not recognised and reporting stayed on. Interakt already read a missing
usage_reporting.enabledas off and never rewrites an existing file, so a renamed switch on its own was already off; but such a line next to the defaultusage_reporting.enabled=true(for exampleusage_reporting.disabled=trueadded below it) was ignored and reporting stayed on. Reference fix: Dans-Plugins/Medieval-Roleplay-Engine#418Tests
Three tests were added to
LocalUsageReportingServiceTest(near-miss opt-outs are off, near-miss names that say on stay on, a near-miss opt-out is not rewritten).mvn test: 270 tests, 0 failures, 0 errors. README updated.🤖 Generated with Claude Code
https://claude.ai/code/session_01LYNeupL3KtraCJoZMADVQE
drafted by Claude on behalf of Daniel Stephenson