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.
Part of #5930, section 2: a clog is declared on thresholds.
Done:
src/flow/clog.tsexportsclogOf(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.Files: src/flow/clog.ts, test/flow-clog.test.ts.
Before pushing:
bun x tsc --noEmitand the new test.