Parent RFC: #254
Scope
Base class 抽取消除现有 ChannelRuntime 里的重复代码。
Deliverables
PerEntryDocumentProjector<TEntry, TDocument> (Aevatar.GAgents.Channel.Abstractions):
- 替代 3 个 verbatim projector:
AgentRegistryProjector / ChannelBotRegistrationProjector / DeviceRegistrationProjector
- Base class 负责 committed-state unpack、per-entry key/verdict loop、以及 upsert vs.
IProjectionWriteDispatcher.DeleteAsync dispatch
- 子类只保留
ExtractEntries + EntryKey + Materialize + optional Evaluate
- State-level tombstone retention(§7.1.1 watermark coordination):
ExtractEntries 返回 including tombstoned entries(不物理移除)
Evaluate 看 IsDeleted=true → 返 Tombstone
- Loop 在 Tombstone verdict 调
IProjectionWriteDispatcher.DeleteAsync
- Housekeeping job 清理 watermark 之前的 tombstoned entries
ISchedulable + ScheduleState(Aevatar.GAgents.Channel.Abstractions):
- 替代
SkillRunnerGAgent 和 WorkflowAgentGAgent 里的 scheduler 重复
- 组合不继承:
ISchedulable marker interface + ScheduleState data container + extension methods / shared runner
- 剩余代码只保留各自 GAgent 的状态转换、业务 dispatch 与 actor-specific glue
- 硬编码
Platform = "lark" 一起清理(见 SkillRunnerGAgent.cs:321 / WorkflowAgentGAgent.cs:263)
Out of scope (#260)
AgentRegistry → UserAgentCatalog 改名 → 独立 sub issue(9 个文件批量改 + caller 更新)
Acceptance
注:原先的 LOC 降幅(如 ≥ 40% / ≥ 70%)仅作为设计期的启发式目标,不再作为合并或关闭 issue 的硬性验收标准。验收以“重复控制流是否真正抽离、剩余代码是否主要为不可共享的领域语义、行为与测试是否成立”为准。
References
- RFC §7.1
PerEntryDocumentProjector<TEntry, TDocument>
- RFC §7.1.1 Tombstone retention 与 projector watermark 协调
- RFC §7.2
ISchedulable + ScheduleState
Dependencies
Parent RFC: #254
Scope
Base class 抽取消除现有
ChannelRuntime里的重复代码。Deliverables
PerEntryDocumentProjector<TEntry, TDocument>(Aevatar.GAgents.Channel.Abstractions):AgentRegistryProjector/ChannelBotRegistrationProjector/DeviceRegistrationProjectorIProjectionWriteDispatcher.DeleteAsyncdispatchExtractEntries+EntryKey+Materialize+ optionalEvaluateExtractEntries返回 including tombstoned entries(不物理移除)Evaluate看IsDeleted=true→ 返TombstoneIProjectionWriteDispatcher.DeleteAsyncISchedulable+ScheduleState(Aevatar.GAgents.Channel.Abstractions):SkillRunnerGAgent和WorkflowAgentGAgent里的 scheduler 重复ISchedulablemarker interface +ScheduleStatedata container + extension methods / shared runnerPlatform = "lark"一起清理(见SkillRunnerGAgent.cs:321/WorkflowAgentGAgent.cs:263)Out of scope (#260)
AgentRegistry → UserAgentCatalog改名 → 独立 sub issue(9 个文件批量改 + caller 更新)Acceptance
PerEntryDocumentProjector主循环与 verdict dispatch;子类仅保留领域相关的ExtractEntries/EntryKey/Materialize/EvaluateState-level tombstone retention与 watermark-driven housekeeping 已端到端完成References
PerEntryDocumentProjector<TEntry, TDocument>ISchedulable+ScheduleStateDependencies
IProjectionWriteDispatcher.DeleteAsync), [Channel RFC] Core abstractions package (Aevatar.GAgents.Channel.Abstractions) #257(接口定义)