Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -1795,8 +1795,9 @@ every entry for that id.
**Undo and redo** are drivable: a sparse `UndoRedo{UPDATE, undo: true}`
(`08 01 28 01`) reverses the last grid edit and `redo: true` (`08 01 30 01`)
reapplies it. Measured 2026-09-03 on CorOS 4.0.1 by preset read-back, and by a
contributor on 4.1.0 (PR #42, where `undo()` and `redo()` land). `UndoRedo` also
arrives after every accepted grid edit, which makes it an acceptance signal.
contributor on 4.1.0. `undo()` and `redo()` send these messages. `UndoRedo`
also arrives after every accepted grid edit, which makes it an acceptance
signal.

## 12. What the unit announces, and when

Expand Down Expand Up @@ -2104,7 +2105,6 @@ wire, with no independent read-back.
| connect handshake | `ResetCommsBuffers` + `Version` UPDATE + `ModelRepo` READ + `Connection` + subscribe READs | read-back | the connect gate; state pushes flow only after it |
| version read | `Version{action: READ}` | read-back | two messages come back; `version()` accepts only one carrying `device_serial_number` or `app_fw_version` (section 4.4) |
| `set_device_name` | `Version{UPDATE, custom_name}` | read-back + on-unit | sparse echo, read-back, and restoration confirmed on CorOS 4.0.1 and 4.1.0 |
| `undo` / `redo` | `UndoRedo{UPDATE, undo}` / `{UPDATE, redo}` | read-back + on-unit | a bypass edit was reversed and reapplied on disposable preset copies; empty-history behaviour is unknown |
| `inhibited_modules` | `CompilerInhibitedModules{READ}` | read-back | explicit false/false reply on CorOS 4.0.1 and 4.1.0; true semantics are schema-derived, not yet observed |
| `create_local_backup` | `LocalBackup{CREATE}` then `LocalBackup{UPDATE, backup_json}` pushes, the last with `is_last_chunk` | captured only | section 10.5. `can_apply_backup` never appeared, so the refusal path is unverified |
| `recall_preset` / `read_preset` | `SetlistPosition{UPDATE, folder_key, position, is_factory, request_id}` then a `RecallPreset` push | read-back | the push echoes the recall's `request_id` |
Expand Down Expand Up @@ -2168,7 +2168,7 @@ wire, with no independent read-back.
| `io_settings` / `set_input_level` / `set_output_level` | `IOSettings{READ}` / `{UPDATE, settings{in_port` or `out_port{port_id, level}}}` | read-back | also reports impedance, type, ground lift and `plugged` |
| `global_eq` / `set_global_eq_bypassed` | `GlobalEQ{READ}` / `{UPDATE, bypassed}` | read-back | five bands reported as 28 parameters |
| `mode` / `set_mode` | `Mode{READ}` / `{UPDATE, mode}` | read-back | a slot index; `available_modes` lists the configured slots |
| host undo / redo (`undo()` / `redo()` land in PR #42) | `UndoRedo{UPDATE, undo: true}` / `{redo: true}` | preset read-back | measured 2026-09-03 on CorOS 4.0.1 and by a contributor on 4.1.0 |
| `undo` / `redo` | `UndoRedo{UPDATE, undo: true}` / `{redo: true}` | preset read-back | measured 2026-09-03 on CorOS 4.0.1 and by a contributor on 4.1.0; a bypass edit was reversed and reapplied on disposable preset copies; empty-history behaviour is unknown |
| `preset_dirty` | `PresetDirty{READ}` | request_id echo | answers as `UPDATE` in 2 to 11 ms; `is_dirty` has no presence; pushed unsolicited only when the flag changes |
| `set_gig_view` | `ShowGigView{UPDATE, show}` | read-back + on-unit | `show` has no presence |
| `set_param(LaneInput(row), ...)` | `Grid{UPDATE, preset{chains{row, input_control{hash: 28000, params{index, param_values}}}}}` | read-back | `NOISE REDUCTION`, `BYPASS` and `INPUT GAIN`, per-scene included |
Expand Down
2 changes: 1 addition & 1 deletion pyquadcortex/protocol/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class QuadCortex41(QuadCortex):
not reproduced it, which is what ``Evidence.CONTRIBUTED`` says here.
``create_local_backup`` has its own dated 4.1.0 capture. The contributed
device-name round trip also verified ``set_device_name``; both are VERIFIED.
other inherited operations refuse under ``Support.VERIFIED`` and run with
Other inherited operations refuse under ``Support.VERIFIED`` and run with
a warning under ``Support.EXPERIMENTAL``. The snapshot is deliberately absent:
binding the 4.0.1 constants would hand a 4.1 user names their unit does not
use.
Expand Down
4 changes: 2 additions & 2 deletions tests/hardware/test_settings_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def test_inhibited_modules_is_a_complete_read_only_snapshot(qc):
Presence matters here: protobuf also returns false when an optional field was
never sent, and reporting that default as device state would be a guess.
"""
# Read twice because a first state READ can be dropped; both successful
# replies must carry explicit fields rather than protobuf defaults.
# Read twice so a second reply must also carry explicit fields rather than
# protobuf defaults. A dropped first READ raises; there is no retry here.
for _ in range(2):
state = qc.inhibited_modules()
assert state.action == pa.MessageAction.UPDATE
Expand Down
3 changes: 1 addition & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ def __init__(self, canned=None):
def send(self, msg):
self.sent.append(msg)

def request(self, msg, timeout=5.0, match=None):
def request(self, msg, timeout=5.0):
self.sent.append(msg)
self.last_match = match
return self.canned.get(type(msg).__name__)

def next_request_id(self):
Expand Down
4 changes: 1 addition & 3 deletions tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,12 @@ def __init__(self, canned, trailing=()):
def send(self, msg):
self.sent.append(msg)

def request(self, msg, timeout=5.0, match=None):
def request(self, msg, timeout=5.0):
self.sent.append(msg)
reply = self.canned[type(msg).__name__]
for message in [reply] + self.trailing:
for listener in list(self.listeners):
listener(message) # listeners see a reply first (ADR-0009)
if match is not None and not match(reply):
raise TimeoutError(f"canned {type(reply).__name__} did not match")
return reply

def await_broadcast(self, expected_class, trigger, timeout=5.0, match=None):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_hardware_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@

# -- the preset library: writes that would touch the owner's own presets ---
# The scratch_preset fixture is what these would be built on - it saves a
# copy into a free User slot and deletes it again - but no test uses it yet.
# copy into a free User slot and deletes it again. The undo/redo test uses it.
"save_current_preset": "the undo/redo test's scratch_preset fixture confirms a save into a free User slot, but the test verifies undo/redo rather than the save wire shape",
"recall_preset": "no hardware test yet; a recall discards the loaded preset's unsaved edits, so it needs scratch_preset around it",
"delete_preset": "the undo/redo test's scratch_preset teardown deletes its copy and confirms absence; no test isolates the delete wire shape itself",
"delete_preset": "the undo/redo test's scratch_preset teardown deletes its copy, but that delete is deliberately unconfirmed and a teardown asserts nothing",
"copy_preset": "no hardware test yet; it writes into a second setlist, so a failed run leaves a stray preset in the owner's Directory",
"move_preset": "no hardware test yet; it rearranges the slots a player has laid out for a gig, which a restore cannot make invisible mid-run",
"read_preset": "the undo/redo test reads its scratch copy to choose an edit, but verifies the history result rather than the read operation itself",
"find_preset": "no hardware test yet; it needs a name that exists on the unit, which the loaded preset supplies - just not written",
"wait_for_listing": "scratch_preset teardown uses it to confirm deletion; no test independently verifies its polling and stability contract",
"wait_for_listing": "no hardware test yet; it is the polling wrapper round list_presets and says nothing until a write changes a listing",
"create_setlist": "no hardware test yet; it adds a folder to the owner's Directory that a failed run would leave behind",
"delete_setlist": "no hardware test yet; it deletes a folder and everything in it, which is the one preset-library mistake nothing can undo",
"duplicate_setlist": "no hardware test yet; it copies a whole setlist preset by preset, so a failed run leaves a partial folder behind",
Expand Down
4 changes: 1 addition & 3 deletions tests/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def await_broadcast(self, message_class, trigger, timeout=5.0, match=None):
self.push(reply)
return reply

def request(self, message, timeout=5.0, match=None):
def request(self, message, timeout=5.0):
name = type(message).__name__
self.sent.append(message)
self.reads[name] += 1
Expand All @@ -126,8 +126,6 @@ def request(self, message, timeout=5.0, match=None):
if callable(reply):
reply = reply()
self.push(reply) # every listener sees it first...
if match is not None and not match(reply):
raise TimeoutError(f"the canned {name} did not satisfy the waiter")
return reply # ...and only then does the caller wake

# -- the unit's side ------------------------------------------------------
Expand Down
Loading