Land release blocker fixes and workspace cleanup
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled

This commit is contained in:
2026-04-23 00:16:09 +01:00
parent d7363cc913
commit 9b0067b4c0
36 changed files with 1529 additions and 418 deletions

View File

@@ -5,6 +5,18 @@
**Source:** [2026-04-22 code review](../code-review-2026-04-22.md), originally deferred during A.1 #9
**Labels:** release-blocker, major, macos, platform
**Current state (2026-04-23):** `objc2`/`objc2-foundation` have been
added behind `cfg(target_os = "macos")`, and the `NSProcessInfo`
bridge now calls `beginActivityWithOptions:reason:` / `endActivity:`
with the retained activity handle. Isolated `cargo check` validation
passes for both `x86_64-apple-darwin` and `aarch64-apple-darwin`.
Remaining acceptance gap: manual runtime verification on a real macOS
machine (`pmset -g assertions`, background live session). Diagnostic
reports now also include a `## Power assertions` section that lists any
currently active Kon assertion guards (`reason`, `backend`, `acquired`)
at report time, which gives the tester an in-app breadcrumb alongside
`pmset`.
## Problem
`begin_activity` always returns `Err` on macOS, so `PowerAssertion::begin` converts to `None` and the guard never acquires an `NSProcessInfo beginActivityWithOptions:reason:` assertion. Live recording and LLM cleanup therefore run without App Nap protection on the one platform where it matters.
@@ -18,6 +30,21 @@ The stub was deliberate (A.1 #9 acceptance concession — untestable on Linux wi
- `end_activity` calls `endActivity:` on the retained handle.
- Manual-test on a real macOS box: 10-minute background live session completes without throttling; `pmset -g assertions` shows Kon's activity during capture.
## Manual verification checklist
1. Launch Kon on a real macOS machine and start a live transcription session.
2. While capture is running, background the app for at least several minutes.
3. In Terminal, run `pmset -g assertions` and confirm Kon appears with a
user-initiated / no-idle-style assertion while the session is active.
4. While the session is still running, generate a Kon diagnostic report
and confirm the `## Power assertions` section lists an active entry
such as `reason=kon live dictation session`, `backend=macos`,
`acquired=true`.
5. Stop the session and rerun `pmset -g assertions` or regenerate the
diagnostic report to confirm the assertion disappears.
6. Repeat once for the LLM cleanup path if desired
(`reason=kon LLM cleanup`).
## Fix scope
Medium. Dep addition + FFI glue + manual verification. Can be done from Linux with `cargo check --target=aarch64-apple-darwin` for compile validation, but runtime behaviour needs a macOS machine.