Safety monitor for fault latching and fail-fast process termination.
CuSafetyMon is designed for safety-critical deployments where "keep running"
is less important than deterministic fault containment.
Behavior:
- Maintains a CopperList heartbeat (
process_copperlist) and exits if no progress is observed withincopperlist_deadline_ms. - Consumes the runtime execution probe to report the last known
(component_id, step, culistid)when a lock is detected. - Installs a panic hook and turns panics into explicit process exit codes.
- Latches runtime errors (
process_error) as shutdown faults with their own exit code. Theprocess_errorindex is a monitored component index intoCuMonitoringMetadata::components().
Config (monitor config map keys):
copperlist_deadline_ms(u64, default: 1000)watchdog_period_ms(u64, default:max(deadline/4, 10))exit_code_shutdown(i32, default: 70)exit_code_lock(i32, default: 71)exit_code_panic(i32, default: 72)
Implementation is split by target profile:
std_impl: full watchdog/panic/exit behavior.nostd_impl: compile-only placeholder (behavior intentionally deferred).