package qaopsquality import "knowledge-governance/internal/dobotaiops" // Stored master labels remain their original provenance, not synthetic reviews. func ProjectMaster(v View, stored map[string]string, derived dobotaiops.CoverageCheck) View { v.EffectiveSource = "master-effective-fields-v1" if v.State != "reviewed" { v.Effective.Coverage = map[string]string{"是": "covered", "否": "uncovered", "部分覆盖": "partial", "待确认": "pending"}[stored["coverage"]] if v.Effective.Coverage == "" { v.Effective.Coverage = derived.Verdict } v.Effective.Correctness = map[string]string{"是": "correct", "否": "incorrect", "待确认": "pending"}[stored["is_correct"]] } if v.Effective.ProductCategory == "" { v.Effective.ProductCategory = stored["product_category"] } if v.Effective.ProblemType == "" { v.Effective.ProblemType = stored["problem_type"] } if v.Effective.RootCause == "" && v.Effective.Correctness != "correct" { v.Effective.RootCause = stored["root_cause"] } if v.Effective.Correctness == "correct" { v.Effective.RootCause = "" } return v }