#380: closed_label_reconciler run_once per-item fail-soft#384
Conversation
…elease-gate/wakeup-plan 倒计时投影,r4 minimal consensus) (#366)
* #104: host-portability — fold setup owner surface 进 codex-refactor-loop(HostWorkflowSpec 七面投影/non-admin merge/host-env release checks) * #363 fix r2: 补 host-required release checks fail-closed denial-path behavior tests(applied-2) * #363 fix r4: 补 missing/empty HOST_GITHUB_RELEASE_REQUIRED_CHECKS default-projection behavior test(applied-1)
* #337: 源码 English-only 契约系统性收敛 — test-only source-language guard + HOST_REFACTOR_COMMENT_POLICY default→none,删历史中文注释(r3 structural consensus) * #367 fix r2: source-language guard negative test 改走真实 scanner 入口(comment_findings/string_findings/scan_python_source_language),applied-1 * #367 fix r1: source-language guard 加 iterN/cluster refactor-history 负向覆盖 + 检测逻辑(applied-1,addr tests reject)
…ce contract + 3 solver prompt + source-regression;无新 module/parser/header) (#368)
…LICY + 删 workflow_spec ValidatedWorkflowSpec.as_dict dead alias(quality reject,applied-2)
run_once() 的 per-CLOSED-item apply_plan()/verify_plan() 改为 try/except RuntimeError fail-soft:失败打印 daemon-log 诊断(_format_failure)后 continue 下一 item,不再让单个 label-drift 的 closed item crash 整个 daemon tick(根因:80+ migration 前 legacy-only closed item 缺 canonical phase/human label,reconciler 按 #238 不能补 human label)。 解除 release-gate fresh_heartbeats 红信号。 - closed_label_reconciler.py: run_once per-item try/except RuntimeError + _format_failure - test_closed_label_reconciler.py: +2 fail-soft behavior test - test_runtime_exception_authorization_sources.py: daemon-log-only/fail-soft source-regression - SKILL.md / runtime-exceptions.md: per-item fail-soft 合同各补 1 句 design-consensus #380 r4 structural consensus(3/3)。HOST_REFACTOR_COMMENT_POLICY=none (rationale 在本 commit / PR body,源码不加 Refactor 注释)。全 suite 970 OK。
📊 当前状态 — review-gate r1(不需要人介入)
下一步自动会做:3 reviewer verdict + CI 绿 + mergeable → 真值表 reject=0 则 ready+merge 到 auto-refact-dev;有 reject → fix r2。merge 后解除 release-gate 🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
🤖 质量审查拒绝:PR 范围混入多条无关变更TL;DR
详细说明
从代码质量角度,这会让 review 噪声过大:一个小 daemon 修复下面带着多个独立政策/运行时合同变更,后续很难判断命名、复杂度、死代码和范围是否合理。建议保留 #380 相关文件和窄合同文档,其余主题拆分。 📎 完整 codex 原始输出(存档备查)pr: 384
|
🤖 Tests review approveTL;DR
详细说明我检查了三点: 新增行为是否有测试、测试是否只是 bump line-count、以及有没有新增 我在干净 PR worktree 跑过目标套件: 📎 完整 codex 原始输出(存档备查)pr: 384
|
🤖 架构审查: comment, #380 代码边界 OK 但 PR diff 需要收口TL;DR
详细说明#380 的核心改动是在 我保留 comment 的原因是 scope honesty:按 prompt 要求看的 📎 完整 codex 原始输出(存档备查)pr: 384
|
🤖 关闭:#380 已被 #370 在 dev/auto-refact-dev 上更彻底修复(本 PR 冗余)排查发现 #380 描述的 closed_label_reconciler crash-loop 已由 #370(
真因:本会话 daemon 仍 crash 是因为 controller 本地 checkout 落后 origin/dev 6 commits,跑的是 pre-#370 旧码。已 → 关闭本 PR(冗余),关闭 #380(已解决)。worktree/branch 清理。 🤖 controller status banner ⟦AI:AUTO-LOOP⟧ |
摘要
修复 #380:
closed_label_reconcilerdaemon 的 crash-loop ——run_once()对每个 CLOSED managed item 调apply_plan()/verify_plan(),任一抛RuntimeError(缺 canonical phase/human label)即让整个 daemon tick 崩溃,导致进程退出→重启→再崩,release-gate的fresh_heartbeats信号长期红。run_once()per-item apply/verify 无异常隔离,单个 label-drift 的 closed item 抛RuntimeErrorcrash 整 tick。try/except RuntimeErrorfail-soft —— 失败时打印closed-label-reconciler failed: <kind> #<number> terminal=<label> error=<message>(_format_failure)后continue下一 item;live_plan is None的 stale skip 语义保持;daemon-log-only,不新增 label bootstrap、issue/PR lifecycle、generic gh-label/gh-edit、pending-event 或任何 durable alert/authority surface。根因:仓库有 80+ migration 前 legacy-only CLOSED item 只带 emoji legacy label,缺 canonical phase/human;reconciler 按 #238 不能补 human label,故 verify 必抛 → fail-soft 是正解(逐个跳过而非崩溃)。
范围
5 文件 +133/-8:
closed_label_reconciler.py:run_once()per-item try/except RuntimeError +_format_failuretest_closed_label_reconciler.py:+2 fail-soft behavior test(missing-canonical-label / post-edit-invariant 均 continue)test_runtime_exception_authorization_sources.py:daemon-log-only / fail-soft / no pending-event / no label-bootstrap source-regression tokenSKILL.md/authorizations/runtime-exceptions.md:Closed issue/PR phase-label reconciliation is detected by peek but never auto-applied — stale crnd:phase:* labels accumulate #238 per-item fail-soft 合同各补 1 句全 suite 970 tests OK(278s,skipped=1)。
HOST_REFACTOR_COMMENT_POLICY=none:源码不加# Refactor注释,rationale 在 commit/PR body。共识
design-consensus #380 r4 structural 3/3 consensus(minimal/structural/delete 三 solver 一致 propose,meta-judge 仲裁 consensus;完整推理见本 issue #380 上方各 solver/meta-judge 评论)。落地后解除
release-gate fresh_heartbeats红信号 —— v1.0.0-beta.6 最后一个 blocker。Closes #380
🤖 Auto-loop / codex-refactor-loop
⟦AI:AUTO-LOOP⟧