fix(qa): 已覆盖正确性改为问题答案二元评估
build / build (push) Successful in 1m14s

已覆盖只允许正确或错误,未覆盖可待确认,缺引用不再阻止正确结论。
复用统一事务写入与不可变审计重评旧待确认,保留原问答和人工结论。
验证:全仓 make verify、真实隔离 PostgreSQL 全包与 race 回归通过。
This commit is contained in:
姚章浩
2026-10-24 16:47:09 +08:00
parent ce02ae4eef
commit 65653e5c01
19 changed files with 496 additions and 164 deletions
@@ -0,0 +1,23 @@
package qaopsquality
import (
"knowledge-governance/internal/dobotaiops"
"testing"
)
func TestUnansweredRecordsAreNotBusinessPending(t *testing.T) {
for _, coverage := range []string{"", "covered", "uncovered"} {
got := ProjectMasterWithEdits(View{}, map[string]string{"is_correct": "待确认"}, dobotaiops.CoverageCheck{Verdict: coverage}, nil).Effective.Correctness
expected := "pending"
if coverage == "" {
expected = ""
}
if got != expected {
t.Fatalf("coverage=%q correctness=%q expected=%q", coverage, got, expected)
}
}
got := ProjectMasterWithEdits(View{}, map[string]string{"is_correct": "待确认"}, dobotaiops.CoverageCheck{}, nil, dobotaiops.RecordFeedback{Down: 1})
if got.Effective.Correctness != "incorrect" {
t.Fatal("technical state bypassed active downvote")
}
}