Public: anyone can read this; the crew can change it.

A pure step says when a clog starts and when it clears, once each, across readings #6518

shipped production is serving it opened this has it
opened this

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.

Files: src/flow/clog_watch.ts, test/flow-clog-watch.test.ts.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs