Skip to content

Fix remote input critical/latest source watermark (#34) - #43

Merged
ElSargo merged 1 commit into
mainfrom
fix/remote-input-source-watermark
Sep 16, 2026
Merged

ElSargo merged 1 commit into
mainfrom
fix/remote-input-source-watermark

Conversation

@ElSargo

@ElSargo ElSargo commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Stamp monotonic source_watermark on StampedClientMessage in RemoteInputLane before critical/latest split; carry through network send/receive.
  • write_local_input publishes source-earlier pending latest before a critical event, then treats leave/focus as barriers that refuse older latest-state samples.
  • Bump PRESENTATION_PROTOCOL_VERSION to 25 for the stamped client-input envelope on critical/latest lanes.
  • Remit the critical/latest watermark friction in docs/frictions/ui-concurrency.md (focus fan-out / focus transition: keyboard reset / plugin blur-focus / managed focus split across lanes without focus_epoch #41 left open).
  • Add regression tests proving source-earlier motion sequences before leave and that leave drops obsolete motion.

Fixes #34

Test plan

  • RUSTFLAGS='-C linker=cc' cargo test -p brood-protocol -p brood-transport -p brood-remote --lib
  • RUSTFLAGS='-C linker=cc' cargo test -p brood-client --lib remote::
  • Manual remote session: move pointer then leave under load; hover must not revive after leave.

Residual risks

@ElSargo ElSargo mentioned this pull request Sep 16, 2026
2 of 3 tasks

@ElSargo ElSargo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Brood QA (static) — code looks good

Verdict: COMMENT LGTM for remit of #34 (critical/latest source watermark). Not a formal APPROVE (reviewer is ElSargo).

Evidence

  • StampedClientMessage + PRESENTATION_PROTOCOL_VERSION = 25; watermark assigned in RemoteInputLane::send before critical/latest split.
  • Transport send/receive stamped APIs require non-zero watermark; remote write_local_input publishes source-earlier pending latest before a critical, raises applied_barrier_watermark on leave/focus (retires_latest_state), and drops obsolete latest samples.
  • Regression tests: source-earlier motion sequences before leave; leave barrier drops obsolete motion; client lane watermark ordering.

Residuals (acknowledged)

  • Local dispatch_focus_change focus epochs still open (#41).
  • Mixed protocol 24/25 peers fail handshake (intentional).

CI

FAILED — GHA Nix ENOSPC (and/or disk pressure mid-build). Not treated as a logic blocker.

Stacking

Overlaps clients/brood-client/src/remote.rs with #45 and docs/frictions/ui-concurrency.md with the session-switcher stack. Prefer landing #43 before #45 on remote.rs, or rebase one onto the other.

Desktop verify: not run (needs remote session under load).

Stamp a source watermark before the remote lane split and carry it through
both network tasks so write_local_input can publish source-earlier motion
before leave/focus barriers and refuse obsolete latest-state samples.
Bump presentation protocol to 25 for the stamped client-input envelope.
Fixes #34.
@ElSargo
ElSargo force-pushed the fix/remote-input-source-watermark branch from a46b1c7 to b8fca0a Compare September 16, 2026 22:01
@ElSargo
ElSargo merged commit ed1306c into main Sep 16, 2026
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.

remote input: critical/latest-state lanes lack shared source watermark (leave can sequence before earlier motion)

1 participant