Skip to content

fix(dsh): give a late recall's Proxy requests the 30 s background window - #113

Merged
forrestlinfeng merged 1 commit into
mainfrom
fix/late-recall-proxy-cap
Nov 25, 2026
Merged

forrestlinfeng merged 1 commit into
mainfrom
fix/late-recall-proxy-cap

Conversation

@forrestlinfeng

Copy link
Copy Markdown
Contributor

Summary

A host that adds a strategy late (dsh) stops waiting after 6 s and lets the recall finish in the background, but each Proxy request in that background recall was still cut at the Proxy client's 8 s default. The local Proxy's text recall round trip runs 4.5–7.6 s, so a slower one returned nothing, and the turn never got its late strategy.

 recalled(…, { waitMs, keepLate, lateAtToolResult })
   timeoutMs =
     lateAtToolResult ? waitMs + DEFER_GRACE_MS
-  : keepLate         ? 0                    # Proxy client default: 8 s
+  : keepLate         ? DEFERRED_RECALL_MS   # 30 s, same window as the tool-result deferral (ZCode)
   : waitMs

Late landing still goes through show() / join(), which only book while the turn is open, so a strategy that arrives after the turn ends is still dropped.

Evidence

Field case (2026-11-25, DSH Desktop): the Hub served the right Gene first (fit 0.99) 3.4 s into the turn. The session log has no plugin:evolver message and the plugin's session state has injected: {}.

Reproduced by driving the dsh plugin channel against the real Proxy, with 5 s added to /asset/fetch by a read-only pass-through:

  • Before (installed 1.0.17): orig 8019 ms none, 8009 ms none; para5 8007 ms none, 8006 ms none
    After (1.0.17 + this lib/app/prompt.js): orig 12464 ms late, 10014 ms late; para5 14443 ms late, 12740 ms late (all four inject the expected Gene)

Unit test test/app/recall-deadline.test.js:

promptSubmitted({ waitMs: 6_000, keepLate: true })
  before: every request.timeoutMs === undefined   # pinned the 8 s default
  after:  every request.timeoutMs === 30_000

npm test: 1141 pass, 34 fail. The same 34 fail on a clean origin/main checkout on this machine (kimi host install/packaging, acp, desktop-engine); none touch recall.

Merge Danger

Door: two-way

One constant in one branch; revert restores the 8 s cut.

Blast Radius: dsh

Only hosts with reply.late take this branch (today, dsh). A background recall can now hold its Proxy requests up to 30 s instead of 8 s; hosts that cannot answer late, and the ZCode tool-result deferral, are unchanged.

🤖 Generated with Claude Code

A host that adds context late (dsh) stops waiting for recall after 6 s and lets
the recall finish in the background, but each of its Proxy requests still used
the Proxy client's 8 s default. The local Proxy's text recall round trip runs
4.5–7.6 s on a normal day, so a slower one was cut at 8 s and the turn got
nothing, not even late.

Seen on 2026-11-25: the Hub served the right Gene first (fit 0.99) 3.4 s into
the turn, and DSH Desktop injected nothing. With 5 s added to the Proxy's
/asset/fetch, the installed 1.0.17 returns nothing at exactly 8.0 s in 4/4
rounds; with this change the strategy lands late in 4/4 rounds at 10–14 s.

A late recall is already the background, so it now gets DEFERRED_RECALL_MS, the
window the tool-result deferral (ZCode) uses. The test that pinned the 8 s
default is changed to the new rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现需要报告的问题。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=113、head_sha="324d4a86f054bc40b8e1ddd0c6bbb3a35c4eb352",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 324d4a86f054

@forrestlinfeng
forrestlinfeng merged commit 975f41a into main Nov 25, 2026
13 checks passed
forrestlinfeng added a commit that referenced this pull request Nov 25, 2026
Revert #113: late recall Proxy cap back to the 8 s default
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