主题
director_heal
POST /director/heal
接口说明
自愈闭环:review → fix → 复审循环,最多 3 轮。三道刹车——轮数上限 / no_progress(这轮没修掉任何 error)/ loop_detected(同样的 patch 反复出现)。过门判据 = error 数归零且 issue 总数不再增加,每轮写 heal_log。
参数
| 参数 | 必填 | 默认值 | 说明 |
|---|---|---|---|
draft_id | 是 | — | 要自愈的草稿 |
max_rounds | 否 | 3 | 最多几轮(服务端常量上限 3) |
patch_level | 否 | safe | safe / unsafe / all |
include_unsafe | 否 | false | 是否把 unsafe 档也算进可修范围 |
patch_overrides | 否 | — | 按请求改档位 |
rollback_on_failure | 否 | true | 这轮没进展就回滚这轮的改动 |
返回
rounds[]:每轮修了什么、issue 数怎么变stop_reason:converged / max_rounds / no_progress / loop_detected