Skip to content

Commit 95680ca

Browse files
author
trial
committed
docs(game_eval): clarify timeout layers + add autoload hint to not-ready error (#500)
Addresses Copilot review on #503: - The EVAL_READY_WAIT_SEC doc referenced 'handlers/editor.py' and lumped dispatcher.gd's 15000ms budget as 'server-side'. Correct to the full path (src/godot_ai/handlers/editor.py) and note dispatcher.gd's budget is editor/plugin-side; the 15s ceiling is enforced at both layers. - The not-ready error was optimized for 'game not running' but the same symptom occurs when the _mcp_game_helper autoload is missing/disabled. Point users to Project Settings → Autoload too (mirrors the screenshot path). https://claude.ai/code/session_01Jq5X4ivngAf1N6r5UX2BVw
1 parent e847582 commit 95680ca

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

plugin/addons/godot_ai/debugger/mcp_debugger_plugin.gd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ const GAME_READY_WAIT_SEC := 20.0
3434
## issuing a game_eval. This is deliberately MUCH shorter than the 20s
3535
## screenshot wait above: the eval path's total editor-side budget is this wait
3636
## plus the 10s eval backstop (request_game_eval's timeout_sec), and that total
37-
## MUST stay below the server-side game_eval command timeout (15s, see
38-
## handlers/editor.py::game_eval / dispatcher.gd's 15000ms game_eval budget).
37+
## MUST stay below the 15s game_eval timeout enforced at two layers: the Python
38+
## server's send_command budget (src/godot_ai/handlers/editor.py::game_eval) and
39+
## this plugin's own deferred budget (dispatcher.gd's 15000ms game_eval entry,
40+
## editor/plugin-side — not server-side). Either firing produces the opaque tail.
3941
## With the 20s screenshot wait, a not-yet-ready game made the editor poll past
40-
## the 15s server deadline, so the server gave up first with an opaque
42+
## the 15s deadline, so the server gave up first with an opaque
4143
## ~15s TimeoutError instead of the actionable "Is the game actually running?"
4244
## error below ever reaching the client (#500's residual TimeoutError bucket).
4345
## 3s wait + 10s backstop = 13s, comfortably under the 15s server timeout, so
@@ -432,7 +434,7 @@ func _wait_then_eval(
432434
await tree.process_frame
433435
if not is_game_capture_ready():
434436
_send_error(connection, request_id, ErrorCodes.INTERNAL_ERROR,
435-
"Game-side autoload never registered its debugger capture within %ds. Is the game actually running? Start it with project_run / the editor's Play button, then retry." % int(EVAL_READY_WAIT_SEC))
437+
"Game-side autoload never registered its debugger capture within %ds. Is the game actually running? Start it with project_run / the editor's Play button, then retry. If it IS running, check Project Settings → Autoload for _mcp_game_helper (added automatically when the plugin is enabled)." % int(EVAL_READY_WAIT_SEC))
436438
return
437439
_send_eval(tree, code, request_id, connection, timeout_sec)
438440

0 commit comments

Comments
 (0)