Repository navigation
Soft-fail missing seat keyboard/pointer (H1) - #23
Conversation
ElSargo
left a comment
There was a problem hiding this comment.
Review (H1 soft-fail seat keyboard/pointer)
Verdict: APPROVE (posted as comment — gh as ElSargo cannot formally APPROVE own PRs)
What looks good
- Removes all hot-path
.expect("keyboard"|"pointer")fromcrates/broodd/src/input.rsand the auditedstate.rsseat-keyboard call sites (reset_transient_input_state, focus helpers, focus repair). - Soft-fail pattern is consistent:
warn!+ drop/skip instead of aborting the compositor — matches audit H1. focus_pane_from_presentation_clientcorrectly returnstrueafter Brood-side focus update when the seat keyboard is missing.- Focus-repair path still runs
reconfigure_focus_stack/ window-count update when keyboard is absent. - Residual H2 bootstrap expects correctly left out of scope.
should_forward_managed_pointer_buttonexport +tests/input_forwarding.rslock in the press/release forwarding rules.
CI
- Current CI failure is infra disk-full (
No space left on deviceduring Nix unpack of neovim/rustc), not a code regression. Please re-run when the runner has disk.
Local checks (reviewer)
cargo test -p broodd --test input_forwarding --test scheduling_domain --test session_volume→ 2+10+3 passedcargo test -p brood-protocol --lib→ 14 passedcargo check -p broodd --lib→ ok
Non-blocking nits / follow-ups
- In
forward_pointer_button_to_pane, missing keyboard currently drops the entire button path (including releases that should clear grabs). Consider forwardingpointer.buttonwhenever the pointer exists and only skipping the keyboard focus branch. forwarded_pressed_keysis updated before the keyboard soft-fail check — minor phantom-release risk if the keyboard returns later.- Audit M2 (hot-path
info!on button/axis) remains; fine to keep out of this PR.
Desktop
Not required for this change — seat teardown / capability-loss crash paths are hard to exercise on desktop; soft-fail + focused tests are enough.
ElSargo
left a comment
There was a problem hiding this comment.
Brood QA review
Checked: diff/view; CI 35146931568; audit H1.
Code: Correct H1 soft-fail. Hot-path .expect("keyboard"|"pointer") in input.rs and related seat focus helpers in state.rs become warn! + early return / skip. should_forward_managed_pointer_button exported with press/release semantics preserved (release always forwards). Thin integration test added. Out-of-scope H2 bootstrap expects correctly left alone.
CI: FAILURE — runner ENOSPC during Nix/source unpack. Infra. Author reports targeted broodd tests + cargo check -p broodd green locally.
Race-doc: N/A (not a ui-concurrency remittance).
Desktop verify: Blocked (no nix/client build on QA box). Soft-fail behavior needs seat teardown repro once buildable.
Residual / merge: Re-run CI after disk relief. Residual H2 bootstrap panics remain by design for this PR.
— Brood QA
Seat teardown or capability glitches previously aborted the compositor via
.expect("keyboard"|"pointer") on every forwarded event and related focus
helpers. Log and drop/skip instead so input/focus can degrade without a panic.
af49085 to
178faac
Compare
Summary
.expect("keyboard")/.expect("pointer")incrates/broodd/src/input.rswithwarn!+ early return so seat teardown / capability loss drops events instead of aborting the compositor.state.rs(reset_transient_input_state, focus helpers, focus repair).should_forward_managed_pointer_buttonand addcrates/broodd/tests/input_forwarding.rscovering press/release forwarding rules..expects on event-loop insert / Wayland socket setup instate.rsinit — not the same hot-path class.Test plan
RUSTFLAGS='-C linker=cc -L/tmp/brood-link' cargo test -p broodd --test input_forwarding --test scheduling_domain --test session_volume(2 + 10 + 3 passed; local unversioned.sosymlinks for xkbcommon/gbm because host lacks linker names)RUSTFLAGS='-C linker=cc' cargo check -p broodd --libcargo test -p brood-protocol --lib(14 passed)nix developCI parity if available on reviewer machine