fix(capture-kit): settle a rebased post-gesture baseline without distrust

Merged
TH
3d ago
+83-55

Summary

After a scroll or swipe, the post-gesture stabilization loop rebases its baseline when the capture backend changes mid-poll. It kept baseline distrust after the rebase, so every later quiet pair "matched the pre-gesture baseline" (which was actually read after the gesture) and the loop polled to the stale-accept cap. This change drops distrust once the baseline is rebased. A rebase therefore never reaches accept-stale, and the dead baseline_rebased veto branch is removed.

This shows up on Bluesky-class iOS sessions whenever captures move between the runner and the simulator AX bridge (for example a private-AX verdict followed by a bridge capture).

4 files. Tests that previously accepted staleAccepts + settled === 1 now assert a bounded settle.

Validation

  • pnpm check:affected --run --head dc1e9efc34: passed (exactCommit: true).
  • New/updated tests fail on origin/main source (7 failures) and pass at head.
  • Live, Bluesky 1.136.0 release build, iOS 27.0 simulator, sequence snapshot (private-AX) โ†’ scroll down โ†’ snapshot -i:
    • base ac7509a820: post_gesture_snapshot_stale_accept, 11 attempts, 3662 ms.
    • head dc1e9efc34: post_gesture_snapshot_stabilized, 3 attempts, 887โ€“932 ms (3 runs).
  • CI owns integration and coverage lanes.

๐Ÿค– Generated with Claude Code