The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(tui_gateway): type cron last_delivery_unverified as a list of targets
kshitijk4poor370b3a91c84f
diff --git a/apps/shared/src/gateway-contract.generated.ts b/apps/shared/src/gateway-contract.generated.tsindex 711e9a33c63..5b44ec35186 100644--- a/apps/shared/src/gateway-contract.generated.ts+++ b/apps/shared/src/gateway-contract.generated.ts@@ -3821,7 +3821,7 @@ export interface CronJobRow {last_run_at?: string | nulllast_status?: string | nulllast_delivery_error?: string | null- last_delivery_unverified?: boolean | null+ last_delivery_unverified?: string[] | nulllast_fire_error?: string | nulllast_error?: string | nullenabled?: booleandiff --git a/apps/shared/src/gateway-contract.openrpc.json b/apps/shared/src/gateway-contract.openrpc.jsonindex bc712ffe74c..c9f3bd79c22 100644--- a/apps/shared/src/gateway-contract.openrpc.json+++ b/apps/shared/src/gateway-contract.openrpc.json@@ -11391,7 +11391,10 @@"last_delivery_unverified": {"anyOf": [{- "type": "boolean"+ "items": {+ "type": "string"+ },+ "type": "array"},{"type": "null"diff --git a/tests/cron/test_cron_manage_profile_scope.py b/tests/cron/test_cron_manage_profile_scope.pyindex 8ba0f630416..afed7e87b2b 100644--- a/tests/cron/test_cron_manage_profile_scope.py+++ b/tests/cron/test_cron_manage_profile_scope.py@@ -26,6 +26,8 @@ def test_cron_manage_profile_reads_that_profiles_store(tmp_path, monkeypatch):"name": "botA-only-job","prompt": "scoped hello","enabled": True,+ # what cron/scheduler_delivery.py persists for unconfirmed sends+ "last_delivery_unverified": ["telegram:123"],}]}@@ -50,6 +52,11 @@ def test_cron_manage_profile_reads_that_profiles_store(tmp_path, monkeypatch):assert resp["result"]["scoped"] == "botA"names = [j.get("name") for j in resp["result"]["jobs"]]assert "botA-only-job" in names+ # The wire contract must accept the real row shape (a list of targets, not a bool).+ from tui_gateway.contracts.tools_commands import CronManageResult++ jobs = CronManageResult.model_validate(resp["result"]).jobs or []+ assert jobs[0].last_delivery_unverified == ["telegram:123"]# The override must not leak: an unscoped call after this one resolves the# launch profile again, which does not contain botA's job.diff --git a/tui_gateway/contracts/tools_commands.py b/tui_gateway/contracts/tools_commands.pyindex 0c57f163f33..f8f029cbf8e 100644--- a/tui_gateway/contracts/tools_commands.py+++ b/tui_gateway/contracts/tools_commands.py@@ -451,7 +451,7 @@ class CronJobRow(_Open):last_run_at: str | None = Nonelast_status: str | None = Nonelast_delivery_error: str | None = None- last_delivery_unverified: bool | None = None+ last_delivery_unverified: list[str] | None = None # unconfirmed ``platform:chat_id[:thread_id]`` targetslast_fire_error: str | None = Nonelast_error: str | None = Noneenabled: bool = True