From 0a7f895315e791b02d51b86ea9589e8210eae485 Mon Sep 17 00:00:00 2001 From: nav Date: Thu, 9 Apr 2026 01:19:26 +0000 Subject: [PATCH] docs(test): mark CF-06 and heartbeat failures --- TASKLIST.md | 6 +++++- Yonexus.Server | 2 +- tests/failure-path/MATRIX.md | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/TASKLIST.md b/TASKLIST.md index bc2d9d1..cf1205c 100644 --- a/TASKLIST.md +++ b/TASKLIST.md @@ -1140,11 +1140,15 @@ - AF-10:malformed auth_request payload - 覆盖 re_pair 后 secret 清理与 pairingStatus=revoked - 已同步更新 `tests/failure-path/MATRIX.md` 的 PF / AF / RP / HF 状态标记与当前备注 +- 已新增 `Yonexus.Server/tests/connection-heartbeat-failures.test.ts` + - CF-06:未认证 rule message 会关闭连接 + - HF-03:认证前心跳会返回 `AUTH_FAILED` + - HF-04:无会话心跳会返回 `AUTH_FAILED` **待完成** - AF-04:当前实现未单独暴露 `invalid_secret` 分支,需先决定是否保留该错误码语义 - RP 其余触发场景 -- CF / HF / SR 其余边界场景测试 +- CF / HF / SR 其余边界场景测试(除 CF-06、HF-03、HF-04) --- diff --git a/Yonexus.Server b/Yonexus.Server index 0717b20..3c760fc 160000 --- a/Yonexus.Server +++ b/Yonexus.Server @@ -1 +1 @@ -Subproject commit 0717b204f129fefdade87cc2b70e4e1442091b9b +Subproject commit 3c760fc0f42d2a22634f0f84aa5cf493a546185f diff --git a/tests/failure-path/MATRIX.md b/tests/failure-path/MATRIX.md index b16e757..5f39f95 100644 --- a/tests/failure-path/MATRIX.md +++ b/tests/failure-path/MATRIX.md @@ -66,7 +66,7 @@ This document defines the systematic test coverage for pairing and authenticatio | CF-03 | Duplicate connection | Same ID connects twice | Old connection closed, new accepted | ⬜ | | CF-04 | Protocol version mismatch | Unsupported version | Connection rejected with error | ⬜ | | CF-05 | Malformed hello | Invalid JSON | Error response, connection maintained | ⬜ | -| CF-06 | Unauthenticated rule message | Client sends before auth | Connection closed | ⬜ | +| CF-06 | Unauthenticated rule message | Client sends before auth | Connection closed | ✅ | | CF-07 | Reserved rule registration | Plugin tries `registerRule("builtin")` | Registration rejected | ⬜ | --- @@ -77,8 +77,8 @@ This document defines the systematic test coverage for pairing and authenticatio |----|----------|---------|-------------------|--------| | HF-01 | 7-minute timeout | No heartbeat received | Status → `unstable`, notify | ✅ | | HF-02 | 11-minute timeout | Still no heartbeat | Status → `offline`, disconnect | ✅ | -| HF-03 | Early heartbeat | Heartbeat before auth | Rejected/ignored | ⬜ | -| HF-04 | Heartbeat from unauthenticated | Wrong state | Error, possible disconnect | ⬜ | +| HF-03 | Early heartbeat | Heartbeat before auth | Rejected/ignored | ✅ | +| HF-04 | Heartbeat from unauthenticated | Wrong state | Error, possible disconnect | ✅ | ---