2V1-e: live smoke passes against the 40250 server

port.login_live ran twice against the live server: auth handshake, key
agreement and LOGIN3, game LOGIN2, the character list, the DirectEnter
reconnect, CHARACTER_SELECT and GC_MAIN_CHARACTER -> LoadData +
CG_CLIENT_VERSION, with no unknown packets on the stream. The loading
burst after the main character, ENTERGAME and failure popups stay
NEEDS_LIVE for 2V2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 16:42:15 +09:00
co-authored by Claude Opus 5.5
parent 2a8750e736
commit 0073469dd1
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -511,3 +511,4 @@
{"time": "2026-09-23T06:00:34Z", "event": "port_round", "unit": "PORT-PLAN 2V1-b/c: PythonNetworkStream phases + AccountConnector + net module", "ported": ["UserInterface/PythonNetworkStream.cpp, PythonNetworkStreamEvent.cpp, PhaseHandShake/Login/Select/Loading/Offline (port_copy verbatim)", "UserInterface/AccountConnector.cpp, InsultChecker.cpp, AffectFlagContainer.cpp (port_copy verbatim)", "UserInterface/PythonNetworkStreamModule.cpp (net module, replaces the 2V0-e stub)", "PythonPackModule.cpp login-key functions compiled again", "Locale.cpp LocaleService_Is*/security key block (platform PythonApplication.cpp, verbatim)", "WiseLogicXTrap no-XTRAP branch"], "adapted": ["Packet.h long fields -> 32-bit LONG (PORT)", "singleton<T> pointer offset via intptr_t (PORT)", "grammar.h shim #undef BYTE (40250's bitset.h copy drops #define BYTE char)", "PythonBoot creates CPythonNetworkStream/CAccountConnector/CPythonPlayer/CFlyingManager/CEffectManager and calls initnet()", "app.Create creates CNetworkDevice; Process() runs CPythonNetworkStream then CAccountConnector", "port_gate.sh macos builds all; port-only config finds iconv"], "divergent": ["ProcessCRC stubbed (magic cube piece only feeds PhaseGame attack packets)", "unported logic units in the link closure (PythonPlayer, NetworkActorManager, FlyingObjectManager, GuildMarkDownloader/Uploader, MarkManager, PhaseGame*/PythonGuild members) are stand-ins under platform/pending/; loading-phase CharacterUpdate/PointChange/ItemSet/QuickSlotAdd stand-ins only consume the packet", "guild mark uploader/downloader Process not called yet"], "needs_live": ["login/select/loading against the 40250 server (2V1-e)"], "tests": ["port.packet: pass (38 login/select/loading packet sizes match wire_classic.h)", "ctest 33/33 pass", "script/port_gate.sh macos: PASS", "godot --headless --path project --script python_host_test.gd: pass (net is the ported module)"], "todo": ["2V1-d FakeServer HandShake->Login->Select->Loading", "2V1-e live smoke", "port the platform/pending units"]}
{"time": "2026-09-23T06:18:52Z", "event": "port_round", "unit": "PORT-PLAN 2V1-d: offline FakeServer login -> select -> loading", "ported": ["PythonNetworkStreamPhaseGame SendClientVersionPacket body (verbatim, in the platform/pending stand-in)"], "adapted": ["NetStream::ActivateCipher decrypts the unread receive buffer (PORT: ciphertext pipelined behind KEY_AGREEMENT_COMPLETED)", "CPythonApplication marked final (PORT: no application object on the platform, virtual overrides must be called directly)", "platform CPythonApplication::GetGlobalTime reads CTimer (40250 caches it in m_fGlobalTime each Process); SetCenterPosition/SetEventCamera/SetDefaultCamera stubs (2V3)"], "divergent": ["GetExcutedFileName is a platform stub, so CG_CLIENT_VERSION carries an empty filename", "SendClientVersionPacket lives in the PhaseGame stand-in until PhaseGame is ported"], "needs_live": ["login/select/loading against the 40250 server (2V1-e)"], "tests": ["port.login_flow: pass (auth + two game connections, every sequence byte checked; 5x repeat stable)", "ctest 34/34 pass", "script/port_gate.sh macos: PASS", "godot python_host_test.gd: pass"], "todo": ["2V1-e live smoke", "port the platform/pending units", "game.GameWindow after loading (2V2)"]}
{"time": "2026-09-23T06:23:33Z", "event": "port_round", "unit": "PORT-PLAN 2V1-e: live smoke harness (port.login_live)", "ported": [], "adapted": ["port_login_flow_test live mode: server and account from MT_LIVE_* env vars only, passed to Python as objects, never printed"], "divergent": [], "needs_live": ["login -> character list -> loading against 192.168.21.203 (host unreachable from this machine on 2026-09-23)", "the live loading-phase packet burst through the platform/pending stand-ins", "auth/login failure popups (wrong password, already logged in, blocked)", "CG_CLIENT_VERSION with an empty filename (GetExcutedFileName stub) accepted by the server"], "tests": ["port.login_flow: pass", "port.login_live: skipped without MT_LIVE_*", "script/port_gate.sh macos: PASS"], "todo": ["run port.login_live once the server is reachable", "port the platform/pending units"]}
{"time": "2026-09-23T07:40:54Z", "event": "port_round", "unit": "PORT-PLAN 2V1-e: live smoke against 192.168.21.203", "ported": [], "adapted": [], "divergent": [], "needs_live": ["the loading-phase packet burst after GC_MAIN_CHARACTER and CG_ENTERGAME (2V2 GameWindow)", "auth/login failure popups", "server handling of CG_CLIENT_VERSION with an empty filename (not observable client-side)"], "tests": ["port.login_live: pass x2 against 192.168.21.203 (auth handshake + key agreement + LOGIN3, game LOGIN2, character list, DirectEnter reconnect, CHARACTER_SELECT, GC_MAIN_CHARACTER -> LoadData + CG_CLIENT_VERSION; no unknown packets)", "port.login_flow: pass"], "todo": ["2V2", "port the platform/pending units"]}
+1 -1
View File
@@ -412,7 +412,7 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
| 2V1-b | `PythonNetworkStream` + HandShake/Login/Select/Loading phase + `AccountConnector` | 完成:`PythonNetworkStream{,Event,PhaseHandShake,PhaseLogin,PhaseSelect,PhaseLoading,PhaseOffline}.cpp`、`AccountConnector.cpp`、`InsultChecker.cpp`、`AffectFlagContainer.cpp` 原样 `port_copy`;`Packet.h` 里所有 `long` 字段改为 32 位 `LONG`(PORT 标注),`port.packet` 把登录/选角/Loading 用到的 38 个包的尺寸与已在真服 1:1 验证过的 `net/classic/wire_classic.h` 比对(两头宏冲突,分两个编译单元);`PythonPackModule.cpp` 的登录密钥函数恢复编译;`Locale.cpp` 的 `LocaleService_Is*`/安全密钥部分原样放进 platform `PythonApplication.cpp`;`WiseLogicXTrap` 取 40250 无 XTRAP 分支,`ProcessCRC` 为桩(魔方只用于 PhaseGame 攻击包)。链接闭包里尚未移植的逻辑单元(`PythonPlayer`、`NetworkActorManager`、`FlyingObjectManager`、`GuildMark*`、`MarkManager`、PhaseGame*/`PythonGuild` 的部分成员)放在 `extension/src/platform/pending/<Lib>/` 作为替身,移植对应单元的提交里删除;Loading 阶段会收到的 CharacterUpdate/PointChange/ItemSet/QuickSlotAdd 替身只吃掉包体,保证读流不断。`port_gate.sh macos` 改为构建 `all`(此前 ctest 会跑门禁没构建的测试),port-only 配置补 `find_library(iconv)` |
| 2V1-c | `net` 模块(`PythonNetworkStreamModule.cpp`)替换 2V0-e 的桩;`app.Create`/`Process` 接网络 | 完成:`PythonNetworkStreamModule.cpp` 原样移植,`GameplayModules.cpp` 的 `net` 桩删除,`PythonBoot` 按 40250 `CPythonApplication` 成员顺序创建 `CPythonNetworkStream`/`CAccountConnector`/`CPythonPlayer`/`CFlyingManager`/`CEffectManager` 并调用 `initnet()`;`app.Create` 创建 `CNetworkDevice`,`Process()` 每帧先 `CPythonNetworkStream::Process` 再 `CAccountConnector::Process`(公会标记上传/下载的 Process 随 `GuildMark*` 移植)。`python_host_test.gd` 断言 `net` 不再是桩(`PHASE_WINDOW_SELECT == 2`、未连接) |
| 2V1-d | FakeServer 离线跑完 HandShake→Login→Select→Loading | 完成:`port.login_flow` 用真实 40250 root 脚本(intrologin/introselect/introloading/networkmodule)驱动移植的 `CPythonNetworkStream` + `CAccountConnector`,对接 `tests/port_login_flow_server.cpp` 的回环 auth + game 假服(用已在真服 1:1 验证过的 `net/classic` 包布局、序列表与 cipher 按 40250 `desc.cpp`/`input*.cpp` 应答,与客户端不共享代码):握手 bias/重试 + 密钥协商 → `CG_LOGIN3`/`GC_AUTH_SUCCESS` → `CG_LOGIN2` → `GC_EMPIRE`/PHASE_SELECT/`GC_LOGIN_SUCCESS_NEWSLOT` 到 `SelectCharacterWindow` → `StartGame()` 3 秒后 `DirectEnter` 按槽位地址重连、再登录、直入 `LoadingWindow` 发 `CG_CHARACTER_SELECT` → PHASE_LOADING/`GC_MAIN_CHARACTER`/`GC_CHARACTER_POINTS` → 客户端回 `CG_CLIENT_VERSION(2)`;假服逐包校验序列字节。修正:`NetStream::ActivateCipher` 解密 COMPLETED 后已缓冲的密文(PORT,40250 靠服务器 pulse 间隔规避此竞争);`CPythonApplication` 加 `final`(PORT,platform 无应用对象,虚函数需直接调用),补 `GetGlobalTime`(`app.GetTime`)与 `SetCenterPosition`/`SetEventCamera`/`SetDefaultCamera` 桩;`SendClientVersionPacket` 原样放进 PhaseGame 替身。偏差:`GetExcutedFileName` 仍为桩(版本包文件名为空)。Loading 结束后 `net.StartGame()` 打开 `game.GameWindow` 属 2V2 |
| 2V1-e | 真服 smoke(凭据只从环境变量读) | 进行中:`port.login_live`(同一 `port_login_flow_test`,参数 `live`)走同一脚本路径连真服,以客户端自身状态为证据(选角窗口 + 槽位有名字 + 帝国号;`LoadingWindow.LoadData` 已由 `GC_MAIN_CHARACTER` 调用,随后同一调用发 `CG_CLIENT_VERSION`),在 `net.StartGame()` 进游戏前退出。`MT_LIVE_HOST`/`MT_LIVE_LOGIN`/`MT_LIVE_PASSWORD` 必填(缺则 SKIP),`MT_LIVE_AUTH_PORT`(11000)/`MT_LIVE_GAME_PORT`(13000)/`MT_LIVE_SLOT`(0) 可选,凭据不打印不入库。NEEDS_LIVE:2026-09-23 本机到 192.168.21.203 不通,尚未实跑 |
| 2V1-e | 真服 smoke(凭据只从环境变量读) | 完成:`port.login_live`(同一 `port_login_flow_test`,参数 `live`)走同一脚本路径连真服,以客户端自身状态为证据(选角窗口 + 槽位有名字 + 帝国号;`LoadingWindow.LoadData` 已由 `GC_MAIN_CHARACTER` 调用,随后同一调用发 `CG_CLIENT_VERSION`),在 `net.StartGame()` 进游戏前退出。`MT_LIVE_HOST`/`MT_LIVE_LOGIN`/`MT_LIVE_PASSWORD` 必填(缺则 SKIP),`MT_LIVE_AUTH_PORT`(11000)/`MT_LIVE_GAME_PORT`(13000)/`MT_LIVE_SLOT`(0) 可选,凭据不打印不入库。2026-09-23 对 192.168.21.203 连跑两次通过:auth 握手/密钥协商/LOGIN3、game LOGIN2、选角列表、DirectEnter 重连、CHARACTER_SELECT、主角包全部按移植代码走通,读流无未知包。NEEDS_LIVE:主角包之后的 Loading 包洪流与 ENTERGAME(2V2 的 GameWindow)、登录失败弹窗、服务器对空文件名版本包的处理(客户端侧不可观测)|
3. **2V2 — GamePhase/角色显示**:加入 GamePhase 的最小分派闭包、`PythonCharacterManager`、`InstanceBase`、`ActorInstance`
及角色模型/动画/资源 adapter。验收为进入游戏、创建主角并显示可辨认的静止角色;这个切片要求 2D 的 proto 和所需资源通过
strict gate。