44 lines
1.2 KiB
Markdown
44 lines
1.2 KiB
Markdown
---
|
||
title: "Zero Data Loss Guarantee"
|
||
type: concept
|
||
tags: []
|
||
last_updated: 2026-05-01
|
||
---
|
||
|
||
## Definition
|
||
|
||
通过数学约束强制执行 `Source_Rows == Success_Rows + Quarantine_Rows` 的数据修复保证机制。任何不匹配立即触发 Sev-1 告警与系统异常。
|
||
|
||
## Invariant
|
||
|
||
```
|
||
Source_Rows == Success_Rows + Quarantine_Rows
|
||
```
|
||
|
||
## Row Lifecycle
|
||
|
||
| State | Description | Destination |
|
||
|-------|-------------|-------------|
|
||
| `AI_FIXED` | SLM 置信度 ≥ 0.75,lambda 验证通过 | Staging → Production |
|
||
| `HUMAN_REVIEW` | 置信度 < 0.75,或无法自动修复 | Human Quarantine Dashboard |
|
||
|
||
## Guarantees
|
||
|
||
- **Mathematical constraint, not a goal**: 不满足等式时系统立即失败,不允许静默通过
|
||
- **Full tracking**: 每条异常行在修复生命周期中始终被追踪
|
||
- **No silent corruption**: 修复后的数据先到 staging,确认后才写生产
|
||
|
||
## Alert Conditions
|
||
|
||
```python
|
||
if source != success + quarantine:
|
||
trigger_alert(severity="SEV1", message=f"DATA LOSS DETECTED: {missing} rows")
|
||
raise DataLossException(...)
|
||
```
|
||
|
||
## Related
|
||
|
||
- [[Semantic Anomaly Compression]]
|
||
- [[Air-Gapped SLM Fix Generation]]
|
||
- [[Lambda Safety Gate]]
|