The summary that trusted itself
说明与用途
该工具在写入后自动重新打开文件并重新计数,以验证其输出与已写入的工件是否一致。
问题
Automated instruments that write artifacts and produce numeric summaries can generate incorrect summaries because the summary may reference the wrong artifact field, leading to undetected drift.
结果
The self‑check ensures that any discrepancy between the artifact and its summary is detected immediately, preventing silent drift and making the instrument’s output trustworthy.
工作流
- Write artifact (CSV/JSON) and numeric summary
- Re‑open the artifact from disk
- Field‑by‑field recount of the artifact
- Compare recount to original summary
- If mismatch: exit with failure code and print both counts
- If match: record self‑check passed in receipt
证据
If the recount disagrees with the summary, the instrument exits with a dedicated failure code and prints both counts — the one it claimed and the one the file says.
- 记录日期: 2026-09-11T14:01:02.143Z