1
0
Files
DiAL/openspec/changes/archive/2026-05-11-simplify-judgment-model/specs/probe-engine/spec.md

22 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 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 和结构化输出超限错误