Skip to content

fix(mcp): name the unfinished-run tick fuse as loop_fuse - #21

Merged
linkerlin merged 1 commit into
masterfrom
cursor/loop-fuse-host-contract-5508
Nov 2, 2026
Merged

linkerlin merged 1 commit into
masterfrom
cursor/loop-fuse-host-contract-5508

Conversation

@linkerlin

Copy link
Copy Markdown
Owner

Summary

未完成 run 的 tick 保险丝与连上时的常驻说明对齐到 #20 的信封:码在 loop_fuse=pending_redirect_loop,保险丝的 redirect_reason 用同一个码。裸 pending_redirect_loop 不再被写成 next_action 的并列值,error 字段仍然不出现。

The unfinished-run tick fuse and the connect-time instructions now match the #20 envelope. The code is loop_fuse=pending_redirect_loop, and the fuse redirect_reason uses that same code. A bare pending_redirect_loop is no longer written as a peer of next_action, and error stays absent.

What changed

  • 常驻 standing_instructions() 把 or pending_redirect_loop 改成 or loop_fuse=pending_redirect_loop。不写 error=pending_redirect_loop,也不把裸码当成 next_action。全文 1195 字,仍小于 1200。
  • 保险丝(closed)在无软缺口的早返回和有软缺口的返回上都写 redirect_reason=pending_redirect_loop。dispatch_reason 仍是 pending_solidify。loop_fuse、ok=false、error 缺席、session_not_failed=true、preserve 三元组、tick_again=false 不动。有软缺口时仍不写 gate_soft_continue。
  • 第一次重定向仍是 redirect_reason=pending_solidify,没有 loop_fuse,ok=true。next_action 两次都是 swarm_solidify。
  • 仪器、swarm_tick 参数说明、README(英/中)、quickstart、AGENTS、DEBUG #68 写同一口径。DEBUG #61 的 tools/list 缓存没有做假修复。
  • 不写 Parent baseline,不放宽固化门,不打开 val 密封,不调用 skip_validation。

How to test

  1. uv run pytest tests/test_mcp_host_usability_pending_smoke.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_mcp_server.py tests/test_mcp_protocol.py tests/test_open_box_setup_doctor.py tests/e2e/test_swarm_full_e2e.py tests/test_usability_external_state_e2e.py tests/test_swarm_instrument_soft_copy.py tests/test_swarm_beginner_guidance.py -m "not slow and not llm"
  2. 期望:190 passed,3 deselected(llm/slow)。本地已得到这个结果。
  3. uv run ruff check src/evolver/swarm.py src/evolver/mcp_server.py tests/test_mcp_host_usability_pending_smoke.py tests/test_mcp_server.py
  4. uv run ruff format --check 同上四个文件
  5. uv run mypy src/evolver/swarm.py src/evolver/mcp_server.py

常驻说明含 loop_fuse=pending_redirect_loop,不含裸 or pending_redirect_loop、error=pending_redirect_loop、next_action=pending_redirect_loop。保险丝:loop_fuse=pending_redirect_loop、redirect_reason=pending_redirect_loop、无 error、ok=false、session_not_failed=true、preserve 三元组仍在;软缺口省略 gate_soft_continue。第一次重定向:redirect_reason=pending_solidify,没有 loop_fuse。boot / status 仍是 gate_soft_continue=true,没有 session_not_failed。只查 error == pending_redirect_loop 的宿主模型会错过保险丝;查 loop_fuse 或保险丝 redirect_reason 的模型会去固化。

Risk

Low — 公开 MCP 返回体只在保险丝上把 redirect_reason 从 pending_solidify 改成 pending_redirect_loop。dispatch_reason、ok、error 缺席、next_action、session_not_failed 与 preserve 三元组没变。常驻说明换了一句,长度从 1196 降到 1195。固化门、Parent baseline、val 密封都没有动。

仍在的宿主摩擦

  • 把缺席的 gate_soft_continue 当成「继续 tick」(只在严格 false 时才停),并且不看 tick_again / next_action / ok 的宿主,仍可能再 tick。保险丝上 ok=false 仍能停住只看 ok 的宿主。
  • 把 ok=false 本身当成整段会话失败、且不读 session_not_failed 与 loop_fuse 的宿主,仍会在第二次 tick 上停掉会话。ok=false 留着,是因为只看 ok 的宿主靠它停止空转。
  • 宿主 tools/list 缓存滞后(DEBUG #61)没有做假修复。安全信号在返回体上。

Harness/evaluator governance

Upstream governance surface: MCP swarm host contract (standing_instructions, unfinished-run tick fuse redirect_reason / loop_fuse, instrument text, and tool schema). Solidify gates, Parent baseline, and val seals are unchanged.
Downstream EvoX impact: N/A -- not a harness/evaluator governance change
Rollout-local scope: N/A -- not a harness/evaluator governance change
Promotion boundary: N/A -- not a harness/evaluator governance change
Evaluator mismatch sets: N/A -- not a harness/evaluator governance change
Non-regression evidence: pending-smoke host models plus the 190-test host-usability / swarm / MCP / e2e suite (not slow and not llm)
Fix-severity review: low
Owner approval: N/A -- not a harness/evaluator governance change
Security boundary: host-facing MCP envelope and connect-time instructions only; no new data, tool, or secret path
Rollback: revert this commit
Live promotion: no
Autonomous evaluator self-editing: no

Self-check

  • Tests added or updated to cover the new behavior; gates pass locally on the host-usability suite named above, plus ruff and mypy on the touched modules.
  • No new runtime dependencies.
Open in Web Open in Cursor 

Standing instructions and the fuse redirect_reason now match the #20
envelope, so a host can read loop_fuse without treating the bare code
as a next_action or looking for it on error.

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

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 e96356d into master Nov 2, 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