fix(alerts): prevent executor queue starvation
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m32s
CD Pipeline / build-and-deploy (push) Successful in 6m50s
CD Pipeline / post-deploy-checks (push) Successful in 2m22s

This commit is contained in:
ogt
2026-07-11 13:23:40 +08:00
parent 0f67494cf9
commit f0f6eee7a5
6 changed files with 42 additions and 3 deletions

View File

@@ -117,7 +117,10 @@ async def test_webhook_router_writes_queue_receipt_without_side_effect(
)
append = AsyncMock()
async def queue(**_kwargs):
queue_kwargs: dict = {}
async def queue(**kwargs):
queue_kwargs.update(kwargs)
return {
"schema_version": "ai_decision_controlled_executor_handoff_v1",
"status": "controlled_check_mode_queued",
@@ -149,8 +152,11 @@ async def test_webhook_router_writes_queue_receipt_without_side_effect(
assert handoff["queued"] is True
assert handoff["side_effect_performed"] is False
assert handoff["execution_priority"] == 30
assert queue_kwargs["proposal_data"]["execution_priority"] == 30
append.assert_awaited_once()
assert append.await_args.kwargs["context"]["side_effect_performed"] is False
assert append.await_args.kwargs["context"]["execution_priority"] == 30
@pytest.mark.asyncio