From 396461065bd44424862233ff6e9892a1217969c6 Mon Sep 17 00:00:00 2001 From: lili Date: Fri, 3 Jul 2026 20:15:05 -0700 Subject: [PATCH] =?UTF-8?q?chore(cheap):=20smoke=20FAIL=20=E6=89=93?= =?UTF-8?q?=E5=8D=B0=20raw=20=E5=B0=BE(bake=5Foff=20=E5=B9=B6=E5=8F=91?= =?UTF-8?q?=E4=BA=89=E7=94=A8=E8=87=B4=20100%=20=E5=9B=9E=E9=80=80?= =?UTF-8?q?=E8=80=83=E5=8D=B7=E3=80=81=E7=9C=9F=E5=9B=A0=E8=A2=AB=E5=90=9E?= =?UTF-8?q?=E5=AE=9E=E8=AF=81)=E2=80=94=E2=80=94=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9C=9F=E5=9B=A0=E5=8F=AF=E8=A7=81=E7=BA=AA=E5=BE=8B=20(cutov?= =?UTF-8?q?er=20=E7=AA=97=E5=8F=A3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- cheap-worker/cheap_studio.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cheap-worker/cheap_studio.py b/cheap-worker/cheap_studio.py index 3e88326a..2b233038 100644 --- a/cheap-worker/cheap_studio.py +++ b/cheap-worker/cheap_studio.py @@ -91,6 +91,10 @@ def _closeout_gates(game_id, *, port, cdp_port) -> dict: sm = cheap_run.smoke(game_id, port=port, cdp_port=cdp_port) out["smoke_ok"] = sm["ok"] _rec(f"smoke {'PASS' if sm['ok'] else 'FAIL'}(抓 state 供 play-spec)") + if not sm["ok"]: + # smoke 失败真因必须可见(2026-07-04 bake_off 实证:并发争用致 100% FAIL→全场 key-cycle 回退考卷, + # 而失败原因被吞在 raw 里,烧掉一轮诊断)——打印 raw 尾供归因。 + _rec(f"smoke raw 尾:{(sm.get('raw') or '')[-300:]}") ps = cheap_run.ensure_play_spec(game_id, sm.get("state")) # driver 类型:本轮新产的直接带;复用旧 spec(hash 一致)时读盘补(spec 是判卷单一来源)。 dt = ps.get("driverType") @@ -312,6 +316,8 @@ async def run_studio(game_id, brief, *, max_iters=40, max_resumes=6, max_tokens= sm = cheap_run.smoke(game_id, port=port, cdp_port=cdp_port) smoke_ok = sm["ok"] _rec(f"smoke {'PASS' if smoke_ok else 'FAIL'}(抓 state 供 play-spec)") + if not smoke_ok: + _rec(f"smoke raw 尾:{(sm.get('raw') or '')[-300:]}") # 真因可见(同 _closeout_gates 注) _rec("generation-only(run_gates=False):跳过 ensure_play_spec + 九门 play,交对照方注入金标 spec 后单独 play") tok_in, tok_out = model.usage_sum() # 成本落盘(R4):token 台账始终可取(RecordingOpenAIChatModel.records 累计)。