Repository navigation
Conversation
A recording-only recovery tapped Close app on any "isn't responding" dialog before type and every generic-route command, including a dialog owned by another app. Delete it. The blocking-dialog guard already runs for type and the guarded generic commands with or without a recording: it recovers the session app's ANR and refuses another app's ANR with the alert dismiss hint. app-switcher now declares that guard like home and back. screenshot and telephony stay unguarded, so a recording no longer makes them close dialogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
|
At 9972959, four problems remain in Android ANR recovery. They can refuse or fail commands on the session's own app, or leave that app closed. A second independent pass found that an Android process name is likely treated as a package name. Take com.example.demo with an application-level android:process of com.example.demo.worker. On an ANR, Android puts the process name in the window title. The parser reports it as the package, so the guard treats the session's own ANR as foreign. Recording-time A second independent pass found that recovery is likely lost when the window probe gets no answer. This happens if the ANR is visible in accessibility, but the first window dump times out and the focus helper has no application window to report. Observation then yields unknown, whatever the accessibility snapshot shows. The guard lets A second independent pass found that recovery can likely launch before Android finishes closing the ANR. The tap can succeed while Android still has the close action queued. If the launch reaches the existing task and Android then kills the hung process, the focus poll cannot bring the app back. The command fails with the session app closed. The base recording path waited for the dialog to leave before launch. The new test fixture treats a tap as immediate dismissal. The shared recovery path must see the app-owned ANR clear after Close app and before relaunch. A second independent pass found that the app-switcher guard likely changes behavior outside recording. The base command had no dialog check and sent the system key, which Android handles in system policy. Now a focused session-app ANR causes a close and relaunch before the key, and a foreign ANR blocks the key. With or without recording, a dialog that appears after the key can turn a delivered press into a failure and relaunch the app before the action is recorded. Outside recording, the key must keep its base dispatch and succeed once delivered. If recording-time Repo Guards & Compatibility fails in the layering model test, likely because of this PR. Two open threads do not apply and can be resolved. In this one, the message and hint come only from the foreign-ANR refusal, and the no-tap and no-launch assertions show that nothing was closed. In the other, the message fragment appears only in the session-app ANR failure, and the empty tap list shows that the covered button was not tapped. Not verified here: tests were not run, and no live device run was made. The claim that the foreign-ANR router test fails on main comes from reading the base code, not from running it. The CI log was read only as a failure excerpt. Before merge, the four ANR problems need fixes, the stale layering entry needs removal, and CI needs to pass on the new push. |
An ANR window title names a process, not a package. The observer now resolves the owning package from dumpsys activity processes, and a process with no single owning package stays unowned, so the guard refuses it. When no window dump answers, a visible ANR is found by its Wait button and its not-responding process. App-ANR recovery relaunches the app only after the dialog has left. app-switcher keeps its unguarded dispatch, and the layering model no longer lists the removed type edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed at e09a64e:
Not verified on a device. The |
|
Scope notes for e09a64e:
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on e09a64e. The verdict and the full list are in the summary comment.
|
At e09a64e, session-app ANR recovery can still refuse the session's own app, tap the wrong dialog, or relaunch too early. Since the earlier review, the Does the fallback miss the ANR flag on Android 12 and later? The flag match is case-sensitive and needs a word boundary before Live proof is required before merge, because this change decides between closing an app and refusing a command from a new process dump that only hand-written fixtures cover. On an API 31+ device or emulator, bring up the session app's ANR dialog (for example with a button that blocks the main thread), then run A second independent pass found that private process names are likely cut before the owner lookup. With A second independent pass found that the fallback can likely tap a different dialog on versions that print the accepted flag, such as Android 7. The session app can be the only flagged process while its Wait button sits in a retained window under a foreign crash dialog. The fallback assigns that owner from any Wait node, and recovery can then tap the crash dialog's Close app. A second flagged ANR would cause a refusal, but a crash dialog adds no such flag, so this thread still applies to that case. A tap must require evidence that links the visible ANR window and its Close app button to the owned process. Without that link, the ANR must stay unowned. A second independent pass found that recovery can likely relaunch while the ANR is still visible. After the tap, Close app can have no bounds or be covered by a short overlay while Wait is still shown. The poll treats this as a cleared dialog, while the base recording path waited on the Wait button. Relaunch must wait until the ANR itself is gone, identified by its window or the Wait marker. An unreadable sample must not count as cleared. The tappable-button check should only decide where to tap. A second independent pass found that an unanswered focus probe now runs a full capture, even on an ordinary screen, and guards can pay that cost before and after input. The Coverage job records 8 captures where 4 were expected, and 6 and 5 where 3 to 4 were allowed. This thread still applies. An explicit no-focus answer, such as Two other open threads do not apply and can be resolved. In this one, the existing message, hint, no-tap and no-launch assertions are enough. In the other, the message fragment occurs only in the session-app failure, and the empty tap list shows that no covered button was tapped. Coverage fails with four tests. Three are the capture-count failures above. The fourth is in the long-press ledger test: the worst case of 349987 ms plus the 30000 ms margin exceeds the 320000 ms envelope. It is likely caused by the added fallback reads, so the worst case must fit the envelope again. Body rules also fails because the description has 254 words and the limit is 250. Not verified here: no device run was made, local tests were not run, and a real process dump has not confirmed the Android 12+ field spelling. Before merge, the ANR problems need fixes, the live API 31+ evidence needs to be attached, the description needs to be under the limit, and Coverage needs to pass. |
…s name ANR process names keep their :suffix through the owner lookup, and the process dump flag parses in both the notResponding and mNotResponding spellings (the latter from an API 37 dump). An unanswered window probe no longer captures a snapshot on an ordinary screen: it is skipped on mCurrentFocus=null, reads the process dump within the same observation budget, and captures only when a process is not responding. An ANR seen that way has no owner, so it is refused and never tapped. Recovery taps Close app only next to the ANR's Wait button and relaunches only after a readable snapshot shows the Wait button gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Live evidence, using the branch build at 656fc13's parent code (the behavior is unchanged in 656fc13), on an Android 17 (API 37) emulator. Setup: the session app is Session-app ANR (
Afterwards: Foreign ANR (Settings is brought to the front with
Afterwards: the ANR is still focused, the Settings pid is unchanged (19226), and the request log has no On this image, |
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
packages/platform-android/src/observation.ts:180 |
🆕 Session-app ANR recovery now needs a dumpsys activity processes record line to parse |
🔧 2 findings marked fixed in their threads
| Finding | Fixed by | Where |
|---|---|---|
| Every unobserved blocking-dialog read now costs a full accessibility snapshot, twice per command | thymikee | 656fc13 · reply |
| A visible ANR is attributed to whichever process is flagged notResponding, not the dialog's | thymikee | 656fc13 · reply |
1 finding below minor hidden (user_settings.min_severity).
Reviewed with this repository's own Sentinel configuration (7d392e62143f).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 656fc13. The verdict and the full list are in the summary comment.
|
At 656fc13, three ANR cases likely still need fixes: a visible ANR can pass without a refusal, an ordinary screen can pay for an extra capture, and relaunch can start too early. Since the earlier review, both flag spellings parse, A second independent pass found that an exhausted focus probe likely skips the refusal of a visible ANR. If a foreign ANR has focus during a recording and the window dump spends the 10-second budget, the process dump reads as empty. The empty process set then skips the only Wait check. The daemon treats unknown as clear, so A second independent pass found that the fallback likely still adds a full capture when no ANR dialog is visible. Android sets A second independent pass found that a failed snapshot can likely trigger an early relaunch. Android may still be clearing the ANR after Close app when the next snapshot hits the presentation deadline. That capture resolves as empty, truncated and sparse instead of throwing, as this test shows. Only the node array reaches the leave poll, which reads it as Wait being gone and relaunches. Only a complete sample may confirm that Wait is absent. Every degraded capture result must keep the poll waiting, and a test with a sparse sample should show no early relaunch. These threads no longer apply and can be resolved if still open: process record lookup (a live API 37 record has the parsed format, and an unanswered dump leads to a safe refusal), capture cost ( The required live evidence is attached, from a run at e09a64e. Not verified here: the new Wait requirement for the tap and the Wait-based leave poll were not exercised on a device, although the standard Android ANR layout includes that button. Not verified here: no device run was made and no local tests were run. A test showing that a crash dialog's Close app is not tapped without Wait would add coverage, but is not required for merge. The earlier Body rules failure concerned only the description length, and a later run passed. There are no conflicts. Before merge, the three ANR cases above need fixes. |
…lete captures An unanswered focus probe again leaves the observation unknown, as the guard does on every path on main; a stronger check belongs to the guard for all commands. The process-owner lookup stays for answered probes, without the not-responding flag that only the fallback read. The ANR recovery snapshot host now rejects a truncated or sparse capture, so a failed presentation after Close app keeps the relaunch waiting instead of reading as the Wait button gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Scope decision at e9259bc (third review round, delegated by the maintainer):
|
Summary
During a recording, a separate recovery tapped Close app on any Android ANR dialog, including another app's. It ran before
typeand every generic-route command, which contradicts #592 and #5115. The recovery is deleted. The blocking-dialog guard has no recording condition, so it now also covers recording. The guard is hardened::suffix, is resolved to its owning package throughdumpsys activity processes. If no single package owns it, the ANR is refused.Unanswered focus probes keep main's behavior.
app-switcher,screenshot, andtelephonystay unguarded.Before / after
scrollortypewhile recording, with another app's ANR in focus:COMMAND_FAILEDwith thealert dismisshint. Nothing is tapped.ANR in
com.example.app:worker:com.example.appowns that process.Validation
At e9259bc, the focused vitest files pass: the platform-android suite, the daemon dialog/type/router/gesture suites, and all Android provider scenarios, with capture counts and the long-press ledger at main's values. Live API 37 recovery and refusal evidence is in a PR comment. CI is pending.
🤖 Generated with Claude Code