package qaopsquality import ( "encoding/json" "knowledge-governance/internal/dobotaiops" "strings" "testing" ) func TestMasterProjectionUsesStoredLabelsWithoutPretendingTheyAreHumanReviews(t *testing.T) { v := View{State: "unreviewed", Effective: Fields{}} got := ProjectMaster(v, map[string]string{"coverage": "是", "is_correct": "否", "product_category": "MG400", "problem_type": "参数", "root_cause": "结果不清"}, dobotaiops.CheckMasterCoverage("已有资料", true)) wire, _ := json.Marshal(got) if !strings.Contains(string(wire), `"effective_source":"master-effective-fields-v1"`) { t.Fatal("master projection has no explicit versioned provenance for strict clients") } if got.Effective.Coverage != "covered" || got.Effective.Correctness != "incorrect" || got.Effective.ProductCategory != "MG400" || got.Effective.ProblemType != "参数" || got.Effective.RootCause != "结果不清" || got.State != "unreviewed" || got.LatestReview != nil { t.Fatalf("lost stored labels or fabricated human review: %+v", got) } }