Block publish when LLM rewrite quality degrades
This commit is contained in:
@@ -158,6 +158,13 @@ def run_stage0_to_stage7(
|
||||
guide_llm_call=guide_llm_call,
|
||||
)
|
||||
markdown, stage7_report = assemble_markdown(stage6_result["items"], stage6_result["guide"])
|
||||
upstream_blocking_errors: list[str] = []
|
||||
for stage_name in ("stage3", "stage4", "stage5", "stage6"):
|
||||
for error in stage6_result["reports"].get(stage_name, {}).get("blocking_errors", []) or []:
|
||||
upstream_blocking_errors.append(str(error))
|
||||
if upstream_blocking_errors:
|
||||
existing_errors = list(stage7_report.get("blocking_errors", []) or [])
|
||||
stage7_report["blocking_errors"] = existing_errors + upstream_blocking_errors
|
||||
reports = dict(stage6_result["reports"])
|
||||
reports["stage7"] = stage7_report
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user