Skip to content

fix: count a near-miss usage-reporting opt-out as off - #172

Merged
dmccoystephenson merged 1 commit into
mainfrom
fix/usage-reporting-near-miss-opt-out
Nov 19, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
fix/usage-reporting-near-miss-opt-out

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

What

hasNearMissOptOut is added to LocalUsageReportingService: a line in usage-reporting.properties other than usage_reporting.enabled now counts as off when

  • its key spells "enabled" another way (usage-reporting.enabled, usageReporting.Enabled, usage_reporting.enable, bare enabled, ...) and its value is not clearly on;
  • its key spells "disabled" (usage_reporting.disabled, usage_reporting.disable, ...) and its value is on;
  • it gives "usage reporting" itself a value (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.enabled as off and never rewrites an existing file, so a renamed switch on its own was already off; but such a line next to the default usage_reporting.enabled=true (for example usage_reporting.disabled=true added below it) was ignored and reporting stayed on. Reference fix: Dans-Plugins/Medieval-Roleplay-Engine#418

Tests

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

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
@dmccoystephenson
dmccoystephenson merged commit da650f0 into main Nov 19, 2026
1 check passed
@dmccoystephenson
dmccoystephenson deleted the fix/usage-reporting-near-miss-opt-out branch November 19, 2026 14:52
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