diff --git a/pipeline_service/agent_loop.py b/pipeline_service/agent_loop.py index 8c794b4..77f3072 100644 --- a/pipeline_service/agent_loop.py +++ b/pipeline_service/agent_loop.py @@ -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 "" diff --git a/pipeline_service/bug_flow.py b/pipeline_service/bug_flow.py index f62f6c0..a3ee743 100644 --- a/pipeline_service/bug_flow.py +++ b/pipeline_service/bug_flow.py @@ -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}