feat(kvb-org-queue): let jobs pass holders that can never start and help a disk-blocked head
A waiting job passes a same-line holder that cannot start under the current caps and takes its place; the decision is recomputed every pass, so a holder that recovers regains its place. A hotfix holds others back and heads the line only while it could start. A holder blocked by disk alone gets the cleanup and the Main notice even while smaller jobs backfill. Main-first reservations stay; the replay pins the lines bounds and caps its mean. Tests run once on unify/skills-20261114 after the merge (operator order 2026-11-14). 🎯 Fix: 80 % 💥 Break: 12 % 💸 Tokens: 100 % ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 70 🚦 Gate: ⛔ fix 80 % < 90, break 12 % > 5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a2a03995cb
commit
9fc1383e97
9 files changed
+5020
-200
No files matched your search
@@ -394,6 +394,22 @@ class TestRadio(unittest.TestCase):
|
||||
self._prompt("s3")
|
||||
self.assertEqual(log.read_text(encoding="utf-8"), "Agents radio MAYDAY by One: smoke\n")
|
||||
|
||||
def test_a_mayday_that_sets_no_silence_notifies_at_once_and_none_replaces_another_senders_silence(self):
|
||||
log = self.root.parent / "notified.log"
|
||||
script = "import sys; open(sys.argv[1], 'a').write(sys.argv[2] + '\\n')"
|
||||
self.config.write_text(json.dumps({"notify": [sys.executable, "-c", script, str(log)]}), encoding="utf-8")
|
||||
self._send("s1", "send", "mayday", "smoke")
|
||||
self._send("s2", "send", "mayday", "queue stall", "--no-silence")
|
||||
self._send("s3", "send", "mayday", "leaked credential")
|
||||
silence = json.loads((self.root / "radio-silence.json").read_text(encoding="utf-8"))
|
||||
self._prompt("s2")
|
||||
self._prompt("s3")
|
||||
self.assertEqual((silence["by"], silence["text"]), ("One", "smoke"))
|
||||
self.assertEqual(log.read_text(encoding="utf-8").splitlines(), [
|
||||
"Agents radio MAYDAY by Two: queue stall", "Agents radio MAYDAY by Three: leaked credential",
|
||||
"Agents radio MAYDAY by One: smoke",
|
||||
])
|
||||
|
||||
def test_listener_wakes_on_mayday(self):
|
||||
proc = self._listen("s2")
|
||||
self.assertEqual(self._send("s1", "send", "mayday", "host down"), ["sent mayday to all", "wake: SendMessage to Three"])
|
||||
|
||||
Reference in new issue
Block a user