docs: add KNOWN-ISSUES.md and rewrite PowerAssertion top doc

PowerAssertion file-level doc previously claimed Linux logind and
Windows SetThreadExecutionState implementations in present tense.
Both are no-ops; the macOS path compiles but is unverified on
Apple Silicon (RB-08). Rewrite top doc to state present vs
planned posture and reference KNOWN-ISSUES.md.

Surfaced as tracked limitations:
- KI-01: macOS App Nap guard pending Apple Silicon verification
- KI-02: Linux power assertion is a no-op
- KI-03: Windows power assertion is a no-op
- KI-04: magnotia-cloud-providers crate not user-exposed in v0.1
  (in-memory keystore needs OS keychain before any save-key UX)

README links to KNOWN-ISSUES.md from Status, Platform support
table, and Project documentation. Platform support table notes
adjusted per OS to reflect actual idle-inhibit posture.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
jars
2026-05-09 15:29:50 +01:00
parent a1f3f3f134
commit e5e12387e8
3 changed files with 74 additions and 12 deletions

View File

@@ -10,16 +10,25 @@
//! pin the process into a "latency-critical, user-initiated" state for
//! the duration of a live session or an LLM generation. The returned
//! activity object must be retained; dropping it ends the assertion.
//! Runtime verification on Apple Silicon against actual idle-throttling
//! is still pending. See `KNOWN-ISSUES.md` (KI-01).
//!
//! On Linux we inhibit systemd-logind / GNOME session idle via
//! org.freedesktop.login1 where available. On Windows we call
//! `SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED |
//! ES_AWAYMODE_REQUIRED)` on begin and `ES_CONTINUOUS` alone on end.
//! On Linux and Windows, `PowerAssertion::begin` is currently a no-op
//! that registers a snapshot in the process-wide registry for diagnostics
//! but does not inhibit OS-level idle throttling. The planned
//! implementations are:
//!
//! All paths degrade to no-ops without failing — a missing DBus session
//! or an unsupported Cocoa binding is not fatal, it just means the OS
//! may still decide to idle us. We log when that happens so the
//! diagnostics bundle has a breadcrumb.
//! - Linux: systemd-logind / GNOME session idle inhibit via
//! `org.freedesktop.login1.Inhibit` where available.
//! - Windows: `SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED
//! | ES_AWAYMODE_REQUIRED)` on begin and `ES_CONTINUOUS` alone on end.
//!
//! Until those land, long sessions on Linux and Windows can still be
//! idled by the OS. See `KNOWN-ISSUES.md` (KI-02, KI-03) for workarounds.
//!
//! All paths return a guard so the caller's code is unchanged. Failures
//! to acquire a real assertion are logged so the diagnostics bundle has
//! a breadcrumb.
use std::collections::HashMap;
use std::sync::atomic::{AtomicUsize, Ordering};