[0.2.0] - 2026-05-31
Phase 18F — 增加 RAG / GraphRAG 测试支撑,服务 cmdc_rag_arcana 0.5.x
企业知识库、pipeline、GraphRAG 与 AgentOps 事件链路。
Added
CMDCTest.RAG.Fixtures— 生成rag_search/rag_answer/rag_pipeline_answer/rag_graph_search/rag_graph_status/rag_ingest_statusJSON fixture,以及 RAG plugin event payload。CMDCTest.RAG.MockBackend— shape-compatible fake Arcana search/answer backend,避免 CI 依赖真实 Arcana DB / LLM。CMDCTest.RAG.MockGraphBackend— fake GraphStore backend,覆盖 graph info / tables / counts / evidence。CMDCTest.RAG.MockMaintenanceBackend— fake reembed 与 GraphRAG maintenance backend,支持 progress callback。CMDCTest.RAG.MockPipelineRunner— fake pipeline runner,返回 grounding 与 pipeline run summary。CMDCTest.RAG.MockStatusBackend— fake knowledge index status backend。CMDCTest.RAG.Policy— 一行生成 collection ACL、pipeline preset、 GraphRAG profile/policy 与 fake backenduser_data。CMDCTest.RAG.Assertions— citation、unauthorized source、grounding、 pipeline summary、GraphRAG evidence 与 raw text 泄漏断言。
Changed
- 新增直接依赖
jason ~> 1.4,供 RAG fixture/assertion JSON contract 使用。
[0.1.0] - 2026-05-18
首发版本 — 与 cmdc 主库 0.5.0 协同发布。
Added
CMDCTest.MockProvider— Builder API(new/0+respond/2+respond_tool_call/3+respond_error/2),导出to_provider_fn/1闭包给CMDC.Config.provider_fnCMDCTest.Plugin—run_hook/3单元测 plugin +default_ctx/1Context 工厂CMDCTest.Plugin.Spy— 通过 anonymous handler 注入到 Agent Plugin Pipeline,无需:meck依赖CMDCTest.EventCapture—start_capture/1+stop_capture/1EventBus 订阅 helperCMDCTest.Assertions—assert_event_emitted/3+refute_event_emitted/3+assert_event_count/4事件断言族, 内部 receive loop 不匹配事件自动 requeue 回 mailbox,不污染后续断言- 26 个单测 + 集成测全覆盖
v0.1 范围说明(明确不含)
- ❌ fixtures 库(v0.2)
- ❌
with_mock_pluginmacro(推荐Spyplugin 替代) - ❌ Property-based testing 集成(用户自行配 stream_data)
- ❌ Tool 测试 helper(跟随 cmdc 主库 Tool behaviour 演进再加,v0.2+)
Migration
新引入,无 migration。