[OneDev #34] axon: validate on: field in profile YAML at load time #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from OneDev issue #34 (id 35557)
Original project: internal-joseph
Original state: Open
Original submitterId: 5
Original submitDate: 2026-05-05T19:19:45.421+00:00
Original lastActivity: {'date': '2026-05-05T19:19:45.421+00:00', 'description': 'opened', 'userId': 5}
Original fields:
Issue
Mapping.onis loaded as a free-form string. If the user writeson: prss(typo),Profile.mappings_for()filters it out silently because it checksm.on == "press"andm.on == "release"— neither matches. The mapping is loaded successfully but never fires, with no error message.Fix
In
axon/profile.py:load_profile(), after parsingm.get("on", "press"), validate the value is one of{"press", "release", "any"}and raiseValueError(f"Invalid on: value {on!r} for trigger {trigger!r}")._parse_actionalready raises on unknown action types — same pattern.Why
Cuts a confusing class of "I configured G7 but it doesn't fire" debug sessions.
Related
axon/profile.py:load_profileinternal-joseph/docs/2026-05-05-inputd-core.md