新增 chat_summaries 迁移。数据库写失败会返回错误并标明仅本进程可见。test_manager 血缘改用文档版本,不再写死 1。 Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
456 B
Go
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)
|
|
}
|
|
}
|