Bug: cordis_inspect_query (platform=client) hangs when the page returns an error resolution #848
Replies: 2 comments
|
Thanks for the detailed report. I reproduced this on current master and have a small patch ready. The change keeps
I added regression tests for both reported failure paths, abort-after-answer, and late-answer rejection. The cordis-host-runner suite passes (93 tests), as does I noticed that |
|
Still reproducible on I inspected a real exported session together with the currently installed Client/Host runners:
This confirms that this case is not caused by a missing or disconnected browser page: the Client responds, but the Host drops the error resolution. The same Host implementation is present in the locally installed The no-response timeout problem discussed in #1607 is a related safety-net gap. Both protections appear useful: settle every matching Client response first, then use a bounded timeout for genuinely unanswered Client queries. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
cordis_inspect_querywithplatform: "client"hangs indefinitely (never returns) whenever the Client page does answer the query but with an error resolution (ok: false) — e.g. an exactService.listServicequery for a service name that does not exist in the client catalog. The tool call stays pending until cancelled, then surfaces the misleading error…: Client inspect query Service.listService was cancelled. Host-platform queries are unaffected (they run locally and are fast).Environment
0.1.0-rc.6@deepseek-ai/dsh-tool-cordis:0.1.0-rc.6@deepseek-ai/dsh-cordis-host-runner:0.1.0-rc.6@deepseek-ai/dsh-cordis-client-runner:0.1.0-rc.6Steps to reproduce
cordis_inspect_listand pick a Client provider (e.g.Service).cordis_inspect_querywithplatform: "client",provider: "Service",method: "listService",input: { "service": "<name not present in the client catalog>" }.no catalogued Service named "<name>"), but the tool call never returns — it hangs until cancelled.Error: Service.listService: Client inspect query Service.listService was cancelled, which incorrectly suggests the client never responded.Root cause
In
@deepseek-ai/dsh-cordis-host-runner,CordisInspectRegistryService.resolveClientQuerysilently drops client error resolutions:When the client answers
{ ok: false, reason, message }, the host returns{ accepted: false }without ever callingpending.settle(...). The promise awaited inqueryClientnever resolves, so the tool call blocks until the caller's signal aborts (reporting "was cancelled"). The same drop applies when the client's data fails Host-side output validation (validateOutputthrows).Suggested fix
Settle the pending query on any client answer (success, error, or invalid output), so failures are returned to the caller instead of hanging:
Notes:
pending.deleteis hoisted so every query settles at most once.accepted: falseis only returned when the pending entry is missing or belongs to another agent (already settled/cancelled elsewhere) — previous semantics preserved.Verification
Reproduced with the real registry class (
CordisInspectRegistryService) and a mirrored client manifest:{ ok: true, data }{ ok: false, message }After the fix, the pending map no longer leaks entries.
All reactions