An exit attempt remembered only the reducer generation. A gesture that
changes no state (a swipe at Ready) restarted the 30 s countdown, but when
the pending host call then failed, the 3 s retry replaced that timer.
The controller now counts every restart of the normal countdown (gesture,
state change, phone activity) in an activity epoch, captures it when an
attempt starts, and schedules no retry if it has moved. Bounded attempts,
late-success memory, exit-event finality and one host call at a time are
unchanged.
Not reviewed. 0.1.1 is not uploaded.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
CODY-016. The SDK pushes the launch source once, early. The Even adapter now
subscribes in its constructor, remembers the value and replays it to a
listener that subscribes later. appMenu still does not arm idle exit.
CODY-018. exitNow() returns whether the host confirmed. The adapter keeps at
most one shutdown call in flight (through the same queue as every other host
call), lets a repeat request wait on that call, and never calls the host
again after a confirmed exit, including one confirmed late. The controller
marks itself as gone only on confirmation or on a system_exit/abnormal_exit
event; otherwise it retries after 3 s, at most 4 attempts in a row, under the
same resting-screen and phone-grace guards, and starts again after activity.
CODY-017. README: one owner-reported locked-phone success; pocketed,
five-minute and ten-cycle runs unverified.
Tests: production-adapter tests with a stand-in host, including the default
30 s under a fake clock; a simulator scenario that performs the real exit
(development-only ?idleExit=fast). Not reviewed. 0.1.1 is not uploaded.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>