Skip to content

fix(mcp): set tick_again false on a soft doctor smoke - #26

Merged
linkerlin merged 1 commit into
masterfrom
cursor/doctor-tick-again-c847
Nov 3, 2026
Merged

linkerlin merged 1 commit into
masterfrom
cursor/doctor-tick-again-c847

Conversation

@linkerlin

Copy link
Copy Markdown
Owner

Summary

未完成 run 上,软缺口(soft_continue=true)的 swarm_doctor 已经指向 swarm_solidify。只在 tick_again 严格为 false 时才停、把缺席当成再 tick、同时不看 next_action 的宿主,冒烟之后仍会再 tick。这次在这条信封上写 tick_again=false。soft_continue 仍为 true,表示缺口不是硬停。不写 gate_soft_continue,不写 session_not_failed。本调用不结算这条 run,不写 Parent baseline,不执行 evolver doctor --fix,也不放宽固化门。第一次 tick 重定向和保险丝本来就有 tick_again=false,这次不改。

On an unfinished run, a soft-continue swarm_doctor already named swarm_solidify. A host that stops only when tick_again is strict false, and treats an omitted key as another tick, still ticked after the smoke because the key was absent. This writes tick_again=false on that envelope. soft_continue stays true: the gap is not a hard stop. gate_soft_continue and session_not_failed stay absent. The call does not settle the run, write a Parent baseline, run evolver doctor --fix, or relax the solidify gate. The first unfinished-run tick redirect and the fuse already set tick_again false; those envelopes are unchanged.

What changed

  • 仅当存在未完成 run、soft_continue=true、且没有硬 blockers 时,swarm_doctor 增加 tick_again=false。next_action 仍是 swarm_solidify,preserve 三元组不动。hint 写明 tick_again=false,并写明 fixes 里的 evolver doctor --fix 本工具不执行、固化前不要跑。
  • soft_continue 仍为 true。不写 gate_soft_continue=false(会重开 DEBUG #67)。不写 session_not_failed(那是 tick 重定向的旗标,不是 doctor 的健康位)。
  • 没有未完成 run 时 doctor 不写 tick_again。硬阻断(例如不是 git 仓库,ok=false)也不写。
  • 工具描述与返回体同一口径。DEBUG #61 的宿主目录缓存没有做假修复。
  • 不改第一次 tick 重定向(仍是 ok=true、retryable=false、tick_again=false、没有 error、没有 loop_fuse、软缺口上 gate_soft_continue 缺席)。不改保险丝(ok=false、loop_fuse=pending_redirect_loop、tick_again=false)。

How to test

  1. uv run pytest tests/test_mcp_host_usability_pending_smoke.py tests/test_mcp_server.py tests/test_mcp_protocol.py tests/test_mcp_host_usability_p0.py tests/test_mcp_host_usability_p1.py tests/test_mcp_host_usability_p2.py tests/test_mcp_host_usability_polish.py tests/test_swarm.py tests/test_swarm_beginner_guidance.py tests/test_swarm_instrument_soft_copy.py tests/test_swarm_status_boot.py -q --tb=line
    • Expected: 163 passed.
    • test_pending_doctor_on_a_soft_gap_names_solidify fails on unmodified master (KeyError: tick_again). The live doctor tool description also fails there until it names tick_again=false. The hard-blocker case stays ok=false with no tick_again. Idle doctor (no unfinished run) does not gain the key.
  2. uv run ruff check src tests && uv run ruff format --check src tests && uv run mypy src
    • Expected: ruff clean (746 files already formatted), mypy Success: no issues found in 353 source files.

Risk

Low. Only the soft-continue unfinished-run doctor envelope gains tick_again=false. ok, soft_continue, and loop_ready stay as the open-box report computed them. Hard failures and the idle doctor do not gain the key. Solidify gate, skip_validation, Parent baseline, and val seal are unchanged. The fuse still returns ok=false.

Harness/evaluator governance

Upstream governance surface: MCP swarm_doctor return while a run is unfinished (soft-continue only). Not solidify, selector, mutation, or the frozen gate.
Downstream EvoX impact: N/A -- existing read-only tool return, no bridge or contract change.
Rollout-local scope: host-visible doctor smoke only; boot, status, and the tick redirect envelope are unchanged.
Promotion boundary: N/A -- no proposal/rollout/default promotion.
Evaluator mismatch sets: N/A
Non-regression evidence: tests/test_mcp_host_usability_pending_smoke.py pins tick_again=false beside soft_continue=true, the preserve triad, absent gate_soft_continue / session_not_failed, the hint that this tool does not execute evolver doctor --fix, and the hard-blocker / idle paths (no tick_again). Tick redirects already asserted tick_again false; that assertion now also uses the same host model.
Fix-severity review: low
Owner approval: N/A
Security boundary: no new data, tool, host, network, or secret surface. Doctor still calls doctor(fix=False).
Rollback: revert this commit.
Live promotion: no
Autonomous evaluator self-editing: no

Self-check

  • No new runtime dependencies without a clear justification in "What changed".
  • Tests added or updated to cover the new behavior; gates pass locally: uv run pytest (modules listed above, 163 passed), uv run ruff check src tests, uv run ruff format --check src tests, uv run mypy src (353 source files).

Residual host friction

  • 只读 soft_continue=true、完全不看 tick_again / next_action / ok / retryable 的宿主,doctor 冒烟之后仍可能再 tick。没有把 soft_continue 写成 false。
  • 把缺席的 gate_soft_continue 当成继续、且不看 tick_again 的 tick 重定向(DEBUG #68 余项 1)仍可能再 tick。第一次重定向和保险丝已经写了 tick_again=false;看这个键的宿主会停。
  • 把保险丝 ok=false 当成整段会话失败、且不读 session_not_failed 与 loop_fuse 的宿主,仍会在第二次 tick 上停掉会话。ok 留着 false,这次不改。
  • swarm_status / swarm_boot 在未完成 run 上仍是 gate_soft_continue=true,不带 tick_again。只认这个 true 的宿主仍会 tick。status 的 next_action 仍是 swarm_solidify。
  • fixes 仍列出 evolver doctor --fix。本工具不执行它。hint 写明固化前不要跑。
  • 宿主 tools/list 缓存滞后(DEBUG #61)没有做假修复。
Open in Web Open in Cursor 

A soft-continue swarm_doctor while a run is unfinished already names
swarm_solidify. Hosts that stop only when tick_again is strict false
still ticked because the key was absent. Write tick_again=false on that
envelope. soft_continue stays true. Do not write gate_soft_continue or
session_not_failed, and do not execute evolver doctor --fix.

Co-authored-by: Steper Lin <linker.lin@live.com>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 01:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@linkerlin
linkerlin merged commit caacdc6 into master Nov 3, 2026
5 checks passed
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.

3 participants