Spanda provides first-class kill switch support for emergency stops that bypass noncritical task queues, preempt AI tasks, stop actuators, and record audit events.
Examples:
examples/features/kill_switch.sd — declaration + on
kill_switch handlerexamples/security/remote_signed_kill_switch.sd
— remote_signed + identityexamples/hardware/capability_verification.sd
— traceability contextkill_switch EmergencyStop {
source: hardware.button.E_STOP;
priority: critical;
remote_signed;
action {
stop_all_actuators();
enter emergency_mode;
audit.record("kill_switch_activated");
}
}
Robot-scoped handler:
robot Rover {
behavior status() -> Bool {
return true;
}
on kill_switch EmergencyStop {
stop_all_actuators();
}
}
audit block is presentremote_signed and verified commands
(RunOptions.kill_switch_signature JSON at runtime)spanda verify reports an error when remote_signed is set without signed communication
policy (Phase 35)on kill_switch Name { } handlers run after activation--trigger-kill-switchspanda sim rover.sd --trigger-kill-switch EmergencyStop
# Remote-signed switches require a JSON signature payload at runtime (see spanda_security::SignedMessage)
spanda trace hardware rover.sd # shows kill switch in traceability matrix
health_policy can trigger kill switches on Unsafe--verification-json, kill-switch
severityemergency_stop actuator capability