Remove command origin and the manual lockout #116

Merged
rob merged 2 commits from refactor/remove-origin-lockout into main 2026-10-13 17:34:36 +00:00
Collaborator

The manual lockout hasn't proved useful, so origin and the lockout go entirely: the Origin enum, Endpoint lockout state and commandAllowed, the origin parameter on request/setOn, spec sections 6.2 and 9.1 (later 9.x sections renumbered, with code references), and the CLAUDE.md invariant.

Breaking wire change. The origin byte is removed from every command, SYS_MODE, ALARM_ACK, STATE_* and the worked examples. The lockout-remaining byte is removed from the state frames. No bytes are reserved; later fields shift down and DLCs shrink. This is a deliberate one-off exception to the unversioned-format rule, approved by the owner. Every node must be reflashed and the Home Assistant integration updated together. Shared vectors are regenerated.

Not removed: the refuse-and-retry paths in the bathroom and extractor policies. Endpoints no longer refuse for lockout, so those retries are now only reachable via WaterHeating refusing while cooling. Worth a follow-up.

Tested: pio test -e native 549 cases pass (572 before; 23 lockout and origin cases removed, test_lockout deleted). pio run builds all five nodes and -e host_sim builds.

The manual lockout hasn't proved useful, so origin and the lockout go entirely: the `Origin` enum, `Endpoint` lockout state and `commandAllowed`, the origin parameter on `request`/`setOn`, spec sections 6.2 and 9.1 (later 9.x sections renumbered, with code references), and the CLAUDE.md invariant. **Breaking wire change.** The origin byte is removed from every command, `SYS_MODE`, `ALARM_ACK`, `STATE_*` and the worked examples. The lockout-remaining byte is removed from the state frames. No bytes are reserved; later fields shift down and DLCs shrink. This is a deliberate one-off exception to the unversioned-format rule, approved by the owner. Every node must be reflashed and the Home Assistant integration updated together. Shared vectors are regenerated. Not removed: the refuse-and-retry paths in the bathroom and extractor policies. Endpoints no longer refuse for lockout, so those retries are now only reachable via `WaterHeating` refusing while cooling. Worth a follow-up. Tested: `pio test -e native` 549 cases pass (572 before; 23 lockout and origin cases removed, `test_lockout` deleted). `pio run` builds all five nodes and `-e host_sim` builds.
Remove command origin and the manual lockout
All checks were successful
Build and test / build (pull_request) Successful in 1m31s
Build and test / release (pull_request) Has been skipped
003814668c
Claude left a comment

Two small things. Codec indices, DLCs, vectors, spec renumbering and section references all line up.

Two small things. Codec indices, DLCs, vectors, spec renumbering and section references all line up.
@ -18,3 +18,2 @@
CTRL_LOG("update", "begin: server " CTRL_IPV4_FORMAT ":%u, node type 0x%02X, limit %u s", CTRL_IPV4_ARGS(serverAddress),
static_cast<unsigned>(serverPort), static_cast<unsigned>(nodeType_), static_cast<unsigned>(updateTimeLimitMs / 1000));
CTRL_LOG("update", "begin: server " CTRL_IPV4_FORMAT ":%u, node type 0x%02X, limit %u s", CTRL_IPV4_ARGS(serverAddress), static_cast<unsigned>(serverPort),
Author
Collaborator

Unrelated clang-format reflow of two CTRL_LOG calls (here and near line 207). Revert; only the Spec section 9.2 comment change belongs in this PR.

Unrelated clang-format reflow of two CTRL_LOG calls (here and near line 207). Revert; only the `Spec section 9.2` comment change belongs in this PR.
@ -159,3 +156,3 @@
case can::Failsafe::Safe:
// Overrides the lockout, with no fade.
// No fade.
on_ = false;
Author
Collaborator

// No fade. just restates the code below it. Delete.

`// No fade.` just restates the code below it. Delete.
Revert stray reformat and drop a redundant comment
All checks were successful
Build and test / build (pull_request) Successful in 1m29s
Build and test / release (pull_request) Has been skipped
e169094d00
rob merged commit 1781f95810 into main 2026-10-13 17:34:36 +00:00
rob deleted branch refactor/remove-origin-lockout 2026-10-13 17:34:37 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rob/CampervanControlSystems!116
No description provided.