This repository was archived by the owner on Nov 20, 2026. It is now read-only.
Repository navigation
fix: count a near-miss usage-reporting opt-out as off - #73
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
An opt-out written in
settings.jsonunder another spelling is now counted as off:usage-reporting,usageReporting,UsageReporting(any key that normalises to "usagereport") holding a value, or anenabled-like switch, that is not clearly on;enable/Enabledswitch that is not clearly on, or adisabledswitch that is on.On a first run over such a file,
"usage_reporting": {"enabled": false}is written next to the operator's block (instead of the default block withenabled: true) and an "off" notice (FIRST_RUN_NOTICE_OFF_BY_SETTINGS) is printed instead of the "on" one. AhasNearMissOptOuthelper (a port of the one in Dans-Plugins/Medieval-Roleplay-Engine#418) does the detection through the vendored client'sallows_reporting.Why
A real-server repro showed that an opt-out written under another spelling was not recognised: it was treated as missing, the default block was written with reporting on, and the program reported. Reference fix: Dans-Plugins/Medieval-Roleplay-Engine#418
Tests
New tests cover nine near-miss opt-outs (each builds a disabled client and shows no "on" notice), five near-miss spellings that say on (each still enabled), and a first run over a near-miss opt-out (real switch written off, operator's block kept, off notice). README updated.
python -m unittest discover -s tests: 263 tests, OK.🤖 Generated with Claude Code
https://claude.ai/code/session_01LYNeupL3KtraCJoZMADVQE
drafted by Claude on behalf of Daniel Stephenson