Skip to content

fix: show ended one-time automations in History - #201280

Merged
daniel-lxs merged 26 commits into
mainfrom
openclaw/gentle-crab-4
Nov 29, 2026
Merged

daniel-lxs merged 26 commits into
mainfrom
openclaw/gentle-crab-4

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Warning

Do not land. Still in progress and under discussion. Talk to @vyctorbrzezowski.

What problem this solves

Paused automations include both work an owner may resume and one-time jobs that have already ended. When a notification fails to arrive, the owner needs the original command, delivery outcome and run record to decide whether to try again.

User impact

Open Automations → History for saved one-time jobs whose scheduled run or watched command ended. Each row shows the last run when one is available and opens the original automation. All runs opens the execution log, including when the last definition has been removed.

The scheduler records whether the occurrence ended. Opening History performs a read. A manual run of a paused job stays in Paused. Re-enabling a command watcher arms the original definition again. An explicitly resumed definition appears in Active, and its detail shows whether another run is scheduled. The existing successful-run deletion policy, --keep-after-run, ownership and Run now permissions still apply. Retention use · Delivery and retention decision

Older disabled definitions can be opened in Paused before the scheduler starts. At startup, a scheduled receipt and its matching run record can establish that an older timed job ended. The status survives run-history cleanup. An open sidebar refreshes when the saved status changes. An edit that arrives during startup preserves the evidence for its own definition. A pending retry or continuation keeps the definition out of History. Older watchers and other jobs whose records cannot establish that the occurrence ended remain available in Paused.

Evidence

The screenshots show main at fbf1aaed on the left and the Control UI at f6f07ef9 on the right. Both gateways opened the same synthetic data, with Paused and History expanded where available. The viewer had only operator.read. The six retained definitions matched byte-for-byte. Startup added an ended flag to the three confirmed occurrences. Every pre-existing runtime field matched. Main fbf1aaed · PR f6f07ef9

Three retained timed jobs move from Paused to History. The recurring report stays active and three other definitions stay paused.

Send build notice is highlighted in Paused on main and in History on the PR.

The notification command returned Build ready, but delivery failed. The owner could inspect the same saved command and the original run on both builds. With automation and host-command access, the owner explicitly chose Run now. Exactly one new run appeared under the same ID. A real watcher entered History after the owner rearmed it and its command exited. Manually running the paused watcher and the overdue paused timer left both in Paused. The grouping and original runs survived a gateway restart. The sidebar showed New automation to an administrator, who used it to create a saved job.

A separate upgrade from the published 2026.11.11 release preserved a retained job that had completed on schedule and then been run manually. Its History row linked the same definition and both original run IDs were available.

The read-only owner sees the original command and its recorded delivery failure.

An empty automation inventory on main and on this PR. The PR offers All runs.

230 focused scheduler, Gateway and tool tests passed, along with 28 Control UI tests and three selected browser cases. Core, cron test and UI typechecks, protocol contracts, copy checks, lint and formatting passed. The independent source review of the inventory publication change found no blocking correctness or security issue.

The cron database worker owns legacy receipt recovery during startup and edits. The database-worker ratchet counted 167 main-thread SQLite call sites on both the PR base and the repaired source. Core lint shard 5, typed lint on all three affected files, core typechecking, formatting and 27 focused cron tests passed. CI repair b59345e2

The clean main and PR UI builds passed their bundle comparison. With all bundled plugin interfaces packaged, main already exceeds the absolute Chat budget. Both builds load 18 Chat requests. The UI in this PR adds 67 gzip bytes, 3 bytes over that comparison allowance. External channel delivery, native devices and PostgreSQL were outside the live comparison.

Co-authored with Vyctor Brzezowski.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 18, 2026 14:37
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 2c1ef7dc-3f82-80a3-a3dc-64b8feb80c43
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: qa-lab size: XL labels Nov 18, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR records ended one-time occurrences and groups their retained automation definitions under History.

