Skip to content

Core round 1: whisper CoreML/ANE + GPU eligibility + insights remote-readiness#581

Merged
dishit-wednesday merged 7 commits into
feat/locket-profrom
feat/core-round-1
Jul 22, 2026
Merged

Core round 1: whisper CoreML/ANE + GPU eligibility + insights remote-readiness#581
dishit-wednesday merged 7 commits into
feat/locket-profrom
feat/core-round-1

Conversation

@dishit-wednesday

Copy link
Copy Markdown
Collaborator

Core-side round 1 of the locket work, stacked on `feat/locket-pro`.

What's in it

  • Honest CoreML (Neural Engine) toggle + usage logs + hardened encoder download: the toggle now gates use and download and forces a reload; encoder fetched before the download row drops; persist migration keeps existing users on ANE.
  • Per-model ANE/CPU status on the transcription models list.
  • GPU eligibility enforced at the whisper load site: one `hardwareService` predicate (`deviceSupportsGpuOffload` / `whisperSupportsGpu`) — iOS Metal (real device, >4GB) / Android ggml OpenCL (Adreno/Mali, OpenCL 3.0). The settings UI reads the same predicate, so UI and enforcement can't drift. Flash attention removed (GPU-only, no ANE benefit, unsupported by OpenCL) — forced off.
  • Insights remote-readiness: `transcriptSummarizer.hasRemoteBackend()` so the recorder's Analyse model-guard counts a connected remote server as a valid summary backend (same signal the summarizer routes on).
  • iOS calendar-events patch for iOS 17+ Full Access.

Notes

  • Rendered locket tests were intentionally kept out of this push.
  • The branch carries pre-existing lint debt from the locket line (unrelated to these commits); the acceleration diagnostics harness is not included.

dishit-wednesday and others added 7 commits July 19, 2026 14:18
…ownload

- CoreML toggle is now real: use AND download gated on the user setting (default
  ON) plus a valid encoder asset; OFF forces CPU. Reload-on-change so flipping it
  takes effect. The only reliable escape on a device where CoreML crashes/garbles
  (native failures can't be caught in-process; no denylist).
- [Whisper][ACCEL] logs state the resolved coreML/gpu/flashAttn config per load and
  point at the native "Core ML model loaded" line so a log pull confirms what ran.
- Harden ensureCoreMLEncoder: stall watchdog (aborts a dropped connection), extract
  to a temp dir + atomic rename, and integrity-check (coremldata.bin) so a partial/
  corrupt encoder is never treated as present. "present" now means valid.
- deleteModel removes the .mlmodelc encoder alongside the .bin (no orphaned ANE dir).

Co-Authored-By: Dishit Karia <hanmadishit74@gmail.com>
… list

Optional coreMLStatus prop on the shared ModelCard (additive; only the Transcription
tab passes it, so no drift to Text/Image cards). iOS-only: shows ANE when a valid
encoder is present, CPU otherwise.

Co-Authored-By: Dishit Karia <hanmadishit74@gmail.com>
Mounts the real LocketRecordingScreen with a recovered clip whose WAV header is
damaged (needsRepair). Asserts the Repair banner renders, and tapping it drives
the real repairRecording service -> native repairWavHeader(path) -> needsRepair
cleared -> banner gone. Fakes only device boundaries (icons/theme/nav/toast +
AudioNormalizer/RecordingPlayer). Skips in open-core CI where pro/ is absent.

Co-Authored-By: Dishit Karia <hanmadishit74@gmail.com>
…layer smoke

The LocketPlayer screen was removed (its transcript + speaker-turn rendering moved
to the detail), so locketPlayerSmoke.test.tsx mounted a screen that no longer
exists - delete it. Replace with locketSpeakerTurns: mounts the real detail with an
analysed, tdrz-segmented recording and asserts the "Speaker 1/2" labels render iff
[SPEAKER_TURN] markers are present - guarding the diarization fix (turns now show on
the screen the user actually reaches). Both branches falsified.

Co-Authored-By: Dishit Karia <hanmadishit74@gmail.com>
The recorder's Analyse guard needs to know whether a summary backend is
available WITHOUT a local model download (a connected remote server counts).
Expose the summarizer's existing remote check as a public method so the guard
reads readiness from the same signal the summarizer routes on, never a second
copy that could drift.

Co-Authored-By: Dishit Karia <hanmadishit74@gmail.com>
The lib (2.2.0, unmaintained since 2021) calls the deprecated requestAccessToEntityType,
which iOS 17+ no longer allows for reads, so fetchAllEvents returns nothing on modern
iPhones. patch-package branch: use requestFullAccessToEventsWithCompletion on iOS 17+,
old API on iOS 16 and earlier. Applied automatically via the postinstall hook.

Co-Authored-By: Dishit Karia <hanmadishit74@gmail.com>
GPU offload is decided by one hardwareService predicate (deviceSupportsGpuOffload /
whisperSupportsGpu) and enforced at whisperService.loadModel, so a stored setting can
never request the GPU on an ineligible device. iOS -> Metal (real device, >4GB);
Android -> the ggml OpenCL backend (Adreno/Mali, OpenCL 3.0). The recorder settings UI
reads the same predicate to show/hide the GPU toggle, so UI and enforcement can't drift.

Remove the flash-attention option (GPU-only, no benefit with the ANE encoder, and
unsupported by the OpenCL backend) - now forced off. Also simplify the iOS CoreML
encoder download (drop the 90/10 progress split; fetch the encoder before dropping
the download row).

Co-Authored-By: Dishit Karia <hanmadishit74@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1161e3b7-ef60-4674-8fa7-ec9ab978a212

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/core-round-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@dishit-wednesday
dishit-wednesday merged commit 85033b6 into feat/locket-pro Jul 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant