test: characterize set_widget LWW gate - #161
Conversation
|
Warning Review limit reachedNext included review available in 56 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 114 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Comment |
benceruleanlu
left a comment
There was a problem hiding this comment.
Approved.
Review findings
suggestion: In test/set-widget-lww-gate.test.ts, the op_id tiebreak case applies the higher ID before the lower one, so this file remains green if the top-level gate compares only the counter. The broader suite already kills that mutation across the LWW, KA-2, convergence, replay, and property coverage, so this is not a repository safety gap. For stronger standalone characterization, consider adding the reverse op_id arrival order and an equal-counter/different-actor case (KA-2, FC-2, FC-7).
|
Follow-up PR addressing the review item: #176 (assigned to christian-byrne per quiet-week contact rules; approver named in the PR body). Full context for agent readersBoth requested cases landed in |
Summary
set_widgetLWW gate.op_id.Contract corrections
The queue row expected two behaviors that the protocol does not provide:
op_idcannot produce an equal full stamp key. Ordering is[counter, actor, op_id], so this test covers the real tie case: equal counter and actor, resolved byop_id.lww-droppedconsumes the losingop_idin__applied. Therefore the contested widget value and stamp remain unchanged, but the full Yjs document encoding changes due to bookkeeping.No production behavior or outcome strings change.
Invariants
op_idand conflict ordering uses stamps.Verification
npm test -- test/set-widget-lww-gate.test.ts— 4 passednpm test— 69 files, 855 passednpm run typecheck— passednpm run lint— 0 errors (1491 existing warnings)