replace urgency priority queue with strict FIFO
Drop the urgency score and interrupt/preempt decisions: intake is now idle -> dispatch, busy -> append to a bounded FIFO queue (RequestQueue). The running process always finishes before the next queued request. - queue.py: UrgencyQueue -> RequestQueue (deque, no weight/age/recency) - scheduler.py: remove _priority_score, _interrupt_choice, urgency constants, and the weight threaded through dispatch/authoring/requeue - dashboard/static/gateway: drop weight + preempted handling - tests + docs updated; flow-main.svg regenerated
This commit is contained in:
1 parent
a354958599
commit
1dc0550659
18 files changed
+173
-341
No files matched your search
@@ -98,12 +98,12 @@ def build_service(llm, config):
|
||||
def test_gateway_humanizes_only_result_lines():
|
||||
llm = FakeClient(reply="It is 12:00.")
|
||||
service = build_service(llm, {"humanize": {"enabled": True}, "simplex": {}})
|
||||
service._reply("simplex", "c", "[high] time.now: ok — 12:00", kind="result")
|
||||
service._reply("simplex", "c", "urgency low (weight 0.20)", kind="status")
|
||||
service._reply("simplex", "c", "time.now: ok — 12:00", kind="result")
|
||||
service._reply("simplex", "c", "queued", kind="status")
|
||||
service._reply("simplex", "c", "Which account?", kind="question")
|
||||
assert [service.outbound["simplex"].get_nowait().text for _ in range(3)] == [
|
||||
"It is 12:00.",
|
||||
"urgency low (weight 0.20)",
|
||||
"queued",
|
||||
"Which account?",
|
||||
]
|
||||
|
||||
@@ -111,8 +111,8 @@ def test_gateway_humanizes_only_result_lines():
|
||||
def test_gateway_humanize_off_by_default():
|
||||
llm = FakeClient(reply="should not be used")
|
||||
service = build_service(llm, {"simplex": {}})
|
||||
service._reply("simplex", "c", "[high] time.now: ok — 12:00", kind="result")
|
||||
assert service.outbound["simplex"].get_nowait().text == "[high] time.now: ok — 12:00"
|
||||
service._reply("simplex", "c", "time.now: ok — 12:00", kind="result")
|
||||
assert service.outbound["simplex"].get_nowait().text == "time.now: ok — 12:00"
|
||||
assert llm.calls == []
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user