diff --git a/TASKLIST.md b/TASKLIST.md index 8f88c19..29a5520 100644 --- a/TASKLIST.md +++ b/TASKLIST.md @@ -1003,9 +1003,17 @@ ## Phase 11 — 测试与联调 ### YNX-1101 编写协议单元测试 +**状态** +- [x] 已完成(2026-04-09) + **目标** - 覆盖编解码、字段校验、错误码 +**已完成内容** +- 新增 `Yonexus.Protocol/tests/codec.test.ts` +- 覆盖 builtin 编解码、rule message/rewritten message 解析、保留字与非法标识符校验 +- 覆盖 encode/parse 边界、malformed message 报错与 `isBuiltinMessage` 行为 + ### YNX-1102 编写 Server 单元测试 **目标** - 覆盖 registry、pairing、auth、heartbeat sweep @@ -1015,7 +1023,9 @@ - 已新增 `tests/pairing-and-rules.test.ts` - 已覆盖 pairing request 创建、有效/无效/过期 code 校验、通知状态迁移 - 已覆盖 server rule registry 的 exact-match dispatch、保留字拒绝、重复注册拒绝 -- **待补**:auth 校验、runtime/registry 协作、heartbeat/liveness sweep 相关测试 +- 已新增 `tests/pairing-auth-liveness.test.ts` +- 已覆盖 auth 校验(public key/timestamp/nonce/rate limit/签名)与心跳 liveness 判定 +- **待补**:runtime/registry 协作、真实 transport flow 相关测试 ### YNX-1103 编写 Client 单元测试 **目标** @@ -1027,7 +1037,9 @@ - 已覆盖 client state 文件缺失初始化、状态保存/回读 - 已覆盖 `ensureClientKeyPair()` 的首次生成/重复调用复用,以及签名/验签基本链路 - 已覆盖 client rule registry 的 dispatch、保留字拒绝、重复注册拒绝 -- **待补**:runtime 状态机、auth_request 构造细节、heartbeat timer 与重连行为测试 +- 已新增 `tests/state-auth-heartbeat.test.ts` +- 已覆盖 auth_request signing input、nonce/timestamp 校验、状态机迁移与 heartbeat scheduler 行为 +- **待补**:runtime/transport 层真实重连/心跳联动测试 ### YNX-1104 编写 Server-Client 集成测试 **目标** diff --git a/Yonexus.Client b/Yonexus.Client index 8240191..df14022 160000 --- a/Yonexus.Client +++ b/Yonexus.Client @@ -1 +1 @@ -Subproject commit 824019168e8acc9c39ce341854f20b630d10879d +Subproject commit df14022c9a681af5a462487f71b9216681dec8c2 diff --git a/Yonexus.Protocol b/Yonexus.Protocol index 7e69a08..a7e1a9c 160000 --- a/Yonexus.Protocol +++ b/Yonexus.Protocol @@ -1 +1 @@ -Subproject commit 7e69a08443f9c45bddd929d46c3d4e71fd64b0f9 +Subproject commit a7e1a9c210d28f09f764509e9223dc913e0497b7 diff --git a/Yonexus.Server b/Yonexus.Server index b8008d9..35d787b 160000 --- a/Yonexus.Server +++ b/Yonexus.Server @@ -1 +1 @@ -Subproject commit b8008d930221df26256a0610bde77c981bd0f18b +Subproject commit 35d787be040ce5ca07726e7c10478cc3157e67b3