Skip to content

test: pin set_widget LWW gate op_id/actor tiebreaks in both arrival orders (follow-up to #161) - #176

Open
christian-byrne wants to merge 1 commit into
mainfrom
lane-act-cmp-161-followup
Open

christian-byrne wants to merge 1 commit into
mainfrom
lane-act-cmp-161-followup

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #161, addressing the single review item from the approve-with-comments review by benceruleanlu:

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. [...] consider adding the reverse op_id arrival order and an equal-counter/different-actor case (KA-2, FC-2, FC-7).

(Quoted from the review body; no @-mention per quiet-week contact rules.)

Test-only change. No production behavior or outcome strings change.

What changed

  • Reverse op_id arrival order: applies the lower op_id first at an equal counter+actor, then the higher one, which must be applied — this kills the "compares only the counter" mutation that the original forward-order test survives.
  • Equal-counter / different-actor case in both arrival orders: agent:b beats agent:a at the same counter regardless of arrival order, converging on the same stamp and projected document (KA-2, FC-2, FC-7).

Evidence

  • npm test -- test/set-widget-lww-gate.test.ts — 6 passed (4 pre-existing + 2 new)
  • Mutation check: temporarily reduced compareStampKeys to counter-only — the 4 original tests still pass but both new tests fail, confirming the file now kills that mutation on its own; mutation reverted
  • npm test — 969 passed, 8 failed in test/check-import-graph.test.ts; reproduced identically on pristine main (8 failed / 2 passed with this change stashed), so pre-existing and unrelated to this PR
  • npm run typecheck — passed
  • npm run lint — 0 errors (1662 existing warnings)

…rders

Follow-up to #161 (approve-with-comments by benceruleanlu): the op_id
tiebreak case only covered the forward arrival order, so the file stayed
green under a gate that compares only the counter. Adds the reverse
op_id arrival order and an equal-counter/different-actor case in both
arrival orders (KA-2, FC-2, FC-7). Verified both new tests fail against
a counter-only gate mutation while the original four pass.
@christian-byrne christian-byrne added the risk:R1 PR risk grade (advisory shadow check; grader-owned) label Sep 3, 2026
@christian-byrne christian-byrne self-assigned this Sep 3, 2026
@christian-byrne christian-byrne added the risk:R1 PR risk grade (advisory shadow check; grader-owned) label Sep 3, 2026
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 129 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.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 7ef17034-9158-42ef-8584-9adc96fcb539

📥 Commits

Reviewing files that changed from the base of the PR and between 84030a4 and e8975f9.

📒 Files selected for processing (1)
  • test/set-widget-lww-gate.test.ts

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:R1 PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant