Skip to content

B-03: accessibility events without the UI lock; notificationTimeout 0 - #71

Merged
austinintelligence merged 7 commits into
claude/friendly-dirac-embe85from
claude/b-03-event-lock
Oct 15, 2026
Merged

austinintelligence merged 7 commits into
claude/friendly-dirac-embe85from
claude/b-03-event-lock

Conversation

@austinintelligence

@austinintelligence austinintelligence commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • Ui.onAccessibilityEvent no longer takes the UI lock. The generation is an AtomicLong that every event bumps, and the last-event time is volatile. The cached scene is stamped with its generation and snapshot() rebuilds it when it is older. (An earlier version skipped bumps within 40 ms of the last one; that could drop an event during a rebuild and cache a half-old scene, so every event now bumps.)
  • notificationTimeout 50 → 0 in accessibility_service_config.xml.
  • The quiet window stays 200 ms by default and can be set with the host env AU_QUIET_MS (1 to 900, else the default). The helper still receives it in the plan's settle op.
  • cargo xtask benchmark-live with BENCH_QUIET_MS=200,150,120 runs the benchmark once per value, writes benchmark-live.<ms>ms.json for each, and prints quiet_ms=… tap_p50=… tap_p95=… success=…. How to run it is in docs/contributing/testing.md.

Why

Event-thread half of finding #5: events contending with readers for the UI lock delayed settle's view of the screen. The sweep is how we choose the quiet window against the 1.3.0 tap gate (p50/p95 600/1,500 ms).

Test: the_quiet_window_defaults_to_200_and_takes_a_sane_override in computer/src/agent_tests.rs (fails before, because quiet_window does not exist). The helper change has no JVM test: Ui is an AccessibilityService and cannot run on the JVM here.

Safety and compatibility

  • No device-specific serials, tokens, private paths, media, or signing material are included.
  • No new way for an agent to run a shell, adb, or page JavaScript; command forms are unchanged. AU_QUIET_MS is a host-side setting, not an agent command.
  • Destructive/privacy-sensitive behavior has explicit confirmation coverage. (Not touched.)
  • Temporary files, processes, emulators, and device state have cleanup coverage. (Not touched.)

Verification

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-targets
  • cargo xtask check and cargo xtask docs
  • npm test and npm run lint (not run)

Not done here

  • Gradle build, google-java-format and JVM tests of the Java change were not run: this container has no Android SDK. The Java edit has not been compiled locally; the helper CI job is the first compile.
  • No emulator or device run: the 200 / 150 / 120 ms sweep, choosing the quiet-window value, and the tap p50/p95 effect of the lock change.
  • notificationTimeout 0 with typeAllMask and flagIncludeNotImportantViews delivers every content-change event unbatched: event rate and CPU on a busy screen (scrolling list, video) are not measured.

Release impact

  • No breaking change.
  • Breaking change documented in the changelog and migration guidance.

Stacked on #60 (B-02); retarget to claude/friendly-dirac-embe85 or main as the earlier PRs merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VBuuDWN89yt1W59QT8aHLo

Events bump an atomic generation and the last-event time instead of taking
the UI lock; a scene older than the generation is rebuilt on demand. The
quiet window is configurable (AU_QUIET_MS, default 200) and benchmark-live
can sweep it with BENCH_QUIET_MS.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBuuDWN89yt1W59QT8aHLo
Copilot AI balanced review requested due to automatic review settings October 15, 2026 09:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b28b9735-8c9d-4274-a089-60f8ea61e52a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@austinintelligence
austinintelligence changed the base branch from claude/b-02-generation-polling to claude/friendly-dirac-embe85 October 15, 2026 17:48
Vm.java: keeps A-18's p.unguarded() check; the comment now gives both B-03's reason (blocking other workers' reads) and A-18's (a capture blocking taps). Gates and helper javac pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZLaa2TojSgBwyk35cJjco
@austinintelligence
austinintelligence merged commit dc0202f into claude/friendly-dirac-embe85 Oct 15, 2026
6 checks passed
austinintelligence added a commit that referenced this pull request Oct 15, 2026
A-01 budgets and fail-closed gates, with these merged into it in dependency order: B-10 #65, B-01 #62, A-20 #76, A-21 #61, A-09 #56, A-07 #68, A-04 #63, A-10 #59, A-11 #72, A-12 #57, A-13 #73, A-17 #58, A-18 #67, A-19 #70, B-11 #69, A-15 #64, B-02 #60, B-03 #71, B-05 #74, B-04 #75, B-06 #77, B-07 #78, B-13 #82, A-14 #86, A-16 #84, B-08 #87, B-09 #88, A-02 #79, A-03 #80, A-05 #83, A-06 #81, A-08 #85, B-12 #66.

All checks green on Linux, macOS and Windows (Rust, helper build and format, installer, package smoke, CodeQL, dependency audit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZLaa2TojSgBwyk35cJjco
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.

3 participants