diff --git a/TASKLIST.md b/TASKLIST.md index db58b27..bab0d55 100644 --- a/TASKLIST.md +++ b/TASKLIST.md @@ -548,6 +548,9 @@ --- ### YNX-0604 实现 pair_request / pair_confirm / pair_success +**状态** +- [x] 已完成(2026-04-08) + **目标** - 打通完整配对流程 @@ -564,9 +567,19 @@ - 正确 code 可完成配对 - 错误 code / 过期 code 会失败 +**已完成内容** +- Server runtime 已在 `hello_ack` 后发送 `pair_request`,并复用已有 pending pairing 的 TTL/状态元数据 +- Client runtime 已接收 `pair_request`,记录 pending pairing 元数据并切换到 `waiting_pair_confirm` +- Client runtime 已新增 `submitPairingCode()`,用于发送 `pair_confirm` +- Server runtime 已实现 `pair_confirm` 校验、`pair_success` 下发,并在成功后把 secret/publicKey 持久化到服务端记录 +- Client runtime 已在收到 `pair_success` 后保存 secret/pairedAt 到本地 state + --- ### YNX-0605 实现配对失败路径 +**状态** +- [x] 已完成(2026-04-08) + **目标** - 补齐 pairing 相关失败逻辑 @@ -581,6 +594,12 @@ **验收标准** - 失败后不会留下脏状态导致后续无法重试 +**已完成内容** +- Server runtime 已为 `pair_confirm` 补齐 `identifier_not_allowed`、`invalid_code`、`expired`、`internal_error` 的 `pair_failed` 返回 +- Server runtime 已在配对通知失败时下发 `pair_failed(admin_notification_failed)` 并清理 pending pairing 状态,避免留下脏状态 +- Client runtime 已记录最近一次 pairing failure,并根据 `expired` / `admin_notification_failed` 自动回退到 `pair_required` +- 其他失败原因会保留 `waiting_pair_confirm`,允许客户端在同一 pairing 会话内重试输入 code + --- ## Phase 7 — Authentication 主流程 diff --git a/Yonexus.Client b/Yonexus.Client index fc226b1..cec5978 160000 --- a/Yonexus.Client +++ b/Yonexus.Client @@ -1 +1 @@ -Subproject commit fc226b1f1893f443a5d6a9a9c608406fc921d3b8 +Subproject commit cec59784de4cd1f0a9643512cd233bb8ebfa5ccb diff --git a/Yonexus.Server b/Yonexus.Server index cd09fe6..a05b226 160000 --- a/Yonexus.Server +++ b/Yonexus.Server @@ -1 +1 @@ -Subproject commit cd09fe6043db70f76905663eba43d236d0c3de07 +Subproject commit a05b226056c97f3f2ab85737050135cd6935fc54