Skip to content

Refactor EdgeMutationStrategy: share key-based resolution via KeyBased - #435

Merged
em3s merged 1 commit into
mainfrom
refactor/edge-mutation-strategy-keybased
Jul 20, 2026
Merged

em3s merged 1 commit into
mainfrom
refactor/edge-mutation-strategy-keybased

Conversation

@em3s

@em3s em3s commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Behavior-preserving refactor of EdgeMutationStrategy. Edge and Vertex both resolve directedSource/directedTarget straight from the state key and produce no update-count records — Vertex previously delegated to Edge.directedSource(...). Hoist that shared behavior into a KeyBased sub-interface so each object declares only what differs (producesCount). MultiEdge keeps its own property-based resolution.

No behavior change; splits cleanly out of the immutable-edge work (#433/#434).

Closes #

Changes

  • Add EdgeMutationStrategy.KeyBased providing the key-based directedSource/directedTarget and the no-op countRecordOnDelete (= after) / countRecordsOnUpdate (= empty) defaults.
  • Edge and Vertex now implement KeyBased, overriding only producesCount.
  • MultiEdge unchanged (custom resolution + conditional update counts).

How to Test

./gradlew :core:test --tests "com.kakao.actionbase.core.edge.mutation.*"

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Code

Edge and Vertex both resolve directedSource/directedTarget straight from the state
key, and neither produces update-count records — Vertex previously delegated to
Edge.directedSource. Hoist that shared behavior into a KeyBased sub-interface so each
object declares only what differs (producesCount). MultiEdge keeps its own resolution.
Behavior-preserving.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. maintenance Maintenance work. labels Jul 20, 2026
@em3s

em3s commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Optimistic

@em3s
em3s merged commit 5e9b4eb into main Jul 20, 2026
3 checks passed
@em3s
em3s deleted the refactor/edge-mutation-strategy-keybased branch July 20, 2026 10:43
@em3s em3s self-assigned this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance work. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant