Patcher: disclaimer, every mod can be unticked, hot cue docs

- A disclaimer (mods and patcher developed with Claude Code, at your own
  risk) must be accepted by typing yes, or with --accept, before a build.
- Unticking a mod unticks what needs it instead of ticking it back, so
  code can be unticked; hotcuekeys needs cuecolours.
- beatjump starts unticked and is marked with its faults on a player.
- README: the hot cue keys (play, gate, set, delete, LEDs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Thiemo TizianiandClaude Opus 5.5 committed 2026-10-18 01:22:01 +02:00
1 parent cfa0e85854
commit bbe784aad2
3 files changed
+119 -16

No files matched your search

+32
View File
@@ -93,3 +93,35 @@ def test_boot_area_tampering_caught():
bad = upd.join([sections[0].blob, upd.encode_section(main.header, recs), sections[2].blob])
with pytest.raises(upd.UpdError, match='boot loader'):
upd.verify(bad, stock, stock.application)
MODS = [('code', '', True, ''), ('utility', '', True, ''), ('overview', '', True, ''),
('beatjump', '', True, ''), ('cuecolours', '', True, ''), ('hotcuekeys', '', True, '')]
def test_every_mod_can_be_unticked():
chosen = {m[0] for m in MODS}
cli._toggle(chosen, 'code', MODS)
assert 'code' not in chosen and 'utility' not in chosen # what needs it goes with it
cli._toggle(chosen, 'cuecolours', MODS)
assert 'cuecolours' not in chosen and 'hotcuekeys' not in chosen
cli._toggle(chosen, 'hotcuekeys', MODS)
assert {'hotcuekeys', 'cuecolours'} <= chosen # and ticking brings what it needs
cli._toggle(chosen, 'overview', MODS)
assert 'overview' not in chosen
def test_disclaimer_must_be_accepted(monkeypatch):
monkeypatch.setattr(cli.sys.stdin, 'isatty', lambda: True, raising=False)
assert 'Claude Code' in cli.DISCLAIMER
cli.confirm(False, ask=lambda _: 'yes')
cli.confirm(True, ask=lambda _: pytest.fail('asked although accepted'))
for answer in ('', 'no', 'q'):
with pytest.raises(SystemExit, match='not accepted'):
cli.confirm(False, ask=lambda _: answer)
def test_disclaimer_without_a_terminal(monkeypatch):
monkeypatch.setattr(cli.sys.stdin, 'isatty', lambda: False, raising=False)
with pytest.raises(SystemExit, match='--accept'):
cli.confirm(False)