fix: delegate MailData id generation to framework - #5
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthrough
ChangesID initialization refactor
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
#8) * test: assert MailData id is null and receivers correct on recall broadcast Strengthens the existing verify(times(2)) into an ArgumentCaptor check, so the test actually pins the behaviour #5 introduced (id generation delegated to the framework) rather than only counting insert calls. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HzTkgBjRdaTcLrbvkoaFkp * fix: declare api-version 621 to match the symbols this module needs This module's bytecode references DataOperator.insert / update(T) with the BaseDataEntity descriptors introduced in UltiTools-API 6.2.1, but plugin.yml still declared 620. PluginManager.isUltiToolsVersionCompatible only reads api-version -- the pom pin is provided scope and never reaches runtime -- so a server on framework 6.2.0 admits this JAR and then throws NoSuchMethodError on the first data access. 621 is measured, not estimated: a per-symbol comparison of the built JAR against 6.2.0 and 6.2.1 reports missing symbols for the former and none for the latter. No release is cut for this on its own; the corrected floor rides out with this module's next real release, which is MAJOR under the module versioning rules. Refs UltiKits/UltiTools-Reborn#284 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HzTkgBjRdaTcLrbvkoaFkp * docs: state the runtime minimum as 6.2.1 in README Raising plugin.yml's api-version to 621 makes the README actively harmful: it tells a server owner to install UltiTools-API 6.2.0, which the framework compatibility check will now refuse. The documented minimum has to move with the manifest floor. Only statements of the runtime requirement are touched. Sentences that record which API generation this module migrated to are history and stay at 6.2.0. Refs UltiKits/UltiTools-Reborn#284 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HzTkgBjRdaTcLrbvkoaFkp --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary
MailDataconstructorid == nullMailDataTestdefault-id assertions to match delegated id generationWhy
System.currentTimeMillis()can collide during bulk/broadcast mail creation in the same millisecond, causing duplicate primary keys in relational storage or overwrite risk in JSON storage.Test Plan
mvn -B -Dtest=MailDataTest test— BUILD SUCCESS, 57 tests, 0 failures, 0 errorsmvn -B package— BUILD SUCCESS, 459 tests, 0 failures, 0 errors, 11 skippedScope
Summary by CodeRabbit
Tests
Refactor