Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ boot 自动 ack 本 agent 的 `swarm.hello`。安装或拉代码后须重启 MCP
Parent。软缺口(`soft_continue=true`)下 `swarm_doctor` 同样给出
`next_action=swarm_solidify`、`tick_again=false` 与 preserve 三元组,不写
`gate_soft_continue`、不写 `session_not_failed`;`soft_continue` 仍为 true。
这条引导上 `fixes` 不把 `evolver doctor --fix` 列为当前步骤;boot/status 的
`commands` 与 `next_steps` 同样不把它当成现在要执行的修复。没有未完成 run,
或固化之后,列出这条命令仍然合适。本工具仍不执行它。
硬阻断的 doctor 仍是 `ok=false`,不另给这个动作,也不写 `tick_again`。
此时 `boot_once` 为空。忽略 `next_action` 再调 `swarm_tick` 时默认不启新周期。
第一次 `ok=true`、`severity=soft`、`cycle_started=false`、`progress=false`、
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased

### Fixed
- **MCP 宿主可用性:软缺口固化引导不再把 `evolver doctor --fix` 当当前步骤**:未完成 run 且 soft-continue 时,`swarm_doctor` 的 `fixes` 去掉这条命令。boot / status 的 `commands` 同样去掉它,`next_steps` 里点名它的句子改成先 `swarm_solidify`(`next_action` / preserve / `action_required`)。`soft_continue` 仍为 true,`gate_soft_continue` 在 boot/status 仍为 true,doctor 仍不写这个键,也不写 `session_not_failed`。没有未完成 run 时,`fixes` / `commands` 仍列出 `evolver doctor --fix`。固化之后同样可以再列。本工具仍不执行 `--fix`。第一次 tick 与保险丝的 `commands` 不动。不结算这条 run,不写 Parent baseline,不放宽固化门。
- **MCP 宿主可用性:未完成 run 的软缺口 boot/status 写 `tick_again=false`**:`swarm_boot` 与 `swarm_status` 在未完成 run 且软缺口、`next_action=swarm_solidify` 时带 `tick_again=false`。`gate_soft_continue` 仍为 true,不写 `session_not_failed`。preserve 三元组不动。没有未完成 run 的 soft-continue,以及压缩检查点盖过固化时,不写 `tick_again`。doctor、第一次 tick 与保险丝本来的 `tick_again=false` 不动。不结算这条 run,不写 Parent baseline,不放宽固化门。
- **MCP 宿主可用性:未完成 run 的软缺口 doctor 写 `tick_again=false`**:只在 `soft_continue=true` 且有未完成 run、没有硬阻断时,`swarm_doctor` 带 `tick_again=false`。缺席不再被读成「可以再 tick」。`soft_continue` 仍为 true,不写 `gate_soft_continue`,不写 `session_not_failed`。`next_action` 仍是 `swarm_solidify`,preserve 三元组不动。hint 写明 `fixes` 里的 `evolver doctor --fix` 本工具不执行。没有未完成 run,或 doctor 是硬阻断时,不写 `tick_again`。第一次 tick 与保险丝本来就有 `tick_again=false`,这次不改。不结算这条 run,不写 Parent baseline,不放宽固化门,不执行 `--fix`。
- **MCP 宿主可用性:未完成 run 的软缺口 doctor 指向固化**:`readonly_smoke` 点名的 `swarm_doctor` 在 `soft_continue=true` 且有未完成 run 时带 `next_action=swarm_solidify`、`pending_solidify` 与 preserve 三元组。`hint` 先写现在固化,软缺口仍是建议。不写 `gate_soft_continue`,不写 `session_not_failed`,不结算这条 run,不写 Parent baseline,不执行 `--fix`。没有未完成 run,或 doctor 本身是硬阻断(`ok=false`)时,不另给这个动作。
Expand Down
8 changes: 8 additions & 0 deletions DEBUG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1248,3 +1248,11 @@
- **修复**:仅当未完成 run、软缺口已经挂上(`gate_soft_continue` 仍为 true)、`next_action=swarm_solidify` 时,boot 顶层与 status 写 `tick_again=false`。不写 `session_not_failed`。preserve 三元组不动。没有未完成 run 的 soft-continue 不写 `tick_again`。压缩检查点盖过固化时,boot 顶层与嵌套 status 副本都不留这个键。doctor、第一次 tick 与保险丝的 `tick_again=false` 不动。不结算,不写 Parent baseline,不放宽固化门,不执行 `evolver doctor --fix`。目录缓存(DEBUG #61)未做假修复。
- **经验**:**同一个「不要再 tick」要写在宿主已经认识的字段上,包括只读开机回执。** boot / status 不能借 `gate_soft_continue=false` 来停。
- **仍在**:只看 `gate_soft_continue=true`、完全不看 `tick_again` / `next_action` 的宿主,boot 或 status 之后仍可能再 tick。只读 `soft_continue=true`、完全不看 `tick_again` 的 doctor 冒烟(DEBUG #71 余项)仍可能再 tick。把保险丝 `ok=false` 当成整段失败、且不读 `session_not_failed` 与 `loop_fuse` 的宿主(DEBUG #68 余项 2)仍会停掉会话;`ok` 留着 false,是只看 `ok` 的宿主靠它停止空转。`fixes` 仍列出 `evolver doctor --fix`;本工具不执行它。目录缓存(DEBUG #61)没有做假修复。

### 73. 软缺口固化引导把 `evolver doctor --fix` 列成当前步骤(MCP 易用性,已修)

- **症状**:#72 之后,未完成 run 的软缺口 `swarm_doctor` / `swarm_boot` / `swarm_status` 已经指向 `swarm_solidify`,并带 preserve 三元组与 `tick_again=false`。doctor 的 hint 写明固化前不要跑 `evolver doctor --fix`,本工具不执行它。`fixes` 仍把这条命令列在最前。boot / status 的 `commands` 与 `next_steps` 同样把它写成建议现在执行。只读清单、不读 hint 的宿主会去跑 `doctor --fix`,而不是 `swarm_solidify`。
- **根因**:`fixes` / `commands` 来自开箱目录,软缺口一律附上 `evolver doctor --fix`。固化引导只加了 `next_action`,没有从这份清单里拿掉当前不该跑的那条。
- **修复**:仅当未完成 run 且 soft-continue、没有硬 `blockers` 时,doctor 的 `fixes` 去掉精确的 `evolver doctor --fix`。boot / status 在 `next_action=swarm_solidify` 时,`commands` 去掉同一条,`next_steps` 里点名它的句子改成先 `swarm_solidify`。`soft_continue` 仍为 true。boot / status 的 `gate_soft_continue` 仍为 true。不写 `session_not_failed`。没有未完成 run 时清单不变。硬阻断不改这份清单,也不另给 `next_action`。第一次 tick 与保险丝的 `commands` 不动。不结算,不写 Parent baseline,不放宽固化门,不执行 `--fix`。目录缓存(DEBUG #61)未做假修复。
- **经验**:**当前步骤只能有一份清单。** `next_action` 指向固化时,`fixes` 不能再把另一条命令放在可执行清单的前面。
- **仍在**:只读 `soft_continue=true` 或 `gate_soft_continue=true`、完全不看 `tick_again` / `next_action` / `fixes` 的宿主,冒烟或开机之后仍可能再 tick。没有把这些旗标写成 false(会重开 DEBUG #67)。`fixes` / `commands` 里仍可能有 `evolver bench freeze` 与 `evolver bench baseline`;它们不是这次要拿掉的那条,也不是 MCP 工具会执行的命令。第一次 tick 与保险丝的 `commands` 仍可能列出 `evolver doctor --fix`。把保险丝 `ok=false` 当成整段失败、且不读 `session_not_failed` 与 `loop_fuse` 的宿主(DEBUG #68 余项 2)仍会停掉会话。目录缓存(DEBUG #61)没有做假修复。
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Live `tools/list` already publishes `swarm_tick` parameters `prompt_mode` (`full

If a previous run is unfinished, `swarm_boot` keeps `next_action=swarm_solidify`, sets top-level `pending_solidify`, and adds `readonly_smoke` (`tools`: `swarm_doctor` and `swarm_status`, `settles_run`: false). On a soft gap it also sets `tick_again=false` while `gate_soft_continue` stays true. `hint` says to solidify first. A soft gap (`no_baseline` / `pack_absent` / `unmeasured`) still attaches `warning` and `next_steps`, and it does not replace that hint or weaken the gate. A read-only smoke can call `swarm_doctor` or `swarm_status`; neither settles the run nor invents a Parent baseline. A `swarm_tick` in that state does not start a cycle. The first call stays soft (`ok` true, `severity` soft, `cycle_started` false, `progress` false, `redirect_count` 1, `retryable` false, `next_action` still `swarm_solidify`, `last_run` unchanged). An omitted `retryable` is not a license to tick again. The same call again on that run returns `ok` false, `loop_fuse=pending_redirect_loop`, `redirect_reason=pending_redirect_loop`, `severity` soft, `retryable` false, and no `error` field. It still does not start a cycle. `loop_fuse` and that `redirect_reason` are the tick-loop fuse. The code is not an `error` and not a `next_action`. `next_action` stays `swarm_solidify`. `dispatch_reason` stays `pending_solidify`. The first redirect keeps `redirect_reason=pending_solidify` and does not set `loop_fuse`. Connect-time instructions name `loop_fuse=pending_redirect_loop` the same way. The fuse is not a gate failure and not an abandon signal; a soft gap stays on `warning` and `next_steps`. Both returns set `preserve_pending` true, `abandon_run` false, and `action_required` to `swarm_solidify` (boot and status do too while solidify is still next). Do not drop the unfinished run. When a soft gap is present, `gate_soft_continue` is omitted on the first redirect and on the fuse (`tick_again` is false). Omitted is not false: the first redirect keeps `ok` true and sets no `error`, so a host that treats only a strict false as session death stays in the session and does not tick again. Both tick returns set `session_not_failed` true. Read that field before other flags: true means the session is not failed, and `loop_fuse` does not abandon the run when the preserve flags say to call `swarm_solidify`. `next_steps` starts with `swarm_solidify`. Boot and status keep `gate_soft_continue` true while a run is still unfinished, set `tick_again` false on that soft gap, and they do not set `session_not_failed`. Pass `supersede_pending=true` to replace that run. Pause and the compaction checkpoint still refuse the cycle.

A cold `swarm_status` (this process has not called `swarm_boot`) returns `next_action=swarm_boot` and a short hint. After boot, status keeps `agent_name`, `source_revision`, and any soft `gap` / warnings. `tool_asset_search`, `tool_mailbox_poll`, `tool_cycle_timeline`, and `swarm_approvals` always return `{ok, items, hint}` — an empty match is not a blank body. `swarm_approvals` also keeps `pending` (the same rows as `items`) and `recent`. Read-only `swarm_doctor` mirrors `evolver doctor` without `--fix` (`ok`, soft warnings, command hints in `fixes`). `no_baseline` / `pack_absent` / `unmeasured` stay soft-continue. When a run is unfinished and that report is soft-continue, doctor also sets `next_action=swarm_solidify`, `tick_again=false`, `pending_solidify`, and the preserve triad (`preserve_pending`, `abandon_run=false`, `action_required=swarm_solidify`). `soft_continue` stays true. It still does not settle the run, write a Parent baseline, or execute `evolver doctor --fix`. `gate_soft_continue` and `session_not_failed` stay absent. A hard blocker keeps `ok` false and does not add that action or `tick_again`. The first unfinished-run tick and the fuse already set `tick_again` false.
A cold `swarm_status` (this process has not called `swarm_boot`) returns `next_action=swarm_boot` and a short hint. After boot, status keeps `agent_name`, `source_revision`, and any soft `gap` / warnings. `tool_asset_search`, `tool_mailbox_poll`, `tool_cycle_timeline`, and `swarm_approvals` always return `{ok, items, hint}` — an empty match is not a blank body. `swarm_approvals` also keeps `pending` (the same rows as `items`) and `recent`. Read-only `swarm_doctor` mirrors `evolver doctor` without `--fix` (`ok`, soft warnings, command hints in `fixes`). `no_baseline` / `pack_absent` / `unmeasured` stay soft-continue. When a run is unfinished and that report is soft-continue, doctor also sets `next_action=swarm_solidify`, `tick_again=false`, `pending_solidify`, and the preserve triad (`preserve_pending`, `abandon_run=false`, `action_required=swarm_solidify`). `soft_continue` stays true. It still does not settle the run, write a Parent baseline, or execute `evolver doctor --fix`. On that steer, `fixes` does not list `evolver doctor --fix` as a current step. Boot and status `commands` and `next_steps` do not present it as the current action either. The command stays listed when no run is unfinished, and after solidify. `gate_soft_continue` and `session_not_failed` stay absent. A hard blocker keeps `ok` false and does not add that action or `tick_again`. The first unfinished-run tick and the fuse already set `tick_again` false.

`swarm_boot(project=...)` binds a directory only when that path exists. `bound_paths.repo_root` is the code root (the git root walked from that directory, or the directory itself). `bound_paths.workspace_root` is the mutation directory. When they differ, or when `project` is a free-text label rather than a directory, the same object carries `warning` and `next_steps`. That is a soft warning: `ok` stays true and the loop still continues. A label is not turned into a new workspace.

Expand Down
2 changes: 1 addition & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ uv run evolver migrate-state

若上一轮 run 还没固化,`swarm_boot` 的 `next_action` 仍是 `swarm_solidify`,顶层带 `pending_solidify`,并多一个 `readonly_smoke`(`tools` 为 `swarm_doctor` 与 `swarm_status`,`settles_run` 为 false)。软缺口上同时写 `tick_again=false`,`gate_soft_continue` 仍为 true。`hint` 写明先固化。软缺口(`no_baseline` / `pack_absent` / `unmeasured`)仍附 `warning` 与 `next_steps`,但不盖掉这句 hint,也不放宽固化门。只读冒烟可以调 `swarm_doctor` 或 `swarm_status`:它们不结算这条 run,也不伪造 Parent baseline。

本进程尚未 `swarm_boot` 时,`swarm_status` 返回 `next_action=swarm_boot` 和一句 hint。boot 之后 status 仍带 `agent_name`、`source_revision`,以及软缺口的 `gap` / warnings。`tool_asset_search`、`tool_mailbox_poll`、`tool_cycle_timeline`、`swarm_approvals` 一律返回 `{ok, items, hint}`,没有命中也不是空正文。`swarm_approvals` 另外保留 `pending`(与 `items` 同一队列)和 `recent`。只读 `swarm_doctor` 等同 `evolver doctor` 且不执行 `--fix`(`ok`、软警告、`fixes` 里的命令提示)。`no_baseline` / `pack_absent` / `unmeasured` 仍是 soft-continue。有未完成 run 且这份报告是 soft-continue 时,doctor 也给出 `next_action=swarm_solidify`、`tick_again=false`、`pending_solidify` 和 preserve 三元组(`preserve_pending`、`abandon_run=false`、`action_required=swarm_solidify`)。`soft_continue` 仍为 true。它仍不结算这条 run,不写 Parent baseline,也不执行 `evolver doctor --fix`。`gate_soft_continue` 与 `session_not_failed` 缺席。硬阻断保持 `ok=false`,不另给这个动作,也不写 `tick_again`。第一次未完成 run 的 tick 与保险丝本来就写了 `tick_again=false`。
本进程尚未 `swarm_boot` 时,`swarm_status` 返回 `next_action=swarm_boot` 和一句 hint。boot 之后 status 仍带 `agent_name`、`source_revision`,以及软缺口的 `gap` / warnings。`tool_asset_search`、`tool_mailbox_poll`、`tool_cycle_timeline`、`swarm_approvals` 一律返回 `{ok, items, hint}`,没有命中也不是空正文。`swarm_approvals` 另外保留 `pending`(与 `items` 同一队列)和 `recent`。只读 `swarm_doctor` 等同 `evolver doctor` 且不执行 `--fix`(`ok`、软警告、`fixes` 里的命令提示)。`no_baseline` / `pack_absent` / `unmeasured` 仍是 soft-continue。有未完成 run 且这份报告是 soft-continue 时,doctor 也给出 `next_action=swarm_solidify`、`tick_again=false`、`pending_solidify` 和 preserve 三元组(`preserve_pending`、`abandon_run=false`、`action_required=swarm_solidify`)。`soft_continue` 仍为 true。它仍不结算这条 run,不写 Parent baseline,也不执行 `evolver doctor --fix`。这条引导上 `fixes` 不把 `evolver doctor --fix` 列为当前步骤。boot / status 的 `commands` 与 `next_steps` 同样不把它当成现在要执行的修复。没有未完成 run,或固化之后,列出这条命令仍然合适。`gate_soft_continue` 与 `session_not_failed` 缺席。硬阻断保持 `ok=false`,不另给这个动作,也不写 `tick_again`。第一次未完成 run 的 tick 与保险丝本来就写了 `tick_again=false`。

`swarm_boot(project=...)` 只在路径是已存在目录时绑定。`bound_paths.repo_root` 是代码根(从该目录向上找到的 git 根,否则就是该目录本身)。`bound_paths.workspace_root` 是变异所用目录。两者不一致,或 `project` 只是一段自由文本而不是目录时,同一对象带 `warning` 和 `next_steps`。这是软警告:`ok` 仍为 true,循环继续。自由文本不会被当成新的工作区。

Expand Down
Loading
Loading