fix(零消耗): paused项目两个tokens漏点
- failed_poller→handle_failed_task: paused项目跳过LLM决策(原每轮白烧) - bug_poller→pm_bug_confirm_run: JOIN sd_projects排除paused(原只看迭代状态) 三主poller(role/pm/qc)已排除paused;retrospective由pm_poller触发无漏点
This commit is contained in:
parent
36537b3297
commit
ae213b2f91
@ -3479,6 +3479,13 @@ async def handle_failed_task(task_id: str, project_id: str) -> dict:
|
||||
# 释放 SELECT 的元数据锁,防止连接回池后阻塞 DDL
|
||||
await sor.sqlExe("COMMIT", {})
|
||||
return {"status": "idle", "task_id": task_id}
|
||||
# paused 项目零消耗(2026-09-02):暂停 = 完全停摆,失败任务不判定不重跑,
|
||||
# 直接跳过(本函数后续有 LLM 决策调用,paused 项目每轮白烧 tokens)。
|
||||
_p = await sor.sqlExe(
|
||||
"SELECT status FROM sd_projects WHERE id=${pid}$", {"pid": project_id})
|
||||
await sor.sqlExe("COMMIT", {})
|
||||
if _p and getattr(_p[0], "status", "") == "paused":
|
||||
return {"status": "skipped_paused", "task_id": task_id}
|
||||
t = recs[0]
|
||||
title = getattr(t, "title", "") or ""
|
||||
role = getattr(t, "role", "") or ""
|
||||
|
||||
@ -414,9 +414,12 @@ async def bug_flow_poll_once(db):
|
||||
"""一轮完整的 bug 循环:PM 确认 open + 确定性流转(verified/fixed/confirmed)。"""
|
||||
async with db.sqlorContext("pipeline") as sor:
|
||||
# 1) open → PM 独立确认(按项目分组,只对有 open bug 的项目触发)
|
||||
# paused 项目零消耗(2026-09-02):暂停 = 完全停摆,open bug 不触发
|
||||
# PM LLM 确认(每轮白烧 tokens),恢复推进后下一轮自动继续确认。
|
||||
proj_rows = await sor.sqlExe(
|
||||
"SELECT DISTINCT i.project_id FROM sd_bugs b "
|
||||
"JOIN sd_iterations i ON b.iteration_id=i.id "
|
||||
"JOIN sd_projects p ON p.id=i.project_id AND p.status != 'paused' "
|
||||
"WHERE b.status='open' AND i.status='in_progress' LIMIT 20", {})
|
||||
await sor.sqlExe("COMMIT", {})
|
||||
confirm_sum = {"confirmed": 0, "rejected": 0, "skipped": 0}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user