Repository navigation
fix(cron): let session automations refresh pinned widgets - #137666
Conversation
Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: 6f3f9c02-ebb9-494d-bf74-e0f2cd28cff7
Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]>
Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: b5e9377a-9f92-4e2e-8a88-9ed60172f26e
|
Codex review: blocked before merge. Reviewed September 3, 2026, 9:53 PM ET / September 4, 2026, 01:53 UTC. ClawSweeper reviewWhat this changesThe PR lets explicitly authorized scheduled turns create or update pinned session-dashboard widgets without an inline client, while documenting and testing the restricted surface. Merge readiness⛔ Blocked before merge - 4 items remain The prior P1 blocker remains: this PR still exposes pinned-widget authoring to scheduler-private trigger sessions, so it needs a small gate correction before merge. Priority: P1 Review scores
Verification
How this fits togetherCron builds a headless agent tool list from a scheduled policy and session key. The widget tool then writes durable content to a session dashboard through the Gateway. flowchart LR
A[Scheduled policy] --> C[Headless tool construction]
B[Session key] --> D[Widget eligibility gate]
C --> D
D --> E[Restricted widget tool]
E --> F[Session dashboard]
G[Trigger-script session] --> D
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +53, Tests +179, Docs +5. Total +237 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Use the canonical cron-session predicate to exclude every scheduler-private key, add trigger-runtime coverage alongside the persistent-session case, and retain the explicit pinned-only schema/runtime enforcement needed for the durable-board boundary. Do we have a high-confidence way to reproduce the issue? Yes, from source: a trigger script constructs agent:<id>:cron:<job>:trigger, receives scheduled policy and wildcard-cap processing, and passes the run-only exclusion. Is this the best way to solve the issue? No. The current condition excludes only cron run keys; using the existing all-cron-session predicate is the narrower owner-boundary repair. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ee6d003629b0. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: 22166308-a697-45ab-84ca-a425f1513dd8
Co-authored-by: Dallin Romney <[email protected]>
Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: 3b52db99-2781-4524-a579-4878b5923a17
…enclaw-discord-store
Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: 5505caac-c55a-419b-aff2-7b02575bb186
…37666) * fix(cron): allow pinned widget updates * fix(cron): let session automations refresh pinned widgets Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: 6f3f9c02-ebb9-494d-bf74-e0f2cd28cff7 * fix(cron): keep widget prompt within compact budget Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> * fix(cron): let session automations refresh pinned widgets Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: b5e9377a-9f92-4e2e-8a88-9ed60172f26e * ci: refresh checks against current main * fix(cron): let session automations refresh pinned widgets Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: 22166308-a697-45ab-84ca-a425f1513dd8 * fix(ci): retry transient npm advisory timeouts (openclaw#137716) Co-authored-by: Dallin Romney <[email protected]> * fix(cron): let session automations refresh pinned widgets Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: 3b52db99-2781-4524-a579-4878b5923a17 * fix(cron): let session automations refresh pinned widgets Worked on by: - @Patrick-Erichsen Co-authored-by: Patrick-Erichsen <[email protected]> OpenClaw-Publication: 5505caac-c55a-419b-aff2-7b02575bb186 --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]> Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
What Problem This Solves
Fixes an issue where automations bound to persistent sessions could not create or refresh their pinned dashboard widgets because headless scheduled turns do not originate from an inline-widget-capable client. The tool was filtered out before its existing board-only path could run.
Why This Change Was Made
Scheduled turns with a validated server-authored tool policy may now receive a pin-only
show_widgetsurface when the policy explicitly allows that tool and the run targets a persistent session. The schema requirespin: true, runtime enforcement rejects unpinned or presentation-targeted calls, detached cron-run sessions remain excluded, and real inline clients retain the normal dual inline/pinned behavior.All persistent sessions own a dashboard; the exception is therefore session-scoped rather than restricted to keys whose display category happens to be
dashboard.User Impact
Session-owned automations can safely refresh dashboards without an open browser. They cannot use this exception to create invisible inline widgets, post through a channel presenter, target a device, or write to detached cron-run boards.
Evidence
show_widgetunavailable and preserved widget revision 9.node scripts/run-vitest.mjs src/agents/openclaw-tools.scheduled-widget.test.ts src/agents/openclaw-tools.registration.test.ts src/canvas/widget-tool.scheduled.test.ts src/canvas/widget-tool.test.ts— 91 tests passed across four owner/sibling files.node scripts/check-changed.mjs— formatting, production/test types, lint, dependency, architecture, import-cycle, storage, and dead-export gates passed.pnpm docs:check-mdx— 753 files passed.pnpm docs:check-linkscould not load a stale linked-checkout dependency; exact-head CI remains the authoritative docs-link proof.Worked on by
View the OpenClaw team session