mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 19:07:04 +01:00
Live on this host since 2026-09-11 but never committed. The wheel firmware decodes the shifter's hall sensor itself and this unit's top row rests at Y 180-193, below the ~195 engage threshold, so 1st/3rd often did not register. g29_shifter.bpf.c re-decodes those two gates from the raw X/Y bytes with hysteresis (engage >= 160, release <= 140) and ORs the bit in before hid-logitech parses the report; it never clears a bit, so the firmware's working gates cannot regress. fix_g29_shifter.sh builds, attaches and installs it persistently (udev-hid-bpf rule + a systemd safety-net unit pulled in on every re-enumeration); g29_shifter_capture.py records and grades raw captures per gate. Two files were over the 250-line cap: the test file is split at the record/CLI boundary with the report builders moved into a conftest fixture (the naming hook allows only test_*.py in tests/), and the grader's docstrings are tightened. No behaviour change to the installed fix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS8M5wk88nJTXxDWz61KKk
38 lines
1.9 KiB
JSON
38 lines
1.9 KiB
JSON
{
|
|
"intent": "Commit the G29 shifter HID-BPF fix that has been live on the host since 2026-09-11 but was never added to git, splitting its two over-cap files on the way.",
|
|
"scope": [
|
|
"linux_configuration/fixes/fix_g29_shifter.sh, g29_shifter.bpf.c, g29_shifter_capture.py, systemd/g29-shifter-bpf.service, systemd/99-g29-shifter-ensure.rules",
|
|
"linux_configuration/tests/test_g29_shifter_capture.py (split), test_g29_shifter_capture_cli.py (new), conftest.py (G29Reports fixture)",
|
|
"linux_configuration/docs/DOCS-g29-shifter.md",
|
|
"No behaviour change to the installed fix; the host attachment was not touched"
|
|
],
|
|
"changes": [
|
|
"Test file split at the record/CLI boundary (256 -> 164 + 107 lines); report builders moved into a conftest fixture class because the naming hook allows only test_*.py in tests/",
|
|
"g29_shifter_capture.py module docstring tightened (255 -> 252 -> under cap after ruff format)",
|
|
"DOCS-g29-shifter.md gains a cross-link to DOCS-g29-ffb.md"
|
|
],
|
|
"verification": [
|
|
{
|
|
"command": "python3 -m pytest -q linux_configuration/tests/test_g29_shifter_capture.py linux_configuration/tests/test_g29_shifter_capture_cli.py --cov=g29_shifter_capture --cov-branch",
|
|
"result": "pass",
|
|
"evidence": "29 passed; g29_shifter_capture.py 151 stmts, 52 branches, 100%"
|
|
},
|
|
{
|
|
"command": "linux_configuration/fixes/fix_g29_shifter.sh --status",
|
|
"result": "pass",
|
|
"evidence": "persistent: /etc/udev-hid-bpf/g29_shifter.bpf.o + rule; attached now: yes; safety net: enabled (host, 2026-09-14 after the new-lg4ff module reload)"
|
|
},
|
|
{
|
|
"command": "pre-commit run --files <all shifter files>",
|
|
"result": "pass",
|
|
"evidence": "all hooks Passed"
|
|
}
|
|
],
|
|
"risks": [
|
|
"None at runtime: the committed files are byte-identical in behaviour to what is installed"
|
|
],
|
|
"rollback": [
|
|
"fix_g29_shifter.sh --remove detaches the program; git revert restores the untracked state"
|
|
]
|
|
}
|