Skip to content

State board incompatibility plainly; stop leaking a plist per test run - #21

Merged
Krypt0ph0ne merged 3 commits into
mainfrom
docs/hardware-compatibility-and-test-hygiene
Aug 3, 2026
Merged

State board incompatibility plainly; stop leaking a plist per test run#21
Krypt0ph0ne merged 3 commits into
mainfrom
docs/hardware-compatibility-and-test-hygiene

Conversation

@Krypt0ph0ne

Copy link
Copy Markdown
Owner

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:

  • A different control count cannot work. More or fewer keys, no encoder, or a second encoder is not a degraded experience — ACTION_CONTROL_COUNT (9) and LED_COUNT (6) are compile-time constants in the firmware that the Raw HID wire format and the app's control indices both depend on.
  • A matching layout is still not expected to work. Same key and encoder count says nothing about controller, pin assignment, LED order, or SW2 wiring. If another board happens to match, that is luck, not compatibility.
  • Porting is the real path for other hardware, and it is development work this project cannot verify for anyone.

Stop leaking a preference file per test run

Every test that needs isolated defaults creates a UUID-named UserDefaults suite and cleans up with removePersistentDomain(forName:). That empties the domain, but cfprefsd keeps the file — so each run leaves one empty ~/Library/Preferences/<suite>.plist behind, 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 test run 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

Krypt0ph0ne and others added 3 commits August 3, 2026 12:56
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>
@Krypt0ph0ne
Krypt0ph0ne merged commit bdef55f into main Aug 3, 2026
1 check passed
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