Skip overlapping scheduled runs and surface playbook status in job lists.

Due ticks no longer stack on an active run (WA skip notice + stale clear); schedule_list/admin/gateway now show playbook, steps_n, and last_run signals without dumping full recipes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-11 00:07:42 +08:00
parent 51eef09801
commit 9d4dced4e4
9 changed files with 487 additions and 18 deletions

View file

@ -620,6 +620,9 @@ class ScheduledJobStoreMixin:
recipe = raw_recipe
except Exception:
recipe = {}
from runtime.scheduler.recipe import recipe_list_summary
summary = recipe_list_summary(recipe)
return {
"id": job.id,
"tenant_id": job.tenant_id,
@ -631,6 +634,10 @@ class ScheduledJobStoreMixin:
"timezone": job.timezone,
"prompt_text": job.prompt_text,
"recipe": recipe,
"playbook": bool(summary.get("playbook")),
"has_recipe": bool(summary.get("has_recipe")),
"steps_n": int(summary.get("steps_n") or 0),
"recipe_goal": str(summary.get("recipe_goal") or ""),
"interaction_mode": job.interaction_mode,
"specialist": job.specialist,
"lang": job.lang,