Skip to content

Replace global Keychain UI suppression path - #98

Merged
mstallone merged 3 commits into
mainfrom
investigate-keychain-supp
Aug 5, 2026
Merged

mstallone merged 3 commits into
mainfrom
investigate-keychain-supp

Conversation

@mstallone

@mstallone mstallone commented Aug 5, 2026 •

Copy link
Copy Markdown
Owner

TL;DR

Remove Runway's deprecated, process-global Keychain UI suppression switch. Automatic credential discovery is limited to noninteractive metadata and local caches, while any potentially prompting Keychain secret read happens only after an explicit user action.

What was happening

  • Runway called SecKeychainSetUserInteractionAllowed(false) around synchronous SecItemCopyMatching reads, then restored the setting after the read returned.
  • Because the switch is process-global and the read can block indefinitely, a wedged call could keep interaction disabled longer than intended.
  • Startup, periodic refresh, CLI refresh, and provider detection could reach credential paths that read classic login-keychain secret data.
  • A macOS 26.6 probe confirmed that LAContext.interactionNotAllowed does not reliably suppress classic ACL prompts when secret data is requested.

What this changes

  • Delete the deprecated global interaction switch and its suppression wrapper.
  • Split Keychain access into metadata/fingerprint probes and secret-data reads.
  • Attach a per-query LAContext with interactionNotAllowed to automatic metadata-only queries.
  • Restrict secret reads to explicit GUI refresh/recovery actions and serialize them.
  • Reuse a user-approved value for the running app session while the item's metadata fingerprint remains unchanged, so scheduled refreshes continue without another prompt or secret read.
  • Stabilize newly modified Keychain metadata before the approved read, avoiding stale process-lifetime caching when secret-only updates share Keychain's one-second modification timestamp.
  • Keep breaker retries, same-refresh deduplication, and no-fingerprint fallback behavior bounded.
  • Move hidden Codex keyring-home identity binding to manual Refresh All instead of launch, CLI, or periodic refresh paths.
  • Store Runway's iCloud device identity in a protected local Application Support file, with one-time migration and explicit recovery for legacy Keychain identities.
  • Update provider errors, settings UI, architecture/debugging/provider docs, and regression coverage for the new behavior.

Heads-up

  • The modern noninteractive context is intentionally not treated as a reliable suppression mechanism for classic login-keychain secret ACL reads; those reads remain manual.
  • Existing legacy iCloud identities migrate automatically when possible. If migration needs Keychain approval, Settings offers an explicit Recover Identity action.

Tests

  • swift test: 1,745 XCTest cases passed, 4 skipped, 0 failures; 6 Swift Testing cases passed.
  • Focused Keychain coordinator/accessor suite: 24 passed, 0 failures.
  • Real macOS 26.6 probe confirmed Keychain modification dates collide within the same second; regression coverage verifies the stabilization barrier.
  • ./script/build_and_run.sh verify: signed release build verified and relaunched.
  • Local Codex review loop: clean after the lifetime and collision fixes.
  • git diff --check: clean.
  • Confirmed SecKeychainSetUserInteractionAllowed is absent from source and the built Mach-O imports.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@mstallone
mstallone merged commit daa4892 into main Aug 5, 2026
2 checks passed
@mstallone
mstallone deleted the investigate-keychain-supp branch August 5, 2026 01:55
mstallone added a commit that referenced this pull request Aug 8, 2026
**TL;DR** — Records the v0.8.10 changelog ahead of tagging the release.

## What was happening

- The v0.8.10 release is ready to cut (keychain overhaul #99, plus #98
and #97), and the repo records each release's notes in CHANGELOG.md via
PR before the tag.

## What this changes

- Prepends the approved v0.8.10 section to CHANGELOG.md. No code
changes.

## Heads-up

- The v0.8.10 tag goes on this PR's squash-merge commit; the release
workflow then builds, signs, notarizes, and publishes.

https://claude.ai/code/session_01RbrQY7hdj5JeZdk5cNiMcY
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