Skip to content

skill: wakeup-check.sh META_JUDGE_DONE 取 tail -1 修 Phase 9 路由误判#1603

Open
loning wants to merge 5 commits into
auto-refact-devfrom
skill/2026-06-01_wakeup-check-judge-marker-tail
Open

skill: wakeup-check.sh META_JUDGE_DONE 取 tail -1 修 Phase 9 路由误判#1603
loning wants to merge 5 commits into
auto-refact-devfrom
skill/2026-06-01_wakeup-check-judge-marker-tail

Conversation

@loning
Copy link
Copy Markdown
Contributor

@loning loning commented May 31, 2026

摘要

wakeup-check.sh Step F 解析 META_JUDGE_DONE: marker 的方向 bug。

根因

Judge codex 在 reasoning 阶段可能多次输出 META_JUDGE_DONE: 假设(consensus → split / converge → consensus 等),最终决议是 log 中最后一次 marker。原代码:

marker=$(grep "^META_JUDGE_DONE:" "$judge_log" | head -1)

会取最早的假设 → controller 误判 phase。

实际事故(2026-06-01 本会话)

Issue First marker(head -1) Final marker(tail -1) 误派
#1577 r4 converge consensus implement 返 partial
#1601 r1 consensus split implement 返 partial(应做 split admin)
#1529 r1 consensus converge implement 返 partial(应派 r2 solver)

每个误判浪费 1 个 implement codex 时长 + 后续 controller 手工恢复 1-2 wakeup。

修法

grep ... | tail -1 取最终决议,与 reasoning 阶段假设隔离。1 行修。

验证

Per Auric

2026-06-01 "有bug必须修"

⟦AI:AUTO-LOOP⟧


追加 fix(2026-06-01): closes #1648 — dev_sync_daemon find_open_pr 区分 API 错误与无 PR(commit e5ba25b38)。防 rate-limit 时累积 orphan branch,清 17 个。

⟦AI:AUTO-LOOP⟧

per Auric 2026-06-01 '有bug必须修'.

根因:judge codex 在 reasoning 阶段可能多次输出 META_JUDGE_DONE 假设
(consensus → split / converge → consensus 等),最终决议是 log 中**最后**
一次 marker。原代码用 head -1 取最早假设 → controller 误判 phase。

实际事故(2026-06-01 本会话):
- #1577 r4 first marker=converge,实际 final=consensus(后续 implement 误派 partial)
- #1601 r1 first marker=consensus,实际 final=split(误派 implement 而非 split admin)
- #1529 r1 first marker=consensus,实际 final=converge(误派 implement)

修法:`grep META_JUDGE_DONE | tail -1` 取最终决议,与 reasoning 阶段假设隔离。

⟦AI:AUTO-LOOP⟧
per Auric 2026-06-01 '有bug必须修'.

根因:codex 在输出 reasoning 时偶尔以 git diff 上下文格式输出 marker(`+META_JUDGE_DONE:...`),
原 `^META_JUDGE_DONE:` anchor 会全部漏读 → controller 报 "judge crashed" 误重派。

实际事故(本会话):#1528 r1 judge log 含 `+META_JUDGE_DONE:split:...` (codex echo
artifact 时带 diff prefix),wakeup-check.sh 报 NO marker;手工 grep 才发现真 verdict。

修法:去 `^` anchor,改用 `grep -oE` 提取纯 marker,与 prefix 隔离。
和上次 head→tail 修法叠加:相同 PR / 同 1 行不动。

⟦AI:AUTO-LOOP⟧
@codecov
Copy link
Copy Markdown

codecov Bot commented May 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.77%. Comparing base (5d63d74) to head (e5ba25b).
⚠️ Report is 21 commits behind head on auto-refact-dev.

@@                 Coverage Diff                 @@
##           auto-refact-dev    #1603      +/-   ##
===================================================
+ Coverage            83.72%   83.77%   +0.04%     
===================================================
  Files                 1013     1013              
  Lines                68260    68172      -88     
  Branches              8825     8812      -13     
===================================================
- Hits                 57154    57113      -41     
+ Misses                7216     7178      -38     
+ Partials              3890     3881       -9     
Flag Coverage Δ
ci 83.77% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

loning added 3 commits June 1, 2026 12:54
per Auric 2026-06-01 '提pr都提草稿, 防止人工误合并'.

根因:Phase 8 reviewer 共识达成 + CI 绿前,maintainer 看到 cluster PR 可能误手动 merge 不完整 PR(reviewer reject demand 未修)。

修法:
- SKILL.md Phase 4b open PR: gh pr create --draft
- SKILL.md 新增 Hard rule 12:所有 controller PR --draft + gh pr ready chain merge
- controller_lib.sh open_pr_with_label: --draft
- controller_lib.sh merge_pr: 先 gh pr ready 再 gh pr merge
- dev_sync_daemon.py: reverse sync PR 用 --draft(forward 不 draft 以保 auto-merge)
- 标准 Auto-merge 流程 sample 加 gh pr ready 前置

⟦AI:AUTO-LOOP⟧
…ssue

per 2026-06-01 PR1643 事故:body 用小写 "closes #1507",原 grep -oE "Closes #" 漏匹配 → merge_pr 不 chain gh issue close → issue1507 仍 OPEN(controller 后续手动补 close)。

修法:grep -oiE "(closes|fixes|resolves) #[0-9]+" — case-insensitive + 覆盖 fixes/resolves 同义词。

⟦AI:AUTO-LOOP⟧
per Auric 2026-06-01 issue #1648: 今天累积 56 个 orphan reverse-sync branch。

根因:find_open_pr API 错误时返 (None, None),caller 误判"无 open PR"→ create_sync_pr 推 branch + 试开 PR(同样 rate-limited 失败)→ orphan branch 永驻 origin。

修法:
- find_open_pr API 错误时返 ("API_ERROR", None)
- sync_direction 见 "API_ERROR" 时 skip 本 tick,等下个 tick API 恢复
- forward/reverse 两个方向同时受益

closes #1648

⟦AI:AUTO-LOOP⟧
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant