Skip to content

Commit 3a11ed3

Browse files
authored
feat: 落地 Core Peer Wave 并行执行面,并准备 0.6.9
把九路 dispatch 接到 Core task worktree,以 Peer Wave 并行执行多路写任务,并准备 0.6.9。
1 parent e62aea5 commit 3a11ed3

24 files changed

Lines changed: 868 additions & 59 deletions

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
## Unreleased
44

5+
## 0.6.9 - 2026-08-15
6+
7+
- Make multi-harness writes a Core peer wave: each task worktree has one
8+
executor, overlapping slices share a `conflict_group`, and wave members are
9+
not live supervisors. Objective budgets now default to `max_parallel = 3`;
10+
when write-capable Providers are ready the effective wave size is
11+
`min(requested, ready_count)`. Empty `conflict_group` values warn in a
12+
parallel wave. `task.executor` can run a ready dispatch adapter inside the
13+
existing task worktree (Cursor edit stays fail-closed); scratch
14+
`dispatch run --mode edit` remains detached and patch-only. `objective tick`
15+
and `task daemon` preview idle-harness bindings and honor per-backend caps.
16+
517
## 0.6.8 - 2026-08-15
618

719
- Fix Console inspection falsely timing out healthy workspaces by budgeting for

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,10 @@ preview with `dyro integration install dispatch --dry-run`, then install with
298298
For two to four different roles, `dyro dispatch batch-plan` produces a
299299
side-effect-free, context-bound plan. Review its digest before
300300
`batch-start --expect-plan-sha256 …`, then recover through `batch-status`,
301-
`batch-result`, or `batch-cancel`. Batch V1 is independent fan-out with at most
302-
one edit writer; it is not a dependency DAG, retry queue, or automatic judge.
301+
`batch-result`, or `batch-cancel`. Batch V1 is advisory independent fan-out with
302+
at most one scratch edit writer; it is not the delivery write plane, a
303+
dependency DAG, retry queue, or automatic judge. Simultaneous writes use Core
304+
peer wave: one executor per task worktree, serialized only by `conflict_group`.
303305
Use explicit synchronous `panel --members all` only for a full-ready-Provider
304306
same-task comparison.
305307

README.zh-CN.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,10 @@ Dyro Skill 的机器不会被后台静默写入。
293293
需要 2–4 个不同角色时,先用 `dyro dispatch batch-plan` 生成不创建状态、绑定
294294
上下文的计划;审阅摘要后再执行 `batch-start --expect-plan-sha256 …`,随后可用
295295
`batch-status``batch-result``batch-cancel` 恢复生命周期。Batch V1 是最多
296-
一个编辑者的独立 fan-out,并非依赖 DAG、重试队列或自动终裁器。只有用户明确要求
297-
全 Harness 同题比较时,才使用同步的 `panel --members all`
296+
一个 scratch 编辑者的建议面 fan-out,不是交付写路径,也不是依赖 DAG、重试队列
297+
或自动终裁器。要同时改多块,走 Core Peer Wave:每条 task worktree 一个执行位,
298+
只按 `conflict_group` 串行。只有用户明确要求全 Harness 同题比较时,才使用同步
299+
`panel --members all`
298300

299301
交互运行 `dyro``dyro home``dyro start` 时,Dyro 每个本地自然日最多访问一次官方 PyPI;断网、超时或状态目录不可写都不会阻塞进入工作区。默认仍由用户确认更新:
300302

docs/agent-orchestration-discipline.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ docs/reviews/YYYY-MM-DD-<topic>-adversarial-board.md
7878

7979
| 规则 | 说明 |
8080
| --- | --- |
81-
| 一仓一 branch 同时仅一个写 agent | 并行写同一 checkout 会导致已验证修复被静默覆盖 |
81+
| 一棵 task worktree / 同一 `conflict_group` 同时仅一个写 agent | 并行写同一 checkout 会覆盖已验证修复;不同 task 树或不同冲突组可以同时写 |
8282
| 改前 `git log -5 -- <path>` | 避免回退到已废弃的 workaround |
8383
| 精确 stage | 禁止盲目 `git add .`;同文件无关 hunk 必须拆分 |
8484
| 「验证后又坏了」 | 先查是否有后续 commit 覆盖,再查运行时 |
@@ -112,5 +112,5 @@ docs/reviews/YYYY-MM-DD-<topic>-adversarial-board.md
112112
5. 验证者是否被要求「打开真产物并尝试证伪」?
113113
6. 若 resume:substrate 是否变化?
114114
7. 是否声明缩放妥协?
115-
8. 写路径是否保证单写 agent?
116-
9. 结果是否只回收摘要/契约字段,而非完整事件流?
115+
8. 写路径是否保证每棵 task worktree / 每个 conflict_group 只有一个写 agent,且波次成员都是执行位?
116+
9. 结果是否只回收摘要/契约字段,而非完整事件流?

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,4 @@ Dyro 的交付拓扑与之**实质相近**:TaskGraph(`depends_on` / conflict
234234

235235
未来的 adapter、通知、签名规则、发布平台与审批系统应使用 Python entry point 或独立 Profile 扩展包接入;不要把某个组织的策略加入 core 默认行为。
236236

237-
开发者侧的可选本地多 Agent 派发(五段式任务契约、注入前机密守卫、locator 核验、隔离 patch)与上述控制面分层并列,随 `dyro` 安装包分发(`dyro dispatch` / `import experiments.local_agent_dispatch`),但****替代 gates/合并;见 [`ADR-0002`](adr/0002-optional-local-agent-dispatch.md)[`多智能体编排纪律`](agent-orchestration-discipline.md)[`可选本地 Agent 派发设计`](designs/optional-local-agent-dispatch.md)
237+
开发者侧的可选本地多 Agent 派发(五段式任务契约、注入前机密守卫、locator 核验、隔离 patch)与上述控制面分层并列,随 `dyro` 安装包分发(`dyro dispatch` / `import experiments.local_agent_dispatch`),但****替代 gates/合并。同时写多块走 Core Peer Wave(task worktree + `conflict_group`),见 [`peer-wave-execution.md`](designs/peer-wave-execution.md)[`ADR-0002`](adr/0002-optional-local-agent-dispatch.md)[`多智能体编排纪律`](agent-orchestration-discipline.md)[`可选本地 Agent 派发设计`](designs/optional-local-agent-dispatch.md)

docs/designs/native-continuation-engine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ max_actions = 20
6161
max_attempts_per_task = 2
6262
max_failures = 3
6363
max_no_progress_cycles = 2
64-
max_parallel = 1
64+
max_parallel = 3
6565
deadline = "2026-10-02T12:00:00Z"
6666
```
6767

docs/designs/optional-local-agent-dispatch.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ judge 或多 edit writer。显式 `panel --members all` 仍是同步的全 ready
288288

289289
| 场景 | 用哪条路径 |
290290
| --- | --- |
291-
| 开发者要第二意见 / 大调研 / patch 竞赛 | ADR-0002 本设计 |
291+
| 同时改多块交付代码 | Core Peer Wave:多 task + worktree + `conflict_group`;见 [peer-wave-execution.md](peer-wave-execution.md) |
292+
| 开发者要第二意见 / 大调研 / scratch patch | ADR-0002 本设计 |
292293
| 高风险设计评审 | 本设计 panel + 对抗评审板 |
293294
| 生产 evidence / merge | 仅 Dyro 控制面;派发 harness 不可越权 |
294295

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Peer Wave:多 Harness 并行执行面
2+
3+
状态:已接受(随 0.6.x 落地)
4+
范围:Dyro Core 写路径;不替代 gates / review / merge
5+
关联:[多智能体编排纪律](../agent-orchestration-discipline.md) · [ADR-0002](../adr/0002-optional-local-agent-dispatch.md) · [可选本地 Agent 派发](optional-local-agent-dispatch.md)
6+
7+
## 1. 产品判断
8+
9+
多 Harness 的默认画面是 **一波 peer 任务同时写**,不是一路改、其余盯梢。
10+
11+
写隔离已经在 Core:
12+
13+
- 一条 Task 同一时刻只有一个 `executor`
14+
- 每个 Task 有自己的 `task/<id>` worktree
15+
- 重叠切片用 `conflict_group` 串行;不重叠的进入同一波
16+
17+
0.6.8 的九路 headless 适配器接到这条写路径上:在 **既有 task worktree** 里跑,不再为交付执行另开 detached patch 树。
18+
19+
## 2. 硬规则
20+
21+
1. 一棵 task worktree 同一时刻只有一个写 harness。不是全工作区只有一个写。
22+
2. 同一 `conflict_group` 同一波只进一个 Task。空 `conflict_group``max_parallel > 1` 时警告,但不互斥。
23+
3. 波次里每个成员都是执行位。只读意见走 `dyro dispatch panel`;复核是该 Task 的下一阶段,审冻结 HEAD,不看 live 树。
24+
4. `cursor-agent` 不能进入写波次;其 edit 仍 fail-closed。
25+
5. Dispatch 仍然不能 merge / push / signoff。交付证据只走 Core gates。
26+
27+
## 3. 产品路由
28+
29+
| 意图 | 路径 |
30+
| --- | --- |
31+
| 同时改多块 | 拆成 N 条 Task,填 `conflict_group``executor``task daemon --parallel` 或 Objective `max_parallel` |
32+
| 只要第二意见 | `dyro dispatch panel` |
33+
| 还不成 Task 的试改 | `dyro dispatch run`(只读或 detached patch) |
34+
| 禁止默认 | 一个 edit writer + 其余角色陪跑 |
35+
36+
Batch V1 保持建议面:2–4 个独立角色、最多一个 edit。不要在 Batch 里重做 TaskGraph。
37+
38+
## 4. 执行桥
39+
40+
`task.executor` 若是已就绪且支持 edit 的 dispatch Provider,`run_task` 调用该适配器:
41+
42+
- cwd = `_ensure_task_worktrees()` 的根
43+
- 分支 = `task/<id>`
44+
- 使用适配器自己的隔离 Home 与进程监督
45+
- 不创建 `EditWorkspace`,不回写源工作区之外的 detached tree
46+
- 终态仍走 receipt → gates → review → merge
47+
48+
未就绪或非 dispatch 的 executor 回退到 Profile `write` argv,避免没有本机登录时阻断既有工作区。`auto` 只从就绪的可写 Provider 里确定性分配。
49+
50+
## 5. 异构波次
51+
52+
`objective tick``task daemon` 预览为每个 ready Task 绑定空闲就绪 harness:
53+
54+
- 钉死的 `executor` 优先;达到每后端上限则推迟,不静默换人
55+
- `auto` 按 Provider id 排序领取空闲可写 harness
56+
- 遵守 Objective / daemon 并行容量、`conflict_group`、每后端上限
57+
- Cursor 作为写 executor 被拒绝
58+
59+
Objective 默认 `max_parallel = 3`。本机有就绪可写 Provider 时,有效容量为 `min(requested, ready_write_count)`;没有就绪 Provider 时保持 requested,以便 Profile-only 工作区继续跑。

docs/diagrams.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ flowchart TB
269269
Host -->|"explicit dyro commands"| Dyro
270270
```
271271

272-
See `docs/agent-orchestration-discipline.md`. The optional harness under `experiments/local_agent_dispatch/` ships with the installed package but never replaces Core gates or merge.
272+
See `docs/agent-orchestration-discipline.md` and `docs/designs/peer-wave-execution.md`. `dyro dispatch` is advisory; simultaneous writes use Core task worktrees, not Batch supervisors. The optional harness under `experiments/local_agent_dispatch/` ships with the installed package but never replaces Core gates or merge.
273273

274274
---
275275

docs/diagrams.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ flowchart TB
269269
Host -->|"显式 dyro 命令"| Dyro
270270
```
271271

272-
[`agent-orchestration-discipline.md`](agent-orchestration-discipline.md)。能力:`dyro dispatch` / `experiments.local_agent_dispatch`(随 `dyro` 安装;****替代 gates/merge)。
272+
[`agent-orchestration-discipline.md`](agent-orchestration-discipline.md)[`peer-wave-execution.md`](designs/peer-wave-execution.md)`dyro dispatch` 是建议面;同时写多块走 Core task worktree 波次,不在 Batch 里陪跑监工。能力:`dyro dispatch` / `experiments.local_agent_dispatch`(随 `dyro` 安装;****替代 gates/merge)。
273273

274274
---
275275

0 commit comments

Comments
 (0)