refactor(alert): one helper owns the alert runner budget

Merged
TH
4h ago
+19-26

Applies the non-blocking review notes on #4540 (https://github.com/callstack/agent-device/pull/4540#issuecomment-6876862742). No behaviour change.

  • alertRunnerBudgetMs in packages/platform-apple/src/alert.ts now owns the default (10 s), the read floor (1.5 s) and the 25 s ceiling. Before, they were split between readAppleAlert and runAppleAlert. Every budget the runner receives is the same as before.
  • alertWaitTimeoutMs in snapshot-alert.ts is renamed to alertTimeoutMs, and its doc now says it also sets the alert get budget.
  • The hand-built watchdog test in alert.test.ts is removed. It only re-checked existing behaviour that other tests already cover.

Not taken: the optional live alert wait 30000 run on a simulator. The wait path is unchanged here.

Validation: vitest on alert.test.ts and the daemon execution handlers (101 tests) passes; typecheck, oxlint and oxfmt are clean. CI owns the rest.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.