Files
Agent-System/internal/bizdev/lineage_version_test.go
T
weichenandCursor 848a0457a0 fix(chat): stop treating failed summary writes as durable
新增 chat_summaries 迁移。数据库写失败会返回错误并标明仅本进程可见。test_manager 血缘改用文档版本,不再写死 1。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 04:02:41 +00:00

20 lines
456 B
Go

package bizdev
import (
"testing"
"chat-agent-system/internal/docgov"
)
func TestLineageVersion_UsesDocumentVersion(t *testing.T) {
if got := lineageVersion(nil); got != 1 {
t.Fatalf("missing document version = %d", got)
}
if got := lineageVersion(&docgov.DocumentRecord{}); got != 1 {
t.Fatalf("zero version = %d", got)
}
if got := lineageVersion(&docgov.DocumentRecord{Version: 4}); got != 4 {
t.Fatalf("recorded version = %d", got)
}
}