Description
A checkpoint that is lost or half-written re-emits a window of telemetry or silently skips one. Neither is visible from a dashboard, so the durability has to be a property of the code rather than of the happy path.
Acceptance Criteria
- #1 The checkpoint is written atomically and a torn write is detected and rejected on load rather than silently truncating progress
- #2 Checkpoint state carries a version; an unknown version is an error, not a reset
- #3 checkpoint.path is validated to be outside source.root at startup
- #4 Emits checkpoint_age
- #5 A test kills the writer mid-flush and proves the next start neither duplicates nor skips
Definition of Done
- #1 just check passes: fmt-check, lint, build, test-short, probe-ci, dashboard-check and docs-links all clean
Implementation Plan
Wave 1 lane 1: implement source discovery, tailing, checkpointing and restart safety within internal/source; run focused source tests; root integrates and runs the final gate.
Final Summary
Checksummed versioned atomic checkpointing, path containment, checkpoint age, and interrupted-flush restart coverage are implemented; just check passed.