fix: edit ops second review findings

- A group's sunSensor and a shade's flags are refused by name: the routes
  don't set them.
- setPaired needs paired, and without a shade id it is a bad request.
- groupOptions' payload is parsed in ProtoEdits (parseReadPayload).
- The assembler's mutex is static, so creating it can't fail.
- protoIsReadOp and protoIsShadeOp are gone; the tests use protoOpKind.
- Native tests for missing(), offeredRemoteAddress and the edit ops
  against the TYPE table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-24 18:29:34 +02:00
parent 8fa087aa89
commit 970256e7f6
13 changed files with 107 additions and 34 deletions

View file

@ -19,7 +19,9 @@ bool protoEditType(uint8_t type, model_edit_type_t &out);
// a bad request reply. As with every op, only what was sent is in it.
const char *expandEditPayload(model_edit_type_t type, JsonObjectConst d, JsonDocument &doc);
// getNextRoom, getNextShade, getNextGroup and groupOptions: answered by
// loop() from the shade model.
bool protoIsReadOp(uint8_t type);
// A read op's payload (getNextRoom, getNextShade, getNextGroup and
// groupOptions, answered by loop() from the shade model): groupOptions' group,
// left 0 for the others. nullptr when it is good; otherwise what is wrong
// with it.
const char *parseReadPayload(uint8_t type, JsonObjectConst d, uint8_t &groupId);
#endif