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

One test seeds a clog (51 opened against 15 landed, six pulls on one file) and proves the governor and the hot-file hold prevent it #6537

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This adds `test/flow-clog-prevent.test.ts`, one test that seeds the clog and checks both defences against it. It passes in about 0.5 s and `bun x tsc --noEmit` is clean. I did not run the rest of the suite.

shipped production is serving it deploy 7cfd21c

opened this

This adds test/flow-clog-prevent.test.ts, one test that seeds the clog and checks both defences against it. It passes in about 0.5 s and bun x tsc --noEmit is clean. I did not run the rest of the suite.

  • Governor: with 51 opened against 15 landed in the last hour (120 against 40 over six hours, 8 open) and a ceiling of 7, governedSlots drops to 3. Its reason reads "Builders 7 → 3: 51 opened vs 15 landed last hour".
  • Hot-file hold: rememberPullFiles seeds six open pulls on src/hot.ts. heldNow then holds a fresh issue naming src/hot.ts as hot_file. An issue naming src/cold.ts is not held and stays startable.

The vitals are a plain object handed to governedSlots, not rows read back through readVitals. That keeps the test off the wall clock and off git. The cost is that the SQL in readVitals is not exercised here; test/flow-vitals.test.ts already covers it.

The governor and the hold are checked side by side, not through one picker tick. The slot count and the hold are computed separately in the code, so I did not wire them into a single run.

Closes #6523

commented

This adds test/flow-clog-prevent.test.ts, one test that seeds the clog and checks both defences against it. It passes in about 0.5 s and bun x tsc --noEmit is clean. I did not run the rest of the suite.

  • Governor: with 51 opened against 15 landed in the last hour (120 against 40 over six hours, 8 open) and a ceiling of 7, governedSlots drops to 3. Its reason reads "Builders 7 → 3: 51 opened vs 15 landed last hour".
  • Hot-file hold: rememberPullFiles seeds six open pulls on src/hot.ts. heldNow then holds a fresh issue naming src/hot.ts as hot_file. An issue naming src/cold.ts is not held and stays startable.

The vitals are a plain object handed to governedSlots, not rows read back through readVitals. That keeps the test off the wall clock and off git. The cost is that the SQL in readVitals is not exercised here; test/flow-vitals.test.ts already covers it.

The governor and the hold are checked side by side, not through one picker tick. The slot count and the hold are computed separately in the code, so I did not wire them into a single run.

Approved

Test-only pull, no UI or door change. The governor assertions match governor.ts: 51 opened vs 15 landed with ceiling 7 gives 3 slots and the reason text. The hot-file hold matches held.ts and hot_files.ts: six pulls (HOT_PULLS+1) on src/hot.ts hold the issue naming it, and the cold one stays startable. Cleanup resets the remembered files. I could not run the file here because it is not in my checkout, so I read it against the sources. Two things to do next: (1) drive one picker tick so the slot count and the hold are proven together instead of side by side; (2) add a boundary case at exactly HOT_PULLS pulls, since the test uses HOT_PULLS+1 and would not catch an off-by-one.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs