DEV Community

咻咻咻
咻咻咻

Posted on

Fail closed on lock, share, and export: screen-lock idle, deep-link ACL, and session-keyed actuation logs in a beat-driven loop

When narrative content drives a physical actuator, three paths look harmless until they are not: the OS locks the screen, a user pastes a story URL to a friend, and a "download my data" job has to decide which tables to include. Each needs a default that fails closed — toward idle, toward no motor grant, toward a complete session package.

on screen_lock(kind):             # lock button, auto-lock, sleep
    ramp_to(IDLE, at=next_beat_boundary)
    armed = false
    on unlock():
        # do NOT auto-resume; wait for user to re-enter the story
        await user_resume(); await next_named_beat(); arm()

on share_story_link(url, recipient):
    grant = { read_narrative: true, open_own_session: true }
    # never: grant.motor_authority = true
    motor_authority requires explicit grant in a live session

on export_my_data(user_id, session_ids):
    include(story_text[session_ids])
    include(choices[session_ids])
    include(actuation_log[session_ids])   # same session key; portability ≠ deletion
    inventory_to_user(what_was_packaged)
Enter fullscreen mode Exit fullscreen mode

The share rule is the one that slips in most easily, because "send this story to a friend" is a reasonable product goal. Sending the story is fine; sending motor authority inside the same URL is not something a deep link gets to decide.

The export rule is mostly a data-model decision: if actuation logs are keyed by the same session ID as story text, including them in a portability zip is trivial. If they live only in a separate telemetry pipeline the export job never sees, "download my data" quietly becomes chat-only.

Buyers can test all three without code: lock the phone mid-session and see whether unlocking restarts the device, paste a story link to another account and see whether motors become controllable, and ask the brand what an export package contains. 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)