Skip to content

fix(#149): router marker parser 修复(终结 dispatch-gap)#153

Merged
loning merged 1 commit into
auto-refact-devfrom
refactor/issue149-router-marker-parser
May 28, 2026
Merged

fix(#149): router marker parser 修复(终结 dispatch-gap)#153
loning merged 1 commit into
auto-refact-devfrom
refactor/issue149-router-marker-parser

Conversation

@loning
Copy link
Copy Markdown
Contributor

@loning loning commented May 28, 2026

Phase 9 r2 consensus(structural)。route-specific marker-grammar parser fix(无 Phase9RoundProjection):router 可靠解析含中文收敛问题的 judge/route marker → 可靠 dispatch triplet judge/converge,终结 controller-fallback toil(本会话 no-gap churn 根因)。Closes #149

⟦AI:AUTO-LOOP⟧

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@loning loning added auto-loop codex-refactor-loop 管理的 issue/PR 👀 phase:reviewing labels May 28, 2026
@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 28, 2026

🤖 质量审查通过:router marker parser 改动聚焦

TL;DR

  • 这是什么: PR 153 的 readability / simplicity 角度独立 review。
  • 结论: approve,没有发现命名、死代码、过度抽象、复杂度或无关改动问题。
  • 下一步: controller 可把该质量 reviewer 结果计入 review gate。

详细说明

这次改动把原来的 ASCII payload gate 改成 ,也就是一组 route-specific marker 解析规则。这个命名贴近 Phase 9 router 的业务语义,新增方法都很短,并且分别被 和 调用,不是挂空的 helper。

新增测试覆盖了中文 summary / reason、跨 tick triplet、合法 converge 与 source-regression 检查。范围集中在 router marker parser,没有看到 unrelated cleanup。Refactor Old/New 自说明也存在且能读懂,不是 形式的占位。


📎 完整 codex 原始输出(存档备查)
---
pr: 153
role: quality
verdict: approve
---

## Verdict
Approve: the router marker parser change is focused, readable, and does not introduce dead code or unnecessary abstraction from a quality perspective.

## Evidence
- `skills/codex-refactor-loop/scripts/phase9_router_daemon.py:53` introduces `Phase9MarkerGrammar`, a domain-specific parser name that describes the business intent better than the removed generic payload regex.
- `skills/codex-refactor-loop/scripts/phase9_router_daemon.py:61` keeps the parser entrypoint small and routes to tiny helpers; the new methods are reachable from `_extract_marker` and `_round_from_converge`.
- `skills/codex-refactor-loop/scripts/phase9_router_daemon.py:54` and `skills/codex-refactor-loop/scripts/phase9_router_daemon.py:253` include the required Refactor Old/New self-doc blocks, and they are specific enough to explain the parser bug and the intended route-specific fix without relying on a `see issue #X` placeholder.
- `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:168`, `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:279`, and `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:672` add focused behavior/source-regression coverage for the new grammar without unrelated cleanup.

⟦AI:AUTO-LOOP

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 28, 2026

🤖 架构审查通过:router marker parser 仍在窄 daemon 边界内

TL;DR

  • 这是什么:PR fix(#149): router marker parser 修复(终结 dispatch-gap) #153 修 Phase 9 router marker parser,让中文 summary/reason 不再被整条 ASCII gate 误拒。
  • 结论:architect 角度 approve,没有发现 CLAUDE.md/AGENTS.md 架构回归。
  • 下一步:controller 可继续收集其他 reviewer 结果,本角色无阻塞项。

详细说明

这次 diff 只改 skills/codex-refactor-loop/scripts/phase9_router_daemon.pyskills/codex-refactor-loop/scripts/test_phase9_router_daemon.py,与 issue #149 consensus/implement artifact 的 scope 一致。

架构上新增的 Phase9MarkerGrammar 是 daemon 内部 helper,只把现有 SOLVER_DONEMETA_JUDGE_DONE:converge、stalled marker 的 grammar 收窄到 route-specific parser。它没有新增生命周期权限、没有新增 schema/protocol 文件、没有新增第二 routing 系统,也没有引入 Phase9RoundProjection

行为和 source-regression 都落在同一个测试文件里:中文 solver summary、跨 tick triplet、中文 converge reason、regex/prompt echo 拒绝、禁止旧 ASCII payload gate 回归。符合 CLAUDE.md 里“变更必须可验证”和 narrow allowlist daemon 的要求。


📎 完整 codex 原始输出(存档备查)

pr: 153
role: architect
verdict: approve

Verdict

approve: PR #153 keeps the Phase 9 router fix inside the existing narrow daemon path and does not introduce a new protocol, lifecycle actor, or parallel routing system.

Evidence

  • skills/codex-refactor-loop/scripts/phase9_router_daemon.py:53: the new Phase9MarkerGrammar is a private helper inside the existing Phase 9 router daemon, matching CLAUDE.md:「单一主干,插件扩展:每个 skill 一条权威主链路;新能力以子模块/脚本挂载,禁止平行第二系统。」
  • skills/codex-refactor-loop/scripts/phase9_router_daemon.py:54: the helper carries explicit Old/New refactor self-documentation for issue bug: phase9_router_daemon 不可靠 dispatch triplet judge(alive+lease-fresh 仍漏派,#143 之外的 dispatch-logic gap) #149, satisfying the prompt's Old/New pattern requirement.
  • skills/codex-refactor-loop/scripts/phase9_router_daemon.py:62: parsing stays route-specific for existing SOLVER_DONE, META_JUDGE_DONE:converge, and stalled markers; it does not add lifecycle authority, preserving CLAUDE.md:「任何 controller-runtime 例外必须 narrow allowlist + no lifecycle authority by default」.
  • skills/codex-refactor-loop/scripts/phase9_router_daemon.py:252: _extract_marker now delegates candidate validation to the route grammar, while the existing tail-only scan, placeholder/echo filter, filename identity allowlist, ledger, and in-flight suppression remain in the same daemon path. This maps to CLAUDE.md:「可机械化、状态确定的部分可经多角度共识授权后下沉为 narrow allowlist daemon。」
  • skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:168, skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:184, and skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:279: behavior coverage pins the Unicode solver summary, cross-tick triplet, and Unicode converge reason cases, matching CLAUDE.md:「变更必须可验证:行为约束必须落到机械验证手段(behavior test / source-regression test / 段落 lint);仅靠"agent 应该记得"承载的约束视为未落地。」
  • skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:624: the junk-marker regression keeps regex/prompt echoes rejected after Unicode payload acceptance, preserving the existing narrow marker boundary instead of opening a broad fallback path.
  • skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:651 and skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:672: source-regression assertions keep forbidden controller abstractions, git/PR lifecycle commands, Phase9RoundProjection, and the old whole-marker ASCII gate out of the daemon, matching CLAUDE.md:「抽象一旦能被滥用即设计未完成:允许绕过审查边界、merge gate、CLAUDE.md 修宪门槛的通用机制必须继续收窄。」
  • Scope honesty: the diff changes only skills/codex-refactor-loop/scripts/phase9_router_daemon.py and skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py, which are the paths declared in .refactor-loop/runs/phase9-issue149-r2-judge.md and .refactor-loop/runs/implement-issue-149.md. No SKILL.md, manifest, host config, external repo reference, actor/store split, schema/protocol file, or compat shim is introduced.

REVIEW_DONE:153:architect:approve
⟦AI:AUTO-LOOP⟧

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 28, 2026

🤖 质量审查通过:router marker parser 改动聚焦(修正版)

TL;DR

  • 这是什么: PR 153 的 readability / simplicity 角度独立 review。
  • 结论: approve,没有发现命名、死代码、过度抽象、复杂度或无关改动问题。
  • 下一步: controller 可把该质量 reviewer 结果计入 review gate。

详细说明

这次改动把原来的 ASCII payload gate 改成 Phase9MarkerGrammar,也就是一组 route-specific marker 解析规则。这个命名贴近 Phase 9 router 的业务语义,新增方法都很短,并且分别被 _extract_marker_round_from_converge 调用,不是挂空的 helper。

新增测试覆盖了中文 summary / reason、跨 tick triplet、合法 converge 与 source-regression 检查。范围集中在 router marker parser,没有看到 unrelated cleanup。Refactor Old/New 自说明也存在且能读懂,不是 see issue #X 形式的占位。


📎 完整 codex 原始输出(存档备查)
---
pr: 153
role: quality
verdict: approve
---

## Verdict
Approve: the router marker parser change is focused, readable, and does not introduce dead code or unnecessary abstraction from a quality perspective.

## Evidence
- `skills/codex-refactor-loop/scripts/phase9_router_daemon.py:53` introduces `Phase9MarkerGrammar`, a domain-specific parser name that describes the business intent better than the removed generic payload regex.
- `skills/codex-refactor-loop/scripts/phase9_router_daemon.py:61` keeps the parser entrypoint small and routes to tiny helpers; the new methods are reachable from `_extract_marker` and `_round_from_converge`.
- `skills/codex-refactor-loop/scripts/phase9_router_daemon.py:54` and `skills/codex-refactor-loop/scripts/phase9_router_daemon.py:253` include the required Refactor Old/New self-doc blocks, and they are specific enough to explain the parser bug and the intended route-specific fix without relying on a `see issue #X` placeholder.
- `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:168`, `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:279`, and `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:672` add focused behavior/source-regression coverage for the new grammar without unrelated cleanup.

⟦AI:AUTO-LOOP

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 28, 2026

🤖 tests reviewer approve: PR 153 测试覆盖足够

TL;DR

  • 这是什么:PR 153 修 phase9_router_daemon.py 的 route-specific marker parser。
  • 结论:tests 角度 approve,新增行为测试覆盖中文 payload、跨 tick triplet、converge dispatch、junk marker 拒绝。
  • 下一步:controller 可把这个 reviewer 结果计入 PR gate。

详细说明

我按 origin/auto-refact-dev...origin/refactor/issue149-router-marker-parser 三点 diff 看了生产改动和实际测试文件。新增测试不是 bump 行数:它们断言 daemon 是否派发 judge/solver、ledger key 是否正确、junk marker 是否不进入 fallback event,这些都是业务结果。

检查点里没有发现新增 sleep / delay 测试节奏、没有新增 [Skip] 或 manual trait,也没有把强断言改松。source-regression 也有覆盖:测试固定了 Phase9MarkerGrammar / parse_marker_candidate / parse_converge_round,并禁止回退到 VALID_MARKER_PAYLOAD.match(candidate) 或新增 Phase9RoundProjection

验证命令均已在 PR worktree 通过:router daemon 测试 36 个,project fixed-points source-regression 测试 144 个。


📎 完整 codex 原始输出(存档备查)
---
pr: 153
role: tests
verdict: approve
---

## Verdict
Approve: the PR adds behavior tests for the route-specific parser outcomes and a source-regression guard for the new no-regression rule.

## Evidence
- `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:168` covers `SOLVER_DONE:<role>:propose:<non-ASCII summary>` across all three solver roles and asserts the business outcome: exactly one judge dispatch plus the `149-1-judge` ledger key.
- `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:184` covers cross-tick triplet accumulation: 2/3 solver logs do not dispatch, then the third solver log triggers exactly one judge dispatch.
- `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:279` covers `META_JUDGE_DONE:converge:round-N:<non-ASCII reason>` and asserts the next-round solver triplet plus all three ledger keys.
- `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:624` keeps the junk-marker regression case alive while allowing the legal Unicode converge marker; assertions check dispatch goes only to issue 41 round 2 and forbidden regex fragments do not leak into fallback events.
- `skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py:672` adds a source-regression assertion for the route-specific grammar helper and blocks reintroducing `VALID_MARKER_PAYLOAD.match(candidate)` or `Phase9RoundProjection`.
- No new `sleep`/`delay`, `[Skip]`, or manual-test traits were added in the PR diff, and I found no assertion loosening in the touched tests.
- Verification run from the PR worktree: `git diff --check origin/auto-refact-dev...origin/refactor/issue149-router-marker-parser`, `python3 -m unittest skills/codex-refactor-loop/scripts/test_phase9_router_daemon.py` (36 tests), and `python3 -m unittest skills/codex-refactor-loop/scripts/test_ensure_project_rules_fixed_points.py` (144 tests) all passed.

REVIEW_DONE:153:tests:approve
⟦AI:AUTO-LOOP

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 28, 2026

🎉 MERGE(3× approve)。router marker-grammar parser 修复(#149),终结 dispatch-gap。CI 绿。Closes #149

⟦AI:AUTO-LOOP⟧

@loning loning merged commit b57be32 into auto-refact-dev May 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-loop codex-refactor-loop 管理的 issue/PR 🎉 phase:merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant