@@ -62,7 +62,7 @@ def test_normalizes_health_scores_and_review_evidence(self):
6262 self .assertEqual (payload ["data_status" ], "ready" )
6363 self .assertEqual (payload ["summary" ]["healthy" ], 1 )
6464 self .assertEqual (strategy ["review" ]["requested_stage" ], "shadow_candidate" )
65- self .assertEqual (strategy ["decision" ]["code" ], "auto_advance " )
65+ self .assertEqual (strategy ["decision" ]["code" ], "canary_eligible " )
6666 self .assertEqual (strategy ["freshness" ]["status" ], "unknown" )
6767 self .assertEqual (strategy ["source_revision" ], "https://example.invalid/revisions/rev-1" )
6868 self .assertEqual (strategy ["review" ]["evidence_package_id" ], "https://example.invalid/evidence-1" )
@@ -272,6 +272,23 @@ def test_healthy_live_candidate_still_waits_for_human(self):
272272
273273 self .assertEqual (payload ["strategies" ][0 ]["decision" ]["code" ], "human_live_gate" )
274274
275+ def test_critical_status_never_claims_an_unconfirmed_broker_pause (self ):
276+ with tempfile .TemporaryDirectory () as tmp :
277+ health = Path (tmp ) / "health.json"
278+ health .write_text (json .dumps ({"strategies" : [{
279+ "strategy_profile" : "critical_strategy" ,
280+ "domain" : "us_equity" ,
281+ "status" : "critical" ,
282+ "overall_score" : 12 ,
283+ }]}), encoding = "utf-8" )
284+
285+ payload = build_payload (health_file = health )
286+
287+ decision = payload ["strategies" ][0 ]["decision" ]
288+ self .assertEqual (decision ["code" ], "pause_request_pending_confirmation" )
289+ self .assertIn ("待实际运行时确认" , decision ["label" ])
290+ self .assertNotIn ("已停单" , decision ["reason" ])
291+
275292
276293if __name__ == "__main__" :
277294 unittest .main ()
0 commit comments