Skip to content

fix: declare api-version 621, and pin the recall id behaviour in tests - #8

Merged
wisdommen merged 3 commits into
masterfrom
fix/api-version-621
Aug 15, 2026
Merged

fix: declare api-version 621, and pin the recall id behaviour in tests#8
wisdommen merged 3 commits into
masterfrom
fix/api-version-621

Conversation

@wisdommen

@wisdommen wisdommen commented Aug 15, 2026

Copy link
Copy Markdown
Member

两件事,都很小,都属于本仓库。

1 · api-version 620 → 621

UltiMail-1.1.0.jar 的字节码引用了 DataOperator.getById / insert / update(T) 在 UltiTools-API 6.2.1 才有的 BaseDataEntity 描述符(三个符号,是受影响模块里最多的),但 plugin.yml 声明的地板还是 620

PluginManager.isUltiToolsVersionCompatible 只读 api-version —— pom.xml 的 pin 是 provided scope,不进 JAR,运行时框架看不到它。所以装了框架 6.2.0 的服务器会放行这个 JAR,然后在第一次读写邮件时 NoSuchMethodError。Java 惰性解析,从不发邮件的服主今天还看不出来。

621 是算出来的:产物逐符号比对 6.2.0 缺 3 个、比对 6.2.1 缺 0 个。

根因与全量实测见 UltiKits/UltiTools-Reborn#284不为此单独发版,修正后的地板随下次真正发布带出,那一版按模块版本号规范(api-version 抬高即 MAJOR)是 MAJOR。

2 · 把 #5 的行为真正钉进测试

RecallCommandTest 里原来只断言 verify(mailOp, times(2)).insert(any()) —— 它只数了调用次数,#5「把 id 生成交还框架」这个行为本身没有任何测试守着。改成 ArgumentCaptor 之后,捕获的实体会被断言 getId() 为 null、收件人 UUID 正确。

这段是 #5 那次遗留在工作树里、没跟着合进去的补强。

验收

  • api-version: 621pom.xml 未改动
  • RecallCommandTest 43 个用例本地全绿

🤖 Generated with Claude Code

https://claude.ai/code/session_01HzTkgBjRdaTcLrbvkoaFkp

Summary by CodeRabbit

  • Compatibility

    • Updated the plugin API version to support the latest platform release.
  • Tests

    • Strengthened mail recall coverage for multiple offline recipients.
    • Added validation that newly created mail records have the expected recipients and unassigned identifiers.

wisdommen and others added 2 commits August 16, 2026 09:11
…dcast

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
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
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@wisdommen, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 321e8b7d-b08d-49c8-8ba0-0514a14c58cf

📥 Commits

Reviewing files that changed from the base of the PR and between 84b1c54 and b843d79.

📒 Files selected for processing (1)
  • README.md

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 86a2e28a-52e2-4de4-871c-bfd1f444d9bc

📥 Commits

Reviewing files that changed from the base of the PR and between cd439e5 and 84b1c54.

📒 Files selected for processing (2)
  • src/main/resources/plugin.yml
  • src/test/java/com/ultikits/plugins/mail/commands/RecallCommandTest.java

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The plugin API version changes from 620 to 621. The recall command test now verifies inserted mail record IDs and receiver UUIDs for two offline players.

Changes

Plugin configuration and recall validation

Layer / File(s) Summary
API declaration and recall insert validation
src/main/resources/plugin.yml, src/test/java/com/ultikits/plugins/mail/commands/RecallCommandTest.java
The plugin targets API version 621. The recall test captures both inserted MailData objects and verifies their null IDs and expected receiver UUIDs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 84b1c

This change updates the declared API floor and strengthens recall behavior tests; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both the API version update and the strengthened recall ID behavior tests.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/api-version-621

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.

❤️ Share

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

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
@wisdommen
wisdommen merged commit ee6fa1e into master Aug 15, 2026
7 checks passed
@wisdommen
wisdommen deleted the fix/api-version-621 branch August 15, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant