Repository navigation
Fix late layout completion regressing durable shell state - #29
Conversation
ElSargo
left a comment
There was a problem hiding this comment.
Brood QA review
Checked: diff/view; CI run 35150209800 was IN_PROGRESS at review start (sibling failures are ENOSPC); friction/layout section + Fixes #26; audit alignment with ui-concurrency layout race.
Code: Correct remittance. On completed/degraded: always retire pending entry; install durable_shell_layout / bump presented_layout_revision only when request_id >= committed_shell_layout_request; presented revision uses max (monotonic). Orphan completions also never lower presented. Regression test late_older_layout_completion_must_not_regress_durable_or_presented_revision exercises reverse-order completion. Author: 45 lib tests locally.
CI: Was in progress; expect same runner ENOSPC class until disk relief / re-run. Treat green CI as merge gate, not as a code fail.
Race-doc: Layout durable-state friction remitted accurately.
Desktop verify: Blocked (no nix/client build on QA box). Manual rapid resize/divider still useful post-build.
Residual / merge: Stacks with #21/#32 on plugins/session-switcher/src/lib.rs and shared friction doc — coordinate merge order. No logic objection from code review.
— Brood QA
ElSargo
left a comment
There was a problem hiding this comment.
Brood QA — APPROVE
Fixes #26 cleanly: late older layout completed/degraded can no longer regress durable_shell_layout or rewind presented_layout_revision.
What looks right
- High-water
committed_shell_layout_requestis the correct multi-inflight analog of the session-completion pending gate (exact match on a single slot does not fit overlapping layout txs). - Pending is always retired; durable install + presented advance only when
request_id >= committed; presented is monotonic viamax. - Orphan completions cannot lower presented.
- Friction remittance matches the code;
late_older_layout_completion_must_not_regress_durable_or_presented_revisionlocks the reverse-order race from the hunt/#26 sketch.
Verification
- Local:
cd plugins/session-switcher && RUSTFLAGS='-C linker=cc' cargo test --lib→ 45 passed (including the new regression). - CI run failed with runner ENOSPC while unpacking neovim — infra disk, not this diff (same pattern on sibling PRs).
Nits (non-blocking)
- Optional: explicit
degraded/ orphan-path cases. - Pre-existing:
PaneCreatedclearslayoutwithout resetting layout request watermarks; IDs remain monotonic so this gate stays consistent.
Desktop not required for this reducer race. No code changes requested.
Gate durable_shell_layout and presented_layout_revision on the highest committed layout request_id, keep presented revision monotonic, and remit the ui-concurrency friction. Adds a reverse-order completion regression test. Fixes #26
b389d52 to
313fbae
Compare
Summary
completed/degraded, always retire the pending entry, but installdurable_shell_layoutonly whenrequest_id >= committed_shell_layout_request.presented_layout_revisionwithmaxso a late older completion cannot rewind it.docs/frictions/ui-concurrency.md.late_older_layout_completion_must_not_regress_durable_or_presented_revision.Fixes #26
Test plan
cd plugins/session-switcher && RUSTFLAGS='-C linker=cc' cargo test --lib— 45 passed (includes new reverse-order completion regression)