移除验证码解析功能,简化为纯短信转发

- 删除 VerificationCodeParser 及相关测试,短信捕获和推送不再解析验证码
- 飞书推送改为只发送短信原文,时间戳格式化为可读日期
- 移除主界面"只推送验证码"开关和"调试时上传完整短信正文"选项
- 移除"保存轮询间隔"按钮,开启轮询时自动保存间隔(未输入默认1秒)
- 按钮文字从"开始1秒轮询验证码"改为"开始短信轮询"
- 删除"打印最近30条短信"功能及相关 SmsInboxReader.logRecentMessages
- SmsInboxReader 用 RecentSmsResult 替换 RecentCodeResult
- FeishuWebhookConfigStore.Config 移除 filterVerificationCode/sendFullBodyDebug
- 修复代码缩进不一致问题
This commit is contained in:
2026-05-18 22:38:06 +08:00
parent 95a3c6d8c4
commit c5ef726134
27 changed files with 273 additions and 697 deletions
@@ -4,27 +4,27 @@
The app SHALL be validated on the user's Xiaomi 12S running HyperOS 3 and Android 15 before the SMS capture behavior is considered complete.
#### Scenario: Foreground validation
- **WHEN** the app is open in the foreground and a test SMS containing `验证码 123456` is received
- **THEN** the app MUST show `123456` as the latest parsed verification code
- **WHEN** the app is open in the foreground and a test SMS containing `这是一条短信原文样本` is received
- **THEN** the app MUST show that SMS body as the latest received SMS content
#### Scenario: Background validation
- **WHEN** the app has been moved to the background and a test SMS containing a new verification code is received
- **THEN** the app MUST either show the new code after returning to the app or report that background delivery was blocked
- **WHEN** the app has been moved to the background and a test SMS containing new SMS content is received
- **THEN** the app MUST either show that new SMS body after returning to the app or report that background delivery was blocked
#### Scenario: Lock screen validation
- **WHEN** the device is locked and a test SMS is received
- **THEN** the app MUST show the received result after unlock or report that delivery was blocked under lock screen conditions
### Requirement: Validate parser behavior with representative samples
The verification parser SHALL be validated with representative verification SMS examples and negative examples.
### Requirement: Validate SMS body handling with representative samples
The SMS body handling logic SHALL be validated with representative SMS examples and failure examples.
#### Scenario: Common valid samples
- **WHEN** parser tests include Chinese verification codes, English OTP messages, space-separated codes, hyphen-separated codes, and multiple candidates
- **THEN** all expected verification codes MUST be extracted with the correct normalized value
- **WHEN** tests include Chinese notices, English notification-like messages, multi-part messages, and regular promotional text
- **THEN** all expected SMS bodies MUST be preserved with the correct original content
#### Scenario: Negative samples
- **WHEN** parser tests include messages with phone numbers, dates, money amounts, tracking numbers, or no verification code
- **THEN** the parser MUST avoid returning a false verification code unless a stronger keyword-nearby rule applies
#### Scenario: Failure samples
- **WHEN** tests include empty bodies, unreadable message input, or missing permission states
- **THEN** the app MUST return a structured failure instead of a fabricated SMS result
### Requirement: Validate optional API assumptions separately
The app SHALL validate Google SMS APIs independently from the primary system broadcast path.