fix: expose admitted run filter over RPC

This commit is contained in:
lda
2026-09-09 19:22:05 +07:00 Verified
parent 953543c5cb
commit 5cd8d8c7e1
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -426,7 +426,7 @@ class ValidateDeploymentParams(RpcParamsModel):
class ListRunsParams(RpcParamsModel):
status: Literal["completed", "failed", "interrupted"] | None = None
status: Literal["admitted", "completed", "failed", "interrupted"] | None = None
cursor: str | None = None
limit: int = Field(default=50, ge=1, le=100)
@@ -28,6 +28,7 @@ from wf_transport_rpc_http.client.schedules import RpcScheduleClientMixin
from wf_transport_rpc_http.models import (
CreateScheduleParams,
ListOccurrencesParams,
ListRunsParams,
UpdateScheduleParams,
)
@@ -36,6 +37,11 @@ def _cron() -> dict[str, Any]:
return {"kind": "cron", "expression": "* * * * *", "timezone": "UTC"}
def test_rpc_list_runs_accepts_admitted_status() -> None:
"""RPC validation exposes the API's admitted-run filter."""
assert ListRunsParams(status="admitted").status == "admitted"
def _constant_plan() -> RawWorkflowPlan:
return RawWorkflowPlan.model_validate(
{