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

A pure read says whether the forge is clogged, and which threshold says so #6516

shipped production is serving it opened this has it
opened this

Part of #5930, section 2: a clog is declared on thresholds.

Done:

  • [ ] New src/flow/clog.ts exports clogOf(input) taking plain numbers: conflicted, opened and landed over 2 h, and the oldest approved wait in hours. It returns { clogged, reasons }, where reasons name each threshold crossed: conflicted > 10; landed < 50% of opened over 2 h (only when 10 or more opened); oldest approved wait > 24 h.
  • [ ] Thresholds are exported constants.
  • [ ] Tests: each threshold alone fires, none fires on a quiet forge, a pile of fewer than 10 opened never counts as the landing ratio.

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