Verify macOS idle and lock signals before Work reminder routing #100

Open
opened 2026-09-29 01:10:24 +00:00 by aiko · 0 comments
Owner

Parent

aiko/denpa#98 and #99.

Why this is separate

The first routing slice treats only a fresh Windows OS activity report as active. A connected Work MacBook without a verified OS signal remains connected/unknown, not active. Do not promote a socket connection or a failed probe to "active", and do not infer a sitting or seam (denpatou ADR-0014). Personal and Work installs remain separate; this ticket does not bridge them.

Investigation / delivery

On the supported work MacBook, prototype a Tauri-native idle probe using Apple's Core Graphics CGEventSource.secondsSinceLastEventType for kCGAnyInputEventType in the combined session state. Determine a reliable lock/switch/sleep signal before reporting unlocked activity: CGSessionCopyCurrentDictionary's on-console key is not itself an unlock guarantee; do not silently depend on undocumented lock keys. Verify permissions/sandbox packaging and fail unknown when a signal is absent. Then add macOS reports through the existing authenticated expiring desktop-presence protocol. Linux is a separate environment-specific follow-up (logind hints are not universally trustworthy).

Primary sources: https://developer.apple.com/documentation/coregraphics/cgeventsource/secondssincelasteventtype(_:eventtype:), https://developer.apple.com/documentation/coregraphics/cgsessioncopycurrentdictionary(), https://developer.apple.com/documentation/appkit/nsworkspace/sessiondidresignactivenotification, https://v2.tauri.app/start/prerequisites/ .

Acceptance

  • On an actual Work MacBook, idle/active/lock/sleep/fast-user-switch transitions are recorded; unsupported/error states report unknown, not active.
  • The already-enrolled authenticated Mac can win reminder routing only when a fresh supported active signal is present; Android/Windows behavior is unchanged.
  • Presence never opens/closes a sitting or declares a seam; no Personal/Work state or credential sharing is introduced.
  • Tests cover stale signals, reconnect, and capability gating; native Mac evidence documents OS version and permission state.

Blocked by

Work MacBook available for native verification; #99 desktop-presence contract and #65 Windows/connected-Android routing must be integrated first.

## Parent [aiko/denpa#98](https://git.aiko.works/aiko/denpa/issues/98) and [#99](https://git.aiko.works/aiko/denpa/issues/99). ## Why this is separate The first routing slice treats only a fresh Windows OS activity report as active. A connected Work MacBook without a verified OS signal remains connected/unknown, not active. Do not promote a socket connection or a failed probe to "active", and do not infer a sitting or seam (denpatou ADR-0014). Personal and Work installs remain separate; this ticket does not bridge them. ## Investigation / delivery On the supported work MacBook, prototype a Tauri-native idle probe using Apple's Core Graphics `CGEventSource.secondsSinceLastEventType` for `kCGAnyInputEventType` in the combined session state. Determine a reliable lock/switch/sleep signal before reporting unlocked activity: `CGSessionCopyCurrentDictionary`'s on-console key is not itself an unlock guarantee; do not silently depend on undocumented lock keys. Verify permissions/sandbox packaging and fail unknown when a signal is absent. Then add macOS reports through the existing authenticated expiring desktop-presence protocol. Linux is a separate environment-specific follow-up (logind hints are not universally trustworthy). Primary sources: https://developer.apple.com/documentation/coregraphics/cgeventsource/secondssincelasteventtype(_:eventtype:), https://developer.apple.com/documentation/coregraphics/cgsessioncopycurrentdictionary(), https://developer.apple.com/documentation/appkit/nsworkspace/sessiondidresignactivenotification, https://v2.tauri.app/start/prerequisites/ . ## Acceptance - [ ] On an actual Work MacBook, idle/active/lock/sleep/fast-user-switch transitions are recorded; unsupported/error states report unknown, not active. - [ ] The already-enrolled authenticated Mac can win reminder routing only when a fresh supported active signal is present; Android/Windows behavior is unchanged. - [ ] Presence never opens/closes a sitting or declares a seam; no Personal/Work state or credential sharing is introduced. - [ ] Tests cover stale signals, reconnect, and capability gating; native Mac evidence documents OS version and permission state. ## Blocked by Work MacBook available for native verification; #99 desktop-presence contract and #65 Windows/connected-Android routing must be integrated first.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiko/denpa#100
No description provided.