Description
src/preemption/supervisor.rs has an event_rx field marked #[allow(dead_code)] — the supervisor struct exists but the real-time event processing pipeline is not wired. Per Principle III, preemption must happen within 10ms of a sovereignty trigger.
Requirements
- Wire
event_rx to receive sovereignty events from trigger detection
- On event: send SIGSTOP to all sandbox processes within 10ms
- Attempt checkpoint within 500ms
- If checkpoint fails, SIGKILL within 500ms and reschedule from last committed checkpoint
- Handle GPU kernel windows (200ms target for CUDA kernels)
- Measure and log actual preemption latency for each event
- Support thermal, battery, and memory pressure triggers in addition to keyboard/mouse
Success Criteria
Testing (Principle V)
- Run workload on real hardware, inject keyboard event, measure SIGSTOP latency
- Run GPU workload, inject event, measure kernel completion + SIGSTOP latency
- Rapid pause/resume cycling (10 events/second) → verify stability
- Thermal trigger simulation → verify preemption
- Battery disconnect → verify preemption
Description
src/preemption/supervisor.rshas anevent_rxfield marked#[allow(dead_code)]— the supervisor struct exists but the real-time event processing pipeline is not wired. Per Principle III, preemption must happen within 10ms of a sovereignty trigger.Requirements
event_rxto receive sovereignty events from trigger detectionSuccess Criteria
cargo testpassesTesting (Principle V)