State board incompatibility plainly; stop leaking a plist per test run - #21
Merged
Merged
Conversation
Each UUID-named test suite left an empty ~/Library/Preferences/<suite>.plist behind, because removePersistentDomain(forName:) empties a domain but cfprefsd keeps the file. Over the project's history this accumulated 379 stray files in the developer's Preferences directory. Route the eight cleanup sites through a helper that also drops the suite and unlinks the plist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The section warned that lookalike pads "can" differ, which reads as a caution about a low-probability case. The real position is stronger: differing control counts cannot work at all, since the control count, pin map, and LED chain are compile-time constants; and matching layouts are not expected to be wired identically either. Also name porting as the actual path for other hardware, so readers do not look for a configuration option that does not exist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…bility-and-test-hygiene
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.
Two unrelated cleanups.
Say plainly that other boards are unsupported
The "Supported hardware" section warned that lookalike pads "can" contain different controllers or pinouts. That reads as a caution about an unlikely case. The maintainer's actual position is stronger, so the README now says it:
ACTION_CONTROL_COUNT(9) andLED_COUNT(6) are compile-time constants in the firmware that the Raw HID wire format and the app's control indices both depend on.Stop leaking a preference file per test run
Every test that needs isolated defaults creates a UUID-named
UserDefaultssuite and cleans up withremovePersistentDomain(forName:). That empties the domain, butcfprefsdkeeps the file — so each run leaves one empty~/Library/Preferences/<suite>.plistbehind, forever. There were 379 of them on the maintainer's machine.The eight cleanup sites now go through a helper that also drops the suite and unlinks the plist. Verified: a full
swift testrun adds zero new files where it previously added one per suite.Verified locally: 116 app tests, 1 hardware test skipped, 0 failures.
🤖 Generated with Claude Code