Skip to content

fix: retry alert accept/dismiss on transient 'alert not found' errors#177

Merged
thymikee merged 2 commits intomainfrom
claude/sharp-lehmann
Mar 3, 2026
Merged

fix: retry alert accept/dismiss on transient 'alert not found' errors#177
thymikee merged 2 commits intomainfrom
claude/sharp-lehmann

Conversation

@thymikee
Copy link
Copy Markdown
Contributor

@thymikee thymikee commented Mar 3, 2026

Summary

  • Adds a 2 s internal retry window for alert accept and alert dismiss when the runner returns alert not found or no alert
  • Non-alert errors break the retry loop immediately and are re-thrown unchanged, preserving the original error
  • Injects runnerCommand as an optional param on handleSnapshotCommands for unit testability
  • Adds 4 unit tests covering: retry-then-succeed, no retry on unrelated error, multi-retry on dismiss, and no retry for get

Test plan

  • All 9 unit tests pass in snapshot-handler.test.ts
  • Full test suite: 538/539 non-integration tests pass (1 pre-existing Android device integration failure)

Fixes #171

🤖 Generated with Claude Code

Adds a 2 s internal retry window for `alert accept` and `alert dismiss`
when the runner returns "alert not found" or "no alert". Errors from
other causes break the loop immediately and are re-thrown unchanged.
Also injects `runnerCommand` as an optional param to enable unit testing
without spawning a real runner.

Closes #171

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-177/

Built to branch gh-pages at 2026-03-03 18:01 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

…issions reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thymikee thymikee merged commit 8d4c914 into main Mar 3, 2026
5 of 6 checks passed
@thymikee thymikee deleted the claude/sharp-lehmann branch March 3, 2026 18:39
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.

Stabilize iOS alert accept flow when alert is present but not yet actionable

1 participant