feat(event): add multi-event and group lifecycle subscriptions#790
Open
wxianfeng wants to merge 17 commits into
Open
feat(event): add multi-event and group lifecycle subscriptions#790wxianfeng wants to merge 17 commits into
wxianfeng wants to merge 17 commits into
Conversation
# Conflicts: # .github/badges/coverage.svg
…m-phase3 # Conflicts: # internal/app/event_command.go # internal/app/event_personal_command.go # internal/cli/schema_agent_metadata/event.json # internal/cli/schema_agent_metadata/index.json # internal/cli/schema_agent_metadata_audit.json # internal/cli/schema_catalog.json # internal/cli/schema_hints/selection/event.json # internal/event/personal/registry_test.go # skills/mono/references/products/event.md # skills/multi/dingtalk-event/SKILL.md # skills/multi/dingtalk-event/references/event-im.md
…m-phase3 # Conflicts: # internal/cli/schema_agent_metadata/index.json # internal/cli/schema_agent_metadata_audit.json # internal/cli/schema_catalog.json # skills/mono/SKILL.md
PeterGuy326
reviewed
Jul 24, 2026
PeterGuy326
left a comment
Collaborator
There was a problem hiding this comment.
Gate decision
HOLD — 缺少 CHANGELOG [Unreleased] 条目。这是面向用户的功能变更(新增事件类型、多事件消费、群生命周期事件),按仓库规范必须有 CHANGELOG 条目或说明为何不需要。
Review provenance
- [PASS] PR head checked out locally:
e2390c338 - [PASS] Local HEAD matches remote PR head
- [PASS] Base revision:
97248bf7c - [PASS] Worktree clean before and after review
PR description completeness
- [PASS] D1 Requirement and problem — 描述了新增 all-message 订阅、群生命周期/成员事件、多事件消费、定向停止等需求
- [PASS] D2 Goal and expected behavior — 明确列出新增功能和预期行为
- [PASS] D3 Acceptance criteria — Risk tier + Verification 章节列出了可验证的测试命令
- [PASS] D4 Implementation summary — Summary 和 Notes 覆盖了关键变更
- [PASS] D5 Configuration and environment — 标注了 OS/arch、Go 版本、测试范围
- [PASS] D6 Exact test steps — 提供了具体可复制的测试命令
- [PASS] D7 Limitations — 明确标注未本地执行的项目
- [FAIL] D8 CHANGELOG
[Unreleased]entry — CHANGELOG.md 不在变更文件列表中,PR 描述也未说明为何不需要。新增 8 个 event key、多事件消费、定向 consumer stop 均为用户可见功能变更,需要在### Added下添加条目 - [PASS] D9 No sensitive info — diff、评论、描述中无敏感信息泄露
Author validation reproduction
| ID | Acceptance criterion | Result | Match |
|---|---|---|---|
| V1 | go test ./internal/event/... |
PASS (11 packages ok) | Yes |
| V2 | go test ./internal/app |
PASS (exit 0) | Yes |
| V3 | go test ./internal/cli |
PASS (19.4s, ok) | Yes |
| V4 | go test -tags skill_verify ./test/skill_static/... |
基线失败 (TestSkillCommandsDispatch 在 base 同样超时) |
N/A |
| V5 | check-generated-drift.sh |
PASS (ok) | Yes |
| V6 | check-schema-catalog.sh |
PASS (25 products, 603 tools) | Yes |
Conventional code review
- [PASS] Diff scope — 变更集中在 event 子系统,未触及无关模块
- [PASS] Error handling — 错误传播正确,cleanup LIFO 逆序,defer 到位
- [PASS] Concurrency —
run_many.gogoroutine 管理和 context 取消正确;StopCh+ daemon writer 的 targeted stop 模式安全 - [PASS] Security — 无明显注入点、凭据泄露或权限问题
- [PASS] Backward compatibility — 定向 stop 通过
ErrConsumerStopUnsupported降级到旧版 signal;transport envelope 保持兼容 - [PASS] Test coverage — 新增测试 1600+ 行覆盖多事件消费、定向 stop、新事件类型输出、filter 验证
- [PASS] Static analysis —
go vet干净,Schema 生成无漂移,编译零错误
Non-blocking observations
dedupePersonalEventKeys在event_command.go:156和runPersonalEventConsume:212被重复调用,冗余但无害GroupLifecycleEventOutput.Payload为map[string]any是保守策略,注释说明了原因- 生产 URL 切换是本次最大风险点,建议确认生产 Stream/Control endpoint 已支持新事件类型
closeSessions会对已关闭的连接再次 close,安全但建议加注释说明
Summary
代码质量和测试覆盖都很好,架构设计干净。补上 CHANGELOG 条目后可以合并。
PeterGuy326
approved these changes
Jul 25, 2026
PeterGuy326
left a comment
Collaborator
There was a problem hiding this comment.
CHANGELOG entry looks good. Approved.
…ion test - Add missing ## [Unreleased] heading required by Policy CI check - Update npm test assertion (12 → 60) to match extended propagation wait
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.
Summary
event_type + subscribe_idisolation.Risk tier
Verification
CHANGELOG.md-only check: N/AGOWORK=off go test ./internal/event/... ./internal/app ./internal/cliPATH="$PWD:$PATH" GOWORK=off go test -tags skill_verify ./test/skill_static/..../scripts/policy/check-generated-drift.sh./scripts/policy/check-schema-catalog.sh(25 products, 603 tools)./scripts/policy/check-command-surface.sh --strict: not run locally./scripts/release/verify-package-managers.sh: N/ANotes
--flatten.sourceIdremainsopen.