Skip to content

feat: 流程事件统一走 FlowEventPublisher,保证提交后投递与按流程串行 - #276

Merged
xlorne merged 1 commit into
devfrom
feature/issue-274-event-ordered
Nov 16, 2026
Merged

xlorne merged 1 commit into
devfrom
feature/issue-274-event-ordered

Conversation

@xlorne

@xlorne xlorne commented Nov 16, 2026

Copy link
Copy Markdown
Contributor
  • 新增 IFlowEventPublisher SPI 与 FlowEventPublisher 门面;IFlowEvent 增加 eventKey() 分区键(默认 processId)
  • 引擎内全部事件推送点由 EventPusher 收敛到 FlowEventPublisher,未注册实现时自动回退,行为不变
  • starter 新增 SpringFlowEventPublisher:事务 afterCommit 投递(回滚不投递)、按 eventKey 分区单线程串行、 同步执行 handler 以获得确定顺序、单 handler 异常不影响后续事件
  • 新增配置 codingapi.flow.event.ordered(默认开启)
  • 补充发布门面与发布器单元测试,更新事件集成文档与 AGENTS.md

Closes #274

- 新增 IFlowEventPublisher SPI 与 FlowEventPublisher 门面;IFlowEvent 增加 eventKey() 分区键(默认 processId)
- 引擎内全部事件推送点由 EventPusher 收敛到 FlowEventPublisher,未注册实现时自动回退,行为不变
- starter 新增 SpringFlowEventPublisher:事务 afterCommit 投递(回滚不投递)、按 eventKey 分区单线程串行、
  同步执行 handler 以获得确定顺序、单 handler 异常不影响后续事件
- 新增配置 codingapi.flow.event.ordered(默认开启)
- 补充发布门面与发布器单元测试,更新事件集成文档与 AGENTS.md

Closes #274
@xlorne
xlorne merged commit fb069ad into dev Nov 16, 2026
1 check passed
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.74419% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.32%. Comparing base (b42a66e) to head (d5376c4).
⚠️ Report is 4 commits behind head on dev.

Files with missing lines Patch % Lines
...codingapi/flow/event/SpringFlowEventPublisher.java 83.33% 5 Missing and 3 partials ⚠️
...a/com/codingapi/flow/event/FlowEventPublisher.java 90.90% 0 Missing and 1 partial ⚠️
...om/codingapi/flow/event/FlowRecordDeleteEvent.java 0.00% 1 Missing ⚠️
.../com/codingapi/flow/event/FlowRecordDoneEvent.java 0.00% 1 Missing ⚠️
...om/codingapi/flow/event/FlowRecordFinishEvent.java 0.00% 1 Missing ⚠️
...dingapi/flow/event/FlowRecordReduceAuditEvent.java 0.00% 1 Missing ⚠️
...om/codingapi/flow/event/FlowRecordRevokeEvent.java 0.00% 1 Missing ⚠️
...com/codingapi/flow/event/FlowRecordStartEvent.java 0.00% 1 Missing ⚠️
.../com/codingapi/flow/event/FlowRecordTodoEvent.java 0.00% 1 Missing ⚠️
.../com/codingapi/flow/event/FlowRecordUrgeEvent.java 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #276      +/-   ##
============================================
- Coverage     74.76%   74.32%   -0.45%     
- Complexity     1895     1939      +44     
============================================
  Files           238      262      +24     
  Lines          7717     7989     +272     
  Branches        903      925      +22     
============================================
+ Hits           5770     5938     +168     
- Misses         1502     1586      +84     
- Partials        445      465      +20     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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