feat(playable): 首个 Mac 联网内测版 STB-01 soak 工具与发布状态文档
- 新增 script/playable_soak.sh:先做 soak 配置/资源校验,无 --allow-gameplay 只校验不启动客户端;N(>=10) 次独立正常退出运行 + 墙钟 soak,失败即停止后续 运行并记 BLOCKED;写本批次 release-manifest.json 后聚合 - run_client_gate.sh:确认的故障代理对所有 suite 启动(共享场景的退出运行也经代理); soak 超时下限只约束 soak 客户端(validate_soak 增加 soak_client 参数) - 新增本地 127.0.0.1 故障代理、RSS 采样/内存判定、窗口/指标/流程模块及其测试 - forest_mob_render_test 输出 PASS/FAIL 标记,供 rendering_batch_test.sh 识别 - 新增 docs/FIRST-MAC-PLAYABLE-STATUS.md:如实记录 PASS/BLOCKED、已知问题与环境需求 - .gitignore 排除本地场景配置、凭据文件与运行输出 离线回归:rendering_batch_test.sh failures=0,playable_gate_test.sh PASS, node 夹具测试 PASS。未联网运行,未重建候选包。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ft3kXpNdLbKEfg5uDLfqVF
This commit is contained in:
+24
-5
@@ -51,7 +51,13 @@ func _init() -> void:
|
||||
func start(assets_root: String = "", injected_client: Node = null) -> void:
|
||||
_assets = assets_root
|
||||
serverinfo = ServerInfoRes.new()
|
||||
serverinfo.load_file("res://serverlist.txt") # 有就用,没有用内置
|
||||
# 联网内测的地址覆盖只在 MT_TEST_MODE=playable 生效;父运行器把同一路径交给
|
||||
# 预检,保证预检目标与客户端真实连接目标来自同一个 ServerInfo 解析。
|
||||
var test_serverlist := OS.get_environment("MT_PLAYABLE_SERVERLIST").strip_edges()
|
||||
if OS.get_environment("MT_TEST_MODE") == "playable" and not test_serverlist.is_empty():
|
||||
serverinfo.load_file(test_serverlist)
|
||||
else:
|
||||
serverinfo.load_file("res://serverlist.txt") # 有就用,没有用内置
|
||||
if injected_client != null:
|
||||
client = injected_client
|
||||
elif ClassDB.class_exists("M2Client"):
|
||||
@@ -84,6 +90,17 @@ func start(assets_root: String = "", injected_client: Node = null) -> void:
|
||||
func state() -> int:
|
||||
return _state
|
||||
|
||||
# Playable-test only: choose the server/channel before the deferred autologin
|
||||
# connect runs, and return the exact address _do_connect() will use.
|
||||
func select_test_server(server_index: int, channel: int) -> Dictionary:
|
||||
if OS.get_environment("MT_TEST_MODE") != "playable" or serverinfo == null:
|
||||
return {}
|
||||
if serverinfo.server(server_index).is_empty():
|
||||
return {}
|
||||
_sel_server = server_index
|
||||
_sel_channel = channel
|
||||
return serverinfo.address(_sel_server, _sel_channel)
|
||||
|
||||
# Read-only adapter for the packaged playable test. It deliberately returns
|
||||
# summaries rather than the private UI/game nodes so a report cannot retain a
|
||||
# stale scene reference across reconnect or map reload.
|
||||
@@ -147,14 +164,16 @@ func _on_char_list(list: Array) -> void:
|
||||
if auto_login and not _chars.is_empty():
|
||||
var idx := int(_chars[0].get("index", 0))
|
||||
if _auto_char_slot >= 0:
|
||||
# An explicit MT_CHAR_SLOT that the account lacks must not silently enter
|
||||
# another character; stay on the select screen instead.
|
||||
idx = -1
|
||||
for character in _chars:
|
||||
if int(character.get("index", -1)) == _auto_char_slot:
|
||||
idx = _auto_char_slot
|
||||
break
|
||||
if client.has_method("enter_game"):
|
||||
client.enter_game(idx)
|
||||
elif client.has_method("select_character"):
|
||||
client.select_character(idx)
|
||||
if idx >= 0:
|
||||
# Remember the slot so a later in-game reconnect re-enters the same character.
|
||||
_enter_character(idx)
|
||||
|
||||
func _on_char_name_changed(pid: int, name: String) -> void:
|
||||
var sc: Node = _ui.get_node_or_null("CharSelect") if _ui and _state == SELECT else null
|
||||
|
||||
Reference in New Issue
Block a user