Example: Send build notice finishes at 9:30 PM, but its notification is not delivered.

  • Before: The retained automation appears in Paused alongside jobs awaiting future use.
  • After: It appears in History with its last-run time and opens the original command and delivery outcome.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful implementation supported by real UI evidence, reported upgrade preservation, and focused boundary coverage; no actionable introduced defect was established.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected paired Control UI screenshots demonstrate History membership, original command and failed-delivery inspection, and empty-inventory access to All runs; the public report additionally covers manual runs, watcher rearming, restart, and upgrade preservation, with the subsequent worker-only repair reviewed separately.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Owners cannot distinguish an ended retained one-time automation from paused work they may resume.
Reason: The maintainer-authored direction improves inspection while preserving the existing saved definition, delivery outcome, retention policy, and run permissions.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it adds useful History behavior still absent on main, but the explicit do-not-land hold remains in force.

Reviewed head: b59345e25fd3bab332a946cdee836fdd770f54bd

Before merge

  • Await maintainer action - Vyctor Brzezowski must resolve the explicit do-not-land hold before this PR can land.

Findings

None.

Agent review details

How this fits together

The cron scheduler persists occurrence status, Gateway projections publish it, and the Control UI groups saved definitions while the existing run-history reader serves execution records.

flowchart LR
  A[Timer or command exit] --> B[Cron scheduler worker]
  B --> C[Persisted job runtime]
  D[Legacy receipts and run records] --> B
  C --> E[Gateway inventory and events]
  E --> F[Active Paused and History]
  F --> G[Original definition and runs]
Loading

Technical review

Best possible solution:

Keep occurrence disposition owned by the scheduler and use existing definition and run readers to present retained automations.

Do we have a high-confidence way to reproduce the issue?

Current-main grouping and the supplied before screenshot establish that retained ended jobs share Paused with resumable jobs; this read-only review ran no target code.

Is this the best way to solve the issue?

Persisting the scheduler’s occurrence disposition avoids guessing from the latest manual run, while the shared projections preserve existing retention and execution boundaries.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against bc3700e9833e.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit f9b458f adds ui/src/components/app-sidebar-automations.tsx:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f9b458f86684; files: ui/src/components/app-sidebar-automations.tsx)
  • Peter Steinberger: Raw commit 13125bf adds src/cron/service/timer-outcomes.ts:149 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 13125bf33f20; files: src/cron/service/timer-outcomes.ts)
  • Ayaan Zaidi: Raw commit 8bdaed5 adds src/cron/service/timer-outcomes.ts:263 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8bdaed5c352a; files: src/cron/service/timer-outcomes.ts)

PR surface

Source +208, Tests +182, Docs 0. Total +390 across 40 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 28 277 69 +208
Tests 11 190 8 +182
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 40 468 78 +390

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • merge-risk: 🚨 compatibility: The change persists oneShotEnded in existing cron_jobs.state_json and recovers older records, making upgrade behavior relevant; the reported upgrade and additive optional-field design address that compatibility concern.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-11-28T01:03:29.363Z sha 13980fe :: blocked before merge. :: [P2] Keep Run history reachable after the last automation retires
  • reviewed 2026-11-28T01:43:50.899Z sha b4f0848 :: blocked before merge. :: none
  • reviewed 2026-11-28T03:31:19.812Z sha a85efe2 :: blocked before merge. :: [P2] Preserve final alerts for retained SDK one-shots
  • reviewed 2026-11-28T05:24:26.588Z sha 8ce44b2 :: blocked before merge. :: [P3] [P3] Update the On exit recovery instructions
  • reviewed 2026-11-28T07:15:01.650Z sha 839133c :: blocked before merge. :: none
  • reviewed 2026-11-28T08:23:31.189Z sha e9780e7 :: blocked before merge. :: none
  • reviewed 2026-11-28T09:44:45.230Z sha c403917 :: blocked before merge. :: none
  • reviewed 2026-11-28T23:21:50.251Z sha f6f07ef :: blocked before merge. :: none

Reviewed November 28, 2026, 7:01 PM ET / November 29, 2026, 00:01 UTC (Revision 12).

roboclaw-bot and others added 7 commits November 27, 2026 01:26
Merge main without rewriting the PR history. Preserve running command lifetimes and hold legacy cleanup definitions until backed-up Doctor conversion.

Co-authored-by: daniel-lxs <[email protected]>
Honor the retry reader view, migrate SQLite-only legacy policies, and record exact-cycle alert outcomes after retirement. Update focused fixtures to inspect retained history and preserve lifecycle, delivery, and authority assertions.

Co-authored-by: daniel-lxs <[email protected]>
Keep the extracted scenario matrix without reindenting the existing authority proof.

Co-authored-by: daniel-lxs <[email protected]>
Keep the recurring test job for manual runs. Revoking its invitation
pauses the job, so wait for the failure alert to be refused before
restoring access. Pass the cron service once in the plugin fixture.

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@daniel-lxs daniel-lxs changed the title fix: move ended one-time automations to run history fix: show ended one-time automations in History Nov 28, 2026
Report when a retained one-shot has ended using its scheduler state.
Record command exits when the watcher is consumed and keep a manually
expanded group open after clearing a filter.
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: L and removed size: M labels Nov 28, 2026
Ordinary reads and edits use the stored disposition. Startup verifies and records older scheduled completions before dispatch. This avoids scanning unrelated history during mutations and gives passive pre-start readers a consistent view.
@daniel-lxs
daniel-lxs marked this pull request as ready for review November 28, 2026 23:15
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Nov 28, 2026
Both callers run in the cron database worker. Use the scheduler's enablement check so older definitions with no enabled field retain the default.
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs
daniel-lxs merged commit 15a54ea into main Nov 29, 2026
235 of 237 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/gentle-crab-4 branch November 29, 2026 01:25
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…or baseline

* commit '2f2edbf36836a8ddc6758dfdcce872d4414a3a92': (520 commits)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  chore(release): update appcast for 2026.11.11 (#207504)
  fix: let updates back up deeply nested databases (#207756)
  fix(telegram): stop resending earlier messages to the model on every turn in DM topics (#207684)
  feat(workboard): choose which sessions appear on a board (#207781)
  fix: acknowledge updates when the Gateway first becomes ready (#207819)
  chore: stop the cron recovery test from failing CI on slow runners (#207837)
  fix: queue follow-ups when session creation reuses an active chat (#207800)
  feat(clawrouter): consume qualified native memory embeddings (#191874)
  fix: save the account for main-session prompts and converted reminders (#207776)
  test(infra): measure worker Buffer storage directly (#207663)
  feat(workboard): hide sessions and filter subagents per board (#207744)
  chore(i18n): refresh native locales (#207796)
  fix: name safe recovery when agent schema markers disagree (#207705)
  improve(ui): show only setup warnings on skill pages (#203750)
  fix(gateway): keep Linux legacy lock recovery explicit (#207340)
  fix: deliver a saved child answer after a Gateway crash (#207706)
  fix(ui): fold background command wakes into chat activity (#207305)
  fix: restore the Feishu proxy transport tests (#207782)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…aseline

* commit '2f2edbf36836a8ddc6758dfdcce872d4414a3a92': (520 commits)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  chore(release): update appcast for 2026.11.11 (#207504)
  fix: let updates back up deeply nested databases (#207756)
  fix(telegram): stop resending earlier messages to the model on every turn in DM topics (#207684)
  feat(workboard): choose which sessions appear on a board (#207781)
  fix: acknowledge updates when the Gateway first becomes ready (#207819)
  chore: stop the cron recovery test from failing CI on slow runners (#207837)
  fix: queue follow-ups when session creation reuses an active chat (#207800)
  feat(clawrouter): consume qualified native memory embeddings (#191874)
  fix: save the account for main-session prompts and converted reminders (#207776)
  test(infra): measure worker Buffer storage directly (#207663)
  feat(workboard): hide sessions and filter subagents per board (#207744)
  chore(i18n): refresh native locales (#207796)
  fix: name safe recovery when agent schema markers disagree (#207705)
  improve(ui): show only setup warnings on skill pages (#203750)
  fix(gateway): keep Linux legacy lock recovery explicit (#207340)
  fix: deliver a saved child answer after a Gateway crash (#207706)
  fix(ui): fold background command wakes into chat activity (#207305)
  fix: restore the Feishu proxy transport tests (#207782)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…aseline

* commit '2f2edbf36836a8ddc6758dfdcce872d4414a3a92': (520 commits)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  chore(release): update appcast for 2026.11.11 (#207504)
  fix: let updates back up deeply nested databases (#207756)
  fix(telegram): stop resending earlier messages to the model on every turn in DM topics (#207684)
  feat(workboard): choose which sessions appear on a board (#207781)
  fix: acknowledge updates when the Gateway first becomes ready (#207819)
  chore: stop the cron recovery test from failing CI on slow runners (#207837)
  fix: queue follow-ups when session creation reuses an active chat (#207800)
  feat(clawrouter): consume qualified native memory embeddings (#191874)
  fix: save the account for main-session prompts and converted reminders (#207776)
  test(infra): measure worker Buffer storage directly (#207663)
  feat(workboard): hide sessions and filter subagents per board (#207744)
  chore(i18n): refresh native locales (#207796)
  fix: name safe recovery when agent schema markers disagree (#207705)
  improve(ui): show only setup warnings on skill pages (#203750)
  fix(gateway): keep Linux legacy lock recovery explicit (#207340)
  fix: deliver a saved child answer after a Gateway crash (#207706)
  fix(ui): fold background command wakes into chat activity (#207305)
  fix: restore the Feishu proxy transport tests (#207782)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…line

* commit '652611b9d924c754ac7a18d0081cce6e1ec765df': (527 commits)
  refactor(infra): simplify audit recovery write progress (#157141)
  fix: show restart blockers in service logs (#207879)
  test(infra): exercise group identity in session roundtrip (#207671)
  test(infra): exercise live owner expiry policy (#207672)
  feat: let Knowledge learn from your Gmail through Composio (#207266)
  test: stop the history-worker overload test from failing CI on slow runners (#207862)
  test(auth): assert SecretRef plaintext is absent from storage (#207698)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  chore(release): update appcast for 2026.11.11 (#207504)
  fix: let updates back up deeply nested databases (#207756)
  fix(telegram): stop resending earlier messages to the model on every turn in DM topics (#207684)
  feat(workboard): choose which sessions appear on a board (#207781)
  fix: acknowledge updates when the Gateway first becomes ready (#207819)
  chore: stop the cron recovery test from failing CI on slow runners (#207837)
  fix: queue follow-ups when session creation reuses an active chat (#207800)
  feat(clawrouter): consume qualified native memory embeddings (#191874)
  fix: save the account for main-session prompts and converted reminders (#207776)
  test(infra): measure worker Buffer storage directly (#207663)
  feat(workboard): hide sessions and filter subagents per board (#207744)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…line

* commit 'c876514dc21154a07f3755320495d2a93584b46b': (538 commits)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  chore: stop the Workboard resident-owner CLI test from failing on main (#207898)
  test(agents): isolate endpoint-based overflow classification (#207688)
  chore(doctor): record why the root defaultModel migration stays (#207890)
  refactor(infra): simplify audit recovery write progress (#157141)
  fix: show restart blockers in service logs (#207879)
  test(infra): exercise group identity in session roundtrip (#207671)
  test(infra): exercise live owner expiry policy (#207672)
  feat: let Knowledge learn from your Gmail through Composio (#207266)
  test: stop the history-worker overload test from failing CI on slow runners (#207862)
  test(auth): assert SecretRef plaintext is absent from storage (#207698)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
Record when a timed one-shot or watched command ends so owners can find its saved definition and delivery outcome in Automations → History. Recover older timed occurrences when their receipts and run records confirm completion.

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 2c1ef7dc-3f82-80a3-a3dc-64b8feb80c43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants