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

@@ -181,7 +181,7 @@ targets:
**RecentSample**: `timestamp``durationMs``up`
**CheckResult**: `timestamp``success``matched``durationMs``statusDetail``failure`
**CheckResult**: `timestamp``matched``durationMs``statusDetail``failure`
**CheckFailure**: `kind`error/mismatch`phase``path``expected``actual``message`
@@ -245,12 +245,13 @@ bun run verify
## 目标状态判定
层判定模型,适用于 HTTP 和 Command 两种类型:
层判定模型,适用于 HTTP 和 Command 两种类型:
- **success**: 拨测是否成功完成HTTP 收到响应 / Command 正常退出)
- **matched**: 是否符合 expect 规则(无 expect 时默认为 true
- **UP** = success AND matched
- **DOWN** = NOT success OR NOT matched
- **UP** = matched
- **DOWN** = NOT matched
执行失败(网络错误、超时、进程崩溃)和 expect 不匹配都统一为 `matched=false`,通过 `failure.kind` 区分(`"error"` vs `"mismatch"`)。
## 已知限制