1
0

refactor: 移除 success 字段,简化为 matched 单层判定模型

This commit is contained in:
2026-05-11 13:12:55 +08:00
parent 548b44d28e
commit 35ba56888b
93 changed files with 3893 additions and 103 deletions

View File

@@ -0,0 +1,21 @@
## MODIFIED Requirements
### Requirement: 结果记录
系统 SHALL 在每次 checker 完成后,将结果写入 SQLite 数据存储,包含 target_id、timestamp、matched、duration_ms、status_detail、failure 字段。
#### Scenario: 执行成功且 expect 全部匹配
- **WHEN** checker 执行成功且所有 expect 规则匹配
- **THEN** 系统 SHALL 记录 matched=true、duration_ms、status_detailfailure 为 null
#### Scenario: 执行失败(网络错误、超时、进程异常)
- **THEN** 系统 SHALL 记录 matched=false、failure.kind="error" 和具体错误信息
#### Scenario: expect 不匹配
- **THEN** 系统 SHALL 记录 matched=false、failure.kind="mismatch" 和具体不匹配信息
### Requirement: 输出读取限制
系统 SHALL 对 command checker 的 stdout/stderr 输出设置大小限制。
#### Scenario: 输出超过 maxOutputBytes
- **WHEN** 子进程输出超过 maxOutputBytes 限制
- **THEN** 系统 MUST 停止读取并记录 matched=false 和结构化输出超限错误