Skip to content

Commit 19003ee

Browse files
committed
feat(verify): reality-based cross-reference (Wikidata) + promotion veto
1 parent f67a346 commit 19003ee

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

app/verify/promote.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,17 @@ def decide(
5858
*, band: str, source_urls: list[str], url_cache: dict[str, dict[str, Any]],
5959
crossref_decision: str | None,
6060
) -> PromotionDecision:
61+
# Reality veto: if an authoritative external source contradicts the record's
62+
# specs (e.g. release year mismatch), never promote — even a green record.
63+
# Accuracy must be reality-based; that's the whole point of verification.
64+
if crossref_decision == "contradict":
65+
return PromotionDecision(False, "crossref-contradict")
66+
# Reality confirm: external source agrees -> strongest promotion.
6167
if crossref_decision == "confirm":
6268
return PromotionDecision(True, "crossref-confirm")
69+
# Heuristic fallback where reality is silent: a green record (consistent +
70+
# complete + authoritative-source) whose source is live. green≈verified was
71+
# validated against the human-curated set, so this is a sound proxy.
6372
if band == "green" and has_live_authoritative_source(source_urls, url_cache):
6473
return PromotionDecision(True, "green+live-source")
6574
return PromotionDecision(False, "needs-confirmation")

0 commit comments

Comments
 (0)