Skip to main content

CHANGELOG.md

# Changelog

## [0.3.0] - 2026-06-01

Phase 19E — 增加 Workflow Runtime / AgentOps 测试支撑,服务
`cmdc_orchestrator 0.6.x` 企业 workflow runtime、Run Console、Trace Viewer
和 Approval Center contract test。

### Added

- **`CMDCTest.Workflow.Fixtures`** — 生成 WorkflowSpec、Run、NodeRun、RunEvent
  和 Gateway event fixture,用于 AgentOps contract test。
- **`CMDCTest.Workflow.FakeRunStore`** — shape-compatible fake
  `CMDCOrchestrator.RunStore`,覆盖 run/node/event/idempotency/claim/cursor
  pagination,但不在编译期依赖 `cmdc_orchestrator`。
- **`CMDCTest.Workflow.Assertions`** — workflow completed、node status、signal path、
  human_task、幂等 run 和 Gateway event shape 断言。

## [0.2.0] - 2026-05-31

Phase 18F — 增加 RAG / GraphRAG 测试支撑,服务 `cmdc_rag_arcana 0.5.x`
企业知识库、pipeline、GraphRAG 与 AgentOps 事件链路。

> 已发布到 hex.pm + hexdocs,checksum `70251147a7a85d97efbee54f1a19a65b0cb469cdb6b93459f80ae1860bfb47fc`。

### Added

- **`CMDCTest.RAG.Fixtures`** — 生成 `rag_search` / `rag_answer` /
  `rag_pipeline_answer` / `rag_graph_search` / `rag_graph_status` /
  `rag_ingest_status` JSON 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 backend `user_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_fn`
- **`CMDCTest.Plugin`** — `run_hook/3` 单元测 plugin + `default_ctx/1` Context 工厂
- **`CMDCTest.Plugin.Spy`** — 通过 anonymous handler 注入到 Agent Plugin Pipeline,无需 `:meck` 依赖
- **`CMDCTest.EventCapture`** — `start_capture/1` + `stop_capture/1` EventBus 订阅 helper
- **`CMDCTest.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_plugin` macro(推荐 `Spy` plugin 替代)
- ❌ Property-based testing 集成(用户自行配 stream_data)
- ❌ Tool 测试 helper(跟随 cmdc 主库 Tool behaviour 演进再加,v0.2+)

### Migration

新引入,无 migration。