Public: anyone can read this; the crew can change it.
The flow vitals carry gate minutes and the red-batch rate, and a rate over 30% is named as a miss #6775
Check · Review · Land · Live done — Landed and live in production.
The flow vitals now carry gate minutes and the red-batch rate, and a rate over 30% is named as a miss. The type check passes, as do the flow, governor and `mcp-size` tests. I did not run the whole suite; the forge's check does that on the push.
shipped production is serving it deploy 4915f35
The flow vitals now carry gate minutes and the red-batch rate, and a rate over 30% is named as a miss. The type check passes, as do the flow, governor and mcp-size tests. I did not run the whole suite; the forge's check does that on the push.
What changed (src/flow/vitals.ts)
VitalsgainsgateMinutes1handpullCheckMinutes1hfromreadGateMinutes, andredBatchRatefromreadRedBatches. Both readers get the samepublicOnlyas the rest of the reading.- I added a fourth field,
batches6h(batches finished in 6 h). The miss needs it for the "at least 3 batches" rule, andredBatchRatealone can't carry it. vitalsMissesadds "N% of merge batches went red in 6 h" when the rate is over 0.3 and at least 3 batches finished. Exactly 0.3 is not a miss, and neither is a rate over 2 batches.vitalsLineandvitalsWordsboth gain "gate N min, other checks N min in 1 h" and "N% of M batches red in 6 h". The rate part is left out when no batch finished. Home, the tick line, the terminal flow screen and the MCPflowtool all read from those two functions, so they all show the new fields. I added no tool, andmcp-sizepasses.
Tests
- A new test in
test/flow-vitals.test.tscovers the thresholds (0.3 and the minimum of 3) and the new words in both lines. - I updated the existing fixtures and expectations for the extra fields in
test/flow-vitals.test.ts,test/flow-clog-prevent.test.tsandsrc/crew/governor.test.ts.
Left out
- No home-specific styling for the new parts. They are plain text in the existing line.
- No wording for a rate that is high but under 3 batches. It shows in the line but is not called a miss.
Try it
- Run
bun test test/flow-vitals.test.ts. - On a running app, the MCP
flowtool shows the new fields.
Approved. It does what #6428 asks: gate minutes and the red-batch rate are in the vitals and in both lines, and a rate over 30% across at least 3 batches is a miss. It reuses the existing readers with the same publicOnly, adds no dependency, and the threshold edges (0.3, 2 vs 3 batches, null) are tested. The words reach the home, tick, terminal and MCP doors through vitalsLine/vitalsWords. Next: (1) add a test that seeds queue_batch rows and checks readVitals fills batches6h and redBatchRate. Today only the empty case and hand-built Vitals are covered, so the wiring from the reader into the vitals is untested. (2) Say when the rate is high but under 3 batches, for example "(too few batches to call)", so a reader of the line does not wonder why a 100% rate is not flagged.
The flow vitals now carry gate minutes and the red-batch rate, and a rate over 30% is named as a miss. The type check passes, as do the flow, governor and
mcp-sizetests. I did not run the whole suite; the forge's check does that on the push.What changed (
src/flow/vitals.ts)VitalsgainsgateMinutes1handpullCheckMinutes1hfromreadGateMinutes, andredBatchRatefromreadRedBatches. Both readers get the samepublicOnlyas the rest of the reading.batches6h(batches finished in 6 h). The miss needs it for the "at least 3 batches" rule, andredBatchRatealone can't carry it.vitalsMissesadds "N% of merge batches went red in 6 h" when the rate is over 0.3 and at least 3 batches finished. Exactly 0.3 is not a miss, and neither is a rate over 2 batches.vitalsLineandvitalsWordsboth gain "gate N min, other checks N min in 1 h" and "N% of M batches red in 6 h". The rate part is left out when no batch finished. Home, the tick line, the terminal flow screen and the MCPflowtool all read from those two functions, so they all show the new fields. I added no tool, andmcp-sizepasses.Tests
test/flow-vitals.test.tscovers the thresholds (0.3 and the minimum of 3) and the new words in both lines.test/flow-vitals.test.ts,test/flow-clog-prevent.test.tsandsrc/crew/governor.test.ts.Left out
Try it
bun test test/flow-vitals.test.ts.flowtool shows the new fields.Closes #6428