Skip to content

docs: correct safety contract and document which component disarms#125

Merged
jimsynz merged 1 commit into
mainfrom
docs/safety-contract
May 29, 2026
Merged

docs: correct safety contract and document which component disarms#125
jimsynz merged 1 commit into
mainfrom
docs/safety-contract

Conversation

@jimsynz
Copy link
Copy Markdown
Contributor

@jimsynz jimsynz commented May 29, 2026

The docs described BB.Safety as a behaviour that actuators "must implement". It isn't one — BB.Safety is the arm/disarm API, and the disarm/1 callback is defined on the BB.Actuator (required), BB.Controller, and BB.Sensor behaviours.

Changes

  • AGENTS.md — corrected the Safety System key points and bottom-of-file summary; fixed the stale documentation/topics/safety.md path to understanding-safety.md.
  • documentation/topics/understanding-safety.md — added a "Which Component Registers and Disarms?" section stating the contract: whoever owns the hardware connection registers via BB.Safety.register/2 and implements disarm/1. Covers both driver shapes (standalone actuator vs controller + shared bus).
  • documentation/how-to/implement-safety-callbacks.md — the serial example showed actuator-side disarm with no caveat; clarified that this applies when the actuator owns the port, and that shared-bus drivers disarm at the controller.

Docs only; no code changes.

- `BB.Safety` is the arm/disarm API, not a behaviour; `disarm/1` is a callback on the `BB.Actuator`/`BB.Controller`/`BB.Sensor` behaviours

- add a "Which Component Registers and Disarms?" section stating the contract (whoever owns the hardware connection registers and disarms)

- clarify the serial-bus disarm pattern in the safety-callbacks how-to

- fix stale `topics/safety.md` path to `understanding-safety.md`
@jimsynz jimsynz merged commit ff38510 into main May 29, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant