Skip to content

feat(ar-runtime): Grok 并行领取就绪面,引擎逻辑不变 - #7

Open
johndpope wants to merge 4 commits into
EvoMap:mainfrom
johndpope:grok-scale
Open

feat(ar-runtime): Grok 并行领取就绪面,引擎逻辑不变#7
johndpope wants to merge 4 commits into
EvoMap:mainfrom
johndpope:grok-scale

Conversation

@johndpope

Copy link
Copy Markdown

这个 PR 做什么

ar-runtime 加一条 Grok Build 执行入口:同一套 workflow engine / MCP producer / 收据与两阶段实验协议,用 claim 池把就绪面一次性铺开,提高吞吐。Claude Code 路径和引擎状态机都不改。

为什么

Grok 的 agent() / parallel() 会阻塞到子任务结束,不必再走 ralph-loop「每轮一个 unit」。原先 Grok 侧如果串行 next-prompt,就绪面宽度 ≥ 2 时会白白排队。本 PR 让 coordinator 调已经存在的 ready + claimar-workflow-engine.py 里自组织抢占协议),按就绪面宽度 fan-out,不新增完成条件、不改 complete / after-* / execute-run 的语义。

保证(给审查者):

  • 不改引擎队列、租约、收据、盲审门槛、critic 双模型、pilot→main 两阶段。
  • 不改 MCP 写入 review.md / critic.md 的 producer 边界。
  • Claude Code 仍读 ar-runtime/.claude/;Grok 只新增 .grok/ar-runtime/.grok/config.toml
  • 吞吐来自「同一 DAG 上并行领取已就绪单元」,不是换一套研究逻辑。

怎么验证的

新增 tests/test_grok_runtime_port.py(4 个用例):Grok skills/agents/workflows 存在、coordinator 走 ready/claim/parallel 且不含 next-prompt、reviewer/critic 无 Write、MCP 配置指向现有 bun server。

pytest tests/test_grok_runtime_port.py
# 4 passed

Grok workflow 对 ar-coordinatorar-experiment-matrix 做了 canned-host 路径冒烟(编译 + 代表 args 走通 init→空 ready-front→close)。没有在本机跑完整 GPU 实验;引擎契约测试仍以 ar-runtime/.claude/ 为 Claude 入口。

范围自查

  • 标题是单一关注点,没有用「、」「以及」串起不相干的改动
  • 每个 commit 单独能通过测试,可单独 revert
  • 没有夹带无关改动(顺手的重构、格式化、临时文件)
  • 声称"完成"的部分看过实际运行或渲染结果,不是只读了源码

分支相对 EvoMap/main 还带着 fork 上已有的 Claude skill 英文化提交(en updates / ok)。那些是译文,不是引擎行为;Grok 吞吐相关的是后两个 commit。未勾选「每个 commit 单独过测试」,是因为英文化可能对仍按中文字符串断言的 Claude 契约测试不绿。未勾选「实际运行」,是因为只做了 canned-host 冒烟,没有端到端实验。

关联

Add Grok-native agents and skills under .grok/, MCP config for both
repo-root and ar-runtime cwd, an engine-driven ar-coordinator workflow
as the ralph-loop stand-in, and ar-experiment-matrix for parallel seeds.
Claude Code copies in ar-runtime/.claude/ stay in place.
Replace the serial next-prompt loop and "do not spawn" leaf prompts with
waves of parallel engine claim workers over the ready-front. Subcoder and
experiment-matrix panels follow the same fan-out (up to 32). The parent
workflow/session is what scales; children stay leaves because Grok cannot
nest subagents.
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