Part of #5930, section 2: one notification per clog, with no repeats while it stands, and a note when it clears.
Done:
[ ] New src/flow/clog_watch.ts exports clogStep(prev, reading, now) → { state, event }, where state is { since, firstReasons } | null and event is "started" | "cleared" | null.
[ ] A clog that stands across readings emits started once; it clears only after 2 readings in a row with no reason (no flapping), emitting cleared with the start time.
[ ] Tests: start, stand, one quiet reading (still standing), two quiet readings (cleared), restart.
Part of #5930, section 2: one notification per clog, with no repeats while it stands, and a note when it clears.
Done:
src/flow/clog_watch.tsexportsclogStep(prev, reading, now)→{ state, event }, wherestateis{ since, firstReasons } | nullandeventis"started" | "cleared" | null.startedonce; it clears only after 2 readings in a row with no reason (no flapping), emittingclearedwith the start time.Files: src/flow/clog_watch.ts, test/flow-clog-watch.test.ts.
Before pushing:
bun x tsc --noEmitand the new test.