Package 

Class CrashGuard


  • 
    public final class CrashGuard
    
                        

    Layer 4 crash marker + per-model breaker, state in the existing zerogpu prefs. A phase is written before every dangerous step (download/load/sample) and cleared on graceful shutdown; a phase that survives to the next boot means the process died mid-step — sdk.crash_detected — and repeated deaths during one model's risky phases blocklist that model for 24 h so a crash loop can't take the host app down again and again.

    All transitions are pure functions over CrashGuardState (unit-testable); this class is only the SharedPreferences shell.