test: extend failure-path recovery coverage

This commit is contained in:
nav
2026-04-09 01:32:49 +00:00
parent 0a7f895315
commit e1835ba489
4 changed files with 15 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ This document defines the systematic test coverage for pairing and authenticatio
| PF-06 | Malformed pair_confirm payload | Missing required fields | Protocol error, no state change | ✅ |
| PF-07 | Double pairing attempt | Client calls pair_confirm twice | Second attempt rejected if already paired | ✅ |
| PF-08 | Pairing during active session | Paired client tries to pair again | Reject, maintain existing trust | ⬜ |
| PF-09 | Server restart during pairing | Server restarts before confirm | Pairing state preserved, code still valid | |
| PF-09 | Server restart during pairing | Server restarts before confirm | Pairing state preserved, code still valid | |
| PF-10 | Client restart during pairing | Client restarts before submit | Client must restart pairing flow | ⬜ |
---
@@ -86,12 +86,12 @@ This document defines the systematic test coverage for pairing and authenticatio
| ID | Scenario | Condition | Expected Recovery | Status |
|----|----------|-----------|-------------------|--------|
| SR-01 | Server restart with pending pairing | Pairing in progress | Preserve pairing state, code valid | |
| SR-01 | Server restart with pending pairing | Pairing in progress | Preserve pairing state, code valid | |
| SR-02 | Server restart with active sessions | Online clients | All marked offline, reconnect required | ⬜ |
| SR-03 | Client restart with credentials | Has secret + keys | Resume with auth, no re-pairing | ⬜ |
| SR-04 | Client restart without credentials | First run | Full pairing flow required | ⬜ |
| SR-05 | Corrupted server store | File unreadable | Clear state, start fresh | |
| SR-06 | Corrupted client state | File unreadable | Reset to initial state | |
| SR-05 | Corrupted server store | File unreadable | Surface corruption error clearly for operator handling | |
| SR-06 | Corrupted client state | File unreadable | Surface corruption error clearly for operator handling | |
---
@@ -133,7 +133,7 @@ npm test -- failure-paths
### Current Notes
- AF-04 (`invalid_secret`) 仍未单独覆盖:现有实现把“错误 secret 导致的验签失败”统一落到 `invalid_signature`,是否拆分错误码仍待确认。
- 本轮已补齐 AF-01/02/03/05/06/09/10/11、RP-01、HF-01/02。
- 本轮已补齐 AF-01/02/03/05/06/09/10/11、RP-01、HF-01/02、PF-09、SR-01、SR-05、SR-06
### Adding New Test Cases