feat(client): ProxyConfig.request_timeout_seconds (default 35s, reject <=0)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-10 15:00:40 -05:00
parent a171d40781
commit 377adb10b2
2 changed files with 27 additions and 0 deletions

View File

@@ -62,3 +62,19 @@ func test_npc_result_fallback_is_degraded_with_no_moves():
assert_eq(r.valid_moves, [])
assert_eq(r.facts, [])
assert_false(r.ends_conversation)
func test_request_timeout_default():
if ProjectSettings.has_setting(ProxyConfig.TIMEOUT_SETTING):
ProjectSettings.clear(ProxyConfig.TIMEOUT_SETTING)
assert_eq(ProxyConfig.request_timeout_seconds(), ProxyConfig.TIMEOUT_DEFAULT)
func test_request_timeout_override_and_reject_nonpositive():
var ProxyConfig = preload("res://scripts/net/proxy_config.gd")
ProjectSettings.set_setting(ProxyConfig.TIMEOUT_SETTING, 12.5)
assert_eq(ProxyConfig.request_timeout_seconds(), 12.5)
# A non-positive override must NOT re-enable the hang — falls back to default.
ProjectSettings.set_setting(ProxyConfig.TIMEOUT_SETTING, 0.0)
assert_eq(ProxyConfig.request_timeout_seconds(), ProxyConfig.TIMEOUT_DEFAULT)
ProjectSettings.clear(ProxyConfig.TIMEOUT_SETTING)