Repository navigation
perf(android): skip the freshness window after a settle on a proved-fresh tree - #4605
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed
You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…resh tree A press or click whose --settle converged stored its final capture as the session snapshot. When the helper proved that capture a complete read after a cache reset, it is already the fresh post-action tree, so marking a new freshness window only made the next command bypass the cache and run freshness recovery. Convergence alone still arms the window: two stale dumps can agree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ution capture Also name click in the helper README and the tap-outcome waiver, which still said the freshness mark is always set after press/click. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
74f6cbd to
b9cdd4a
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apex Sentinel · ✅ ApproveNo open findings. Reviewed with this repository's own Sentinel configuration ( 💬 Talking to SentinelIn a finding's thread, reply with:
On this conversation, comment |
|
Android / Smoke Tests failure at ae68544 (run 43919820425, job 133483871649, From the artifact (
From code, every new call site:
I'll add the occurrence to #4105. |
|
This PR is ready for the maintainer: I found no problems at ae68544. The 20 checks all pass. The Android Smoke Tests failure reported at this head was on Not blocking, and fine to take or leave: the skip at https://github.com/callstack/agent-device/blob/ae68544/packages/daemon/src/core/deferred-interaction-outcome.ts#L96 also retires the sharp-drop and empty-interactive guards for the next capture, not only stuck-route, so the comment could say so. The settle proof is also inferred from The live numbers cover API 35 only. The open inline thread on the README is fixed at this head, so the author can resolve it: #4605 (comment) |
Summary
After a
press/clickwhose--settleconverged, the daemon still armed the Android freshness window, so the next command bypassed the snapshot cache, lost the short helper idle wait, and ran stale-tree recovery. Now the window is skipped only when the settle stored its final capture (diffpresent) and the helper proved that capture fresh (cache cleared, root present, no truncation, no missing window roots: the #3815 proof, now one shared predicate carried asSnapshotState.freshTraversal). Convergence alone still arms the window, because two stale dumps can agree.back(bare or--settle),open, and unconverged or unproved settles still arm the window; a new test pins bareback. 10 files.Refs #4105
Validation
Head ae68544, rebased on cb33595. Typecheck, lint and focused vitest pass; request-path test fails without the fix. CI owns
check:affected.Emulator API 35 (Settings), N=16 per arm, interleaved, load avg 25–490. Follow-up wall time (CLI included); measured at ac43329 (base 244d1ff); this PR's production diff is unchanged since then:
press --settlesnapshotpresssnapshotStale-route captures, failed presses, and wrong toggle states: 0 in both arms. Freshness retries: 0 in both arms. On API 34+ the proof already suppresses stuck-route retries, so the gain is the cache and idle-wait path. Devices without the proof keep today's behavior.
Lag check: after a plain navigating
press, the first capture showed the new screen in 15/15 runs (done 427–1511 ms after the press, CLI floor ~400 ms). The old ~2 s lag does not appear.🤖 Generated with Claude Code