Repository navigation
Commit d4eb753
fix(platform-apple): simplify alert action retry budgets (#4123)
* fix(platform-apple): do not start an alert action retry the remaining budget cannot hold
The alert act loop slept the poll interval and then started another runner read
with whatever budget was left, which could be a few milliseconds. The runner
answers such a read with a main-thread timeout, which is not a typed absence, so
a quiet screen was reported as a failed read. Stop once the remaining budget
cannot hold a read, so the window ends with the last typed absence. The wait
loop already guards this on main.
* refactor(platform-apple): reuse the poll-interval floor for alert action retries
Drops MIN_ALERT_READ_BUDGET_MS and canHoldRead: the act loop now skips a retry
when no more than ALERT_POLL_INTERVAL_MS remains, like awaitAppleAlert. The test
also asserts the loop retried at least once.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(platform-apple): start an alert read only with enough budget to find and press a late prompt
Both alert loops skipped a read with no more than one poll interval left. A live
run showed a permission prompt appearing about 1 s into the command still ended
MAIN_THREAD_TIMEOUT: the read that saw it started with 300-760 ms left, and a
read needs up to about 1.4 s to find and press the button. Replace the shared
poll-interval floor with one named ALERT_MIN_READ_BUDGET_MS (1.5 s) in the alert
contract, used by awaitAppleAlert and actOnAppleAlert.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* test(daemon): dismiss retries a typed absence once under the alert read floor
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(platform-apple): keep the poll-interval read floor for the macOS helper
The 1.5 s floor exists for the XCTest runner's main-thread watchdog. The macOS
helper takes no budget, so it keeps reading until one poll interval remains.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* docs(contracts): state that the alert read floor gates retry reads only
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* fix(platform-apple): keep the alert read floor out of the wait path
The 1500 ms floor blinded short waits. It now gates only the act loop's
runner retries; the wait path stays on the poll-interval rule from #4187.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(platform-apple): give runner alert actions a 3 s retry window
With the read floor, a 2 s window could not reach a prompt that appears
after about 0.4 s. The runner leg now retries in a 3 s window, and a
quiet screen still gives up sooner than the old 2 s loop.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(platform-apple): simplify alert action retry budgets
* docs(contracts): correct live alert read timings
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: Michał Pierzchała <[email protected]>1 parent 0db6ed4 commit d4eb753
3 files changed
Lines changed: 112 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
2 | 9 | | |
3 | 10 | | |
4 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
153 | 234 | | |
154 | 235 | | |
155 | 236 | | |
| |||
203 | 284 | | |
204 | 285 | | |
205 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
206 | 305 | | |
207 | 306 | | |
208 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| |||
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
148 | | - | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
0 commit comments