DEV Community

咻咻咻
咻咻咻

Posted on

Fail closed on Screen Distance, Sound Recognition, and storage-full warnings

When narrative content drives a physical actuator, three interrupt paths look like "just restore state" until they are not: a Screen Distance / "Move iPhone Farther Away" / Screen Time eye-health viewing-distance prompt mid-session, a Sound Recognition alert for a siren / smoke alarm / doorbell / appliance / baby crying, and an "iPhone Storage Full" / "Not Enough Storage" / cannot-install-or-record storage sheet. Each needs a default that fails closed �ü” toward idle, toward re-arm only after a named beat, toward interrupt-clear �‰  motor authority.

on screen_distance_or_move_farther_away_or_eye_health_prompt_opened():
    ramp_to(IDLE, at=next_beat_boundary)
    armed = false
    on prompt_dismissed_or_phone_moved_farther_or_reminder_turned_off():
        # eye-health UI gone �‰  motor envelope restored
        await user_resume(); await next_named_beat(); arm()

on sound_recognition_alert_opened():
    ramp_to(IDLE, at=next_beat_boundary)
    armed = false
    on banner_dismissed_or_sound_recognition_turned_off():
        # accessibility alert UI cleared �‰  motor authority
        await user_resume(); await next_named_beat(); arm()

on storage_full_or_not_enough_storage_or_cannot_record_sheet_opened():
    ramp_to(IDLE, at=next_beat_boundary)
    armed = false
    on warning_dismissed_or_space_freed_or_continued_anyway():
        # storage UI gone �‰  previous intensity restored
        await user_resume(); await next_named_beat(); arm()
Enter fullscreen mode Exit fullscreen mode

The Screen Distance rule is easy to mix up with Accessibility Zoom, Magnifier, or VoiceOver, a Guided Access session or a Screen Time app limit or Downtime, a headphone-safety or volume-limit sheet, and a Notification Center pull-down. Zoom and VoiceOver are visual or spoken accessibility tools. Guided Access and Screen Time limits are restriction surfaces. Headphone safety is a hearing-volume gate. Notification Center is a shade. Screen Distance is an eye-health viewing-distance reminder. Dismissing the prompt or moving the phone farther clears that surface; it must not restore motor authority.

The Sound Recognition rule sits next to �ü” but is not �ü” a Wireless Emergency Alert or other government broadcast, a user-scheduled alarm or calendar notice, an ordinary incoming voice or video call, Emergency SOS or Crash Detection, or a Notification Center pull-down. A WEA is a carrier or government broadcast. An alarm is user-scheduled. A call is regular telephony. Emergency SOS is the phone's own emergency-calling flow. Sound Recognition is an on-device microphone classification alert. Dismissing the banner only clears that alert; it must not restore motor authority.

The storage-full rule is an OS storage-pressure dialog, not an OS update or restart prompt, not a controlling-app update, not a firmware update waiting for idle, not a low-battery step-down, and not Low Power Mode turning on. An OS-update prompt is a restart or install sheet. An app update is a store or binary refresh. Firmware-idle waits for a quiet moment to flash. Low-battery step-down and Low Power Mode are power-policy changes. A storage-full sheet is a disk-pressure warning. Dismissing it or freeing space only clears that warning; it must not restore motor authority.

Buyers can test all three without code: trigger a Screen Distance or "move farther away" prompt mid-session and see whether dismissing it or moving the phone farther restarts intensity; trigger a Sound Recognition alert then dismiss the banner; and trigger a storage-full or not-enough-storage warning then dismiss it or free space. The acceptance question is the same in each case: clearing the eye-health, sound-classification, or storage UI must not put motor authority back on. These map to questions like "how do AI stories control physical devices" and "Lovense alternative with AI stories."

This is the model CRAVE AI uses for story-controlled play on official devices: AI story-controlled vibrator. Principle write-up: narrative-to-device sync. Devices: AI sex toys.

Disclosure: I work on CRAVE AI. Adults-only product; no explicit content here.

Top comments (0)