diff --git a/app/question_gen/pipeline_v2.py b/app/question_gen/pipeline_v2.py index cc015bf..faec0bf 100644 --- a/app/question_gen/pipeline_v2.py +++ b/app/question_gen/pipeline_v2.py @@ -487,14 +487,10 @@ async def _process_one_slot( continue store.update_gates(item_id, report) - # 题型专属额外 gate - extra_results = strategy.extra_gates(candidate) - if any(r.verdict == GateVerdict.FAIL for r in extra_results): - prev_reason = "; ".join( - r.reason for r in extra_results if r.verdict == GateVerdict.FAIL - ) + if not report.passed: + prev_reason = report.reject_reason logger.info( - "slot {} 额外 gate 失败 (attempt {}/{}): {}", + "slot {} 门控失败 (attempt {}/{}): {}", slot.slot_id, attempt, config.retry_limit, @@ -502,10 +498,14 @@ async def _process_one_slot( ) continue - if not report.passed: - prev_reason = report.reject_reason + # 题型专属额外 gate(仅标准门通过后才执行) + extra_results = strategy.extra_gates(candidate) + if any(r.verdict == GateVerdict.FAIL for r in extra_results): + prev_reason = "; ".join( + r.reason for r in extra_results if r.verdict == GateVerdict.FAIL + ) logger.info( - "slot {} 门控失败 (attempt {}/{}): {}", + "slot {} 额外 gate 失败 (attempt {}/{}): {}", slot.slot_id, attempt, config.retry_limit,