Skip to content

Pin ref-slot diff wire states and make Reference.value final - #8402

Merged
knutwannheden merged 1 commit into
mainfrom
rpc-ref-slot-diff-test-coverage
Aug 6, 2026
Merged

Pin ref-slot diff wire states and make Reference.value final#8402
knutwannheden merged 1 commit into
mainfrom
rpc-ref-slot-diff-test-coverage

Conversation

@knutwannheden

@knutwannheden knutwannheden commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Motivation

Summary

  • RpcSendQueueTest: three new tests pinning the wire states a diffed ref slot emits — deletedRefSlotIsSent (CHANGE, DELETE), identicalRefSlotIsNoChange (CHANGE, NO_CHANGE), changedRefSlotOfDifferentClassIsAdded (CHANGE, ADD) — including that the onChange consumer sees the after value (or is not invoked for DELETE/NO_CHANGE), via a small diffRefSlot helper that seeds the queue's before context the same way senders do
  • Reference.value is now final, assigned through a private constructor; a protected no-arg constructor keeps the GitProvenance subclass compiling unchanged

Test plan

  • ./gradlew :rewrite-core:test --tests "org.openrewrite.rpc.RpcSendQueueTest"
  • Full ./gradlew :rewrite-core:test (covers GitProvenance marker round trips against the constructor change)

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Aug 5, 2026
@knutwannheden
knutwannheden merged commit 5954746 into main Aug 6, 2026
1 check passed
@knutwannheden
knutwannheden deleted the rpc-ref-slot-diff-test-coverage branch August 6, 2026 09:29
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant