7b9ea131a2
Persists a stage tally to scan_runs at a bounded cadence — every flushEvery items OR every flushPeriod elapsed, whichever fires first. Caller supplies marshal + persist closures so each stage owns its own tally type. Tick swallows mid-stage persist errors silently (observability bug, not scan failure); Flush propagates errors so the orchestrator's captureErr can surface them. Tests cover: count-based flush, time-based flush, Flush always persists, Tick swallows errors and keeps firing, Flush propagates errors, counters reset after each flush.