Skip to content

fix: better timeouts and retries for tcc perms propagation - #64

Merged
cmorten merged 1 commit into
mainfrom
fix-harden-tcc-slow-propagation-resiliency
Aug 16, 2026
Merged

cmorten merged 1 commit into
mainfrom
fix-harden-tcc-slow-propagation-resiliency

Conversation

@cmorten

@cmorten cmorten commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Issue

No issue.

Details

Occasionally see apple event permission errors when really the successful TCC.db update should have covered it. There is potential propagation time + caches, so adding more timeouts and retries to see if improves success rate for DnD steps etc.

CheckList

  • Has been tested (where required).

@cmorten
cmorten merged commit 8aba51b into main Aug 16, 2026
22 checks passed
@cmorten
cmorten deleted the fix-harden-tcc-slow-propagation-resiliency branch August 16, 2026 17:03
iray-tno added a commit to iray-tno/hozo that referenced this pull request Sep 16, 2026
…t here (#455)

Fixes the flaky VoiceOver setup. Workaround for an upstream bug, written
up in #454.

## What changes

- `@guidepup/setup` runs **without `--ci`**, so it no longer tries to
enable Do Not Disturb.
- The step now verifies what the tests actually need, on macOS:
`SCREnableAppleScript` is `1`, the VoiceOver AppleScript marker file
exists (while SIP is off), and `osascript` can drive System Events.
Setup **and** these checks are retried three times.
- That replaces what `--ci` was buying here: it made a failed TCC write
fatal. Without the checks, `setup` exits 0 even when it leaves the
environment unusable (`guidepup/setup#61`).

## Why

`--ci` enables Do Not Disturb, and on macOS 13+ the only implementation
drives Control Center through `tell application "System Events"`. That
needs Automation permission for the process TCC holds responsible, and
Guidepup grants it to a hard-coded list of client paths. On some runners
the responsible process is not one of them:

- Run
[35005725595](https://github.com/iray-tno/hozo/actions/runs/35005725595)
failed **all fifteen attempts** (3 here × 5 inside Guidepup) with `Not
authorized to send Apple events to System Events (-2700)`, with no TCC
write error — the grants were written and still did not apply.
- The rerun passed on a different machine with the **identical** image
(`macos-15-arm64` `20260907.0337.1`, macOS `15.7.9`).
- Upstream's fix for this exact symptom (`guidepup/setup#64`) is already
in the pinned 0.25.3.

Do Not Disturb costs nothing here: notifications do not interrupt a
headless runner.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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