Repository navigation
test(identity): 补齐身份边界用例并收口合并键/加签查重(#295) - #299
Merged
Merged
Conversation
- 待办合并键由匹配模式决定:USER_ONLY 按人合并(身份不进键),STRICT 保持 历史兼容追加格式,避免同一人出现两条重复待办 - 加签「是否已在待办队列」改由 OperatorIdentityPolicy 判定:USER_ONLY 下 同人换身份视为同一人,拒绝重复加签;STRICT 下仍按 (人, 身份) 区分 - 新增 OperatorIdentityBoundaryTest(13 例):撤回/催办、加签/减签、 转交与干预留痕、同人自动通过的 USER_ONLY / STRICT 双模式断言 - FlowSubProcessResetServiceTest 补 2 例:子流程重置的身份归属校验 - 同步 operator-identity.md 4.2 / 4.4 / 5.1 口径
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #299 +/- ##
============================================
+ Coverage 76.16% 76.19% +0.03%
- Complexity 2123 2124 +1
============================================
Files 282 282
Lines 8648 8651 +3
Branches 1027 1028 +1
============================================
+ Hits 6587 6592 +5
+ Misses 1552 1550 -2
Partials 509 509 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
issue #295 逐项核对后仍有 4 类身份缺口无用例(撤回/催办/子流程重置、加签减签、转交/干预落库、同人自动通过)。本轮除补用例,还收口了两处「按人 vs 按身份」不一致的实现。
改动
实现(2 处)
FlowRecord#getTodoKey():合并键改为由OperatorIdentityPolicy决定——USER_ONLY下身份不进键(按人合并,避免同一人出现两条重复待办),STRICT下保持历史兼容追加格式。AddAuditAction#verifyNotInTodoQueue:查重从「userId + identity复合键」改为OperatorIdentityPolicy.matches——USER_ONLY下同人换身份视为同一人,拒绝重复加签。用例(15 例)
OperatorIdentityBoundaryTest(13 例):forwardOperatorIdentity落库、同人换身份不记干预FlowSubProcessResetServiceTest补 2 例:子流程重置的身份归属校验。文档
docs/Integration/operator-identity.md:4.2 合并键改为按模式说明,4.4 覆盖面补加签查重,5.1 待办合并行标注模式。验证
./mvnw -o clean install:7 模块 SUCCESS,505 个用例 0 失败 0 跳过(framework 480 / starter-infra 6 / starter-api 2 / starter 10 / example 7),本轮新增 15 例。Closes #295