v0.5.112: keep skill demos at 16:9 and harden web refresh deploy triggers.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -550,7 +550,7 @@ def _nested_timestamp(payload: dict, *path: str) -> datetime | None:
|
||||
|
||||
|
||||
def _summary_proves_refresh(summary: dict, label: str, step: str) -> bool:
|
||||
if not summary.get("ok"):
|
||||
if not summary.get("ok") or summary.get("skipped") or summary.get("dry_run"):
|
||||
return False
|
||||
step_ok = any(
|
||||
isinstance(row, dict)
|
||||
@@ -765,6 +765,18 @@ def _fmt_workflow_line(w: WorkflowDayStatus) -> str:
|
||||
return f"- **{w.label}**:{' / '.join(parts)}{latest}"
|
||||
|
||||
|
||||
def _fmt_refresh_summary_result(summary: dict) -> str:
|
||||
"""Human label for a refresh_web.py summary.json payload."""
|
||||
if summary.get("skipped"):
|
||||
reason = str(summary.get("skip_reason") or "").strip()
|
||||
return f"已跳过({reason})" if reason else "已跳过"
|
||||
if not summary.get("ok"):
|
||||
return "刷新失败"
|
||||
if summary.get("deployed"):
|
||||
return "已部署"
|
||||
return "无需部署"
|
||||
|
||||
|
||||
def build_card(st: DayStats, extras: DigestExtras) -> dict:
|
||||
"""Feishu interactive card (msg_type=interactive)."""
|
||||
countries = "、".join(
|
||||
@@ -796,9 +808,7 @@ def build_card(st: DayStats, extras: DigestExtras) -> dict:
|
||||
(label for file, label in REFRESH_WORKFLOWS if file == workflow_file),
|
||||
workflow_file,
|
||||
)
|
||||
result = "已部署" if summary.get("deployed") else "无需部署"
|
||||
if not summary.get("ok"):
|
||||
result = "刷新失败"
|
||||
result = _fmt_refresh_summary_result(summary)
|
||||
stale_count = int(
|
||||
(summary.get("health") or {}).get("stratz_matchup_stale") or 0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user