@@ -113,38 +113,30 @@ def test_write_back_atomic_lf_preserved():
113113# --- promotion decision ----------------------------------------------------------
114114
115115
116- def test_green_with_live_t1_promotes ():
117- cache = {"https://en.wikipedia.org/wiki/X" : {"alive" : True }}
118- d = promote .decide (
119- band = "green" , source_urls = ["https://en.wikipedia.org/wiki/X" ],
120- url_cache = cache , crossref_decision = None ,
121- )
122- assert d .promote and d .reason == "green+live-source"
116+ def test_green_promotes ():
117+ # green = passed the offline inspection -> verified. The live-source state no
118+ # longer gates (green already requires a cited authoritative source).
119+ d = promote .decide (band = "green" , source_urls = [], url_cache = {}, crossref_decision = None )
120+ assert d .promote and d .reason == "green"
123121
124122
125- def test_green_with_live_t2_promotes ():
126- # A reputable T2 spec/benchmark DB (cpubenchmark) that is alive also promotes.
127- cache = {"https://www.cpubenchmark .net/cpu.php?id=1 " : {"alive" : True }}
123+ def test_green_promotes_regardless_of_source_liveness ():
124+ # Even with a dead / unchecked source, a green record promotes.
125+ cache = {"https://www.phonedb .net/x " : {"alive" : False }}
128126 d = promote .decide (
129- band = "green" , source_urls = ["https://www.cpubenchmark .net/cpu.php?id=1 " ],
127+ band = "green" , source_urls = ["https://www.phonedb .net/x " ],
130128 url_cache = cache , crossref_decision = None ,
131129 )
132- assert d .promote and d .reason == "green+live-source "
130+ assert d .promote and d .reason == "green"
133131
134132
135- def test_green_with_only_t3_source_held ():
136- # kaggle (T3) alive is NOT enough to promote even if green.
137- cache = {"https://www.kaggle.com/x" : {"alive" : True }}
138- d = promote .decide (
139- band = "green" , source_urls = ["https://www.kaggle.com/x" ],
140- url_cache = cache , crossref_decision = None ,
141- )
133+ def test_yellow_without_confirm_holds ():
134+ d = promote .decide (band = "yellow" , source_urls = [], url_cache = {}, crossref_decision = None )
142135 assert not d .promote
143136
144137
145- def test_green_without_live_source_blocked ():
146- d = promote .decide (band = "green" , source_urls = ["https://en.wikipedia.org/wiki/X" ],
147- url_cache = {}, crossref_decision = None )
138+ def test_red_holds ():
139+ d = promote .decide (band = "red" , source_urls = [], url_cache = {}, crossref_decision = None )
148140 assert not d .promote
149141
150142
@@ -154,18 +146,10 @@ def test_yellow_with_crossref_confirm_promotes():
154146
155147
156148def test_crossref_contradict_vetoes_even_green ():
157- # Reality veto: a green record with a live source is NOT promoted if an
158- # authoritative source contradicts its specs.
159- cache = {"https://en.wikipedia.org/wiki/X" : {"alive" : True }}
149+ # Reality veto: a green record is NOT promoted if an authoritative external
150+ # source contradicts its specs (release-year mismatch).
160151 d = promote .decide (
161152 band = "green" , source_urls = ["https://en.wikipedia.org/wiki/X" ],
162- url_cache = cache , crossref_decision = "contradict" ,
153+ url_cache = {} , crossref_decision = "contradict" ,
163154 )
164155 assert not d .promote and d .reason == "crossref-contradict"
165-
166-
167- def test_dead_t1_does_not_promote ():
168- cache = {"https://en.wikipedia.org/wiki/X" : {"alive" : False }}
169- d = promote .decide (band = "green" , source_urls = ["https://en.wikipedia.org/wiki/X" ],
170- url_cache = cache , crossref_decision = None )
171- assert not d .promote
0 commit comments