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

A pure function writes the note posted when a clog clears: cause, time to detect, time to clear, stranded dollars #6519

shipped production is serving it opened this has it
opened this

Part of #5930, section 3: when a clog clears, a short note is posted automatically.

Done:

  • [ ] New src/flow/clog_note.ts exports clogNote({ reasons, startedAt, detectedAt, clearedAt, strandedUsd }) returning markdown: one line of cause, then the minutes to detect and the minutes to clear, and the stranded dollars at their peak.
  • [ ] Durations over 90 minutes read in hours ("2.5 h"); none reads as a negative.
  • [ ] Tests: a full note, a note with no dollars, durations in minutes and in hours.

Files: src/flow/clog_note.ts, test/flow-clog-note.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