Skip to content

refactor: explore removing Tasks and TaskFlow - #156532

Closed
roboclaw-bot wants to merge 5 commits into
mainfrom
openclaw/tasks-versus-cron-jobs-usefulness
Closed

roboclaw-bot wants to merge 5 commits into
mainfrom
openclaw/tasks-versus-cron-jobs-usefulness

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Explore removing the generalized Tasks/TaskFlow layer instead of maintaining a second execution and lifecycle ledger alongside Cron, subagents, ACP, media generation, and sessions.

User Impact

Large-change review: @steipete approved the documented review-size exception; size: accepted-large is applied and the original draft is reopened. This does not waive the merge blockers below.

Exploratory draft—not ready to merge. Removes the Tasks page/rail, CLI, RPC/events, TaskFlow APIs, and TaskFlow-only Webhooks plugin. Cron execution/history, session controls, native subagent delivery/cancellation, media operations, and Workboard session-based planning remain. Removed integrations intentionally break; there is no automatic workflow conversion.

Following the approved storage-retirement decision, shared schema 19 drops task_delivery_state, task_runs, and flow_runs after preserving retained Cron history and provably bound released native subagent outcomes. Only Task/flow lifecycle bindings are removed; independent audit facts, Cron bindings, native sessions/results/receipts, recovery archives, and unrelated data remain. History does not become execution authority. Unknown dependencies refuse migration rather than risk unrelated data.

Upgrade/rollback: main’s shared schema 18 and agent schema 23 are preserved. Existing old-updater content/publication deferral remains intact. A downgrade after retirement requires a verified pre-migration backup, not lowered schema markers. No live database has been migrated.

Known merge blocker: initial native Codex children that have not reached requester completion admission still lack a durable replacement for the removed cold/cross-parent recovery path. Gateway restart or native-parent replacement can lose that completion obligation. Preserved accepted follow-up receipts and admitted completion recovery do not close this gap; this draft does not claim restart-equivalent behavior.

Why This Change Was Made

Surviving responsibilities stay with their native owners. Cron owns a small history table with its existing identities, details, partitions, and retention; native subagents retain completion/cancellation custody. A fenced atomic migration extracts supported historical outcomes before retiring the generalized tables. Obsolete persistence, repairs, runtime projections, and Tasks-only tests are removed instead of renamed.

Validation also repaired native wait ordering: published facts no longer discard pending read/cleanup custody, and cancellation joins that work before returning. Native admission again preserves persistence-failure context and refuses untracked dispatch. No new lifecycle ledger was introduced.

Published head: 22c5772d632d57a17c5068295a5fcc5b5ea02ae6 (the publisher’s metadata commit has the exact reviewed source tree). The candidate integrates pinned main 264c3355f0d5db50c223f286df21c8f9e437049d; GitHub still reports conflicts with newer main, which must be resolved before merge. It also repairs retained Cron transcript sizing and keeps main’s attribution, accessible roles, and close-focus behavior. Page-owned styles no longer get absorbed into measured JavaScript boot groups; no styles, size budgets, or baselines were relaxed.

Evidence

  • Schema/history/audit proof: 156 tests / 7 files passed, including retirement, released-outcome extraction, rollback/refusal, publication deferral, and read-only admission.
  • Native recovery/cancellation closure: 228 tests / 5 files passed, 49.73s wall. Gateway admission/continuation closure: 337 tests / 2 files passed, 65.31s. These include the real failed wait/publication/abort boundaries, durable replacement rollback, persistence refusal, and the original registry ordering.
  • Broader Cron, Gateway, backup/update and native suites were exercised in selected batches, not the full repository suite. Native archive E2E: 25 tests passed, 33.23s Vitest plus a 363.7s runtime build. Synthetic Codex retry-policy fixture: 19 tests passed. All cited runtime batches used --maxWorkers=1. Integration builds passed; final package/old-updater proof is separate.
  • Canonical UI build and performance checks passed. Largest/startup CSS is 51,144 bytes gzip; all budgets unchanged. The bundle regression fails on the original style owner. 27 focused tests / 2 files passed (9.74s wall), with production-bundle Chromium smoke for new/chat/plugins.
  • Native locale cleanup carried all existing translations through the owning generator: zero translation/model calls. Canonical protocol, SDK, database types/inventory, and localization artifacts were regenerated; docs link audit passed.
  • Actual-source synthetic UI captures were inspected and delivered in chat: initial removal comparison and retained Cron transcript comparison. Both pairs are embedded in GitHub.

Published 9.2 acceptance passed: Package Acceptance attempt 1 completed successfully in 36m51s, with workflow, tooling, frozen admission, and package source all bound to 22c5772d632d57a17c5068295a5fcc5b5ea02ae6. The actual installed 2026.9.2 updater upgraded to candidate 2026.9.5/schema 19. The single legacy-operator-state lane passed, including the corrected already-current no-op, clean Doctor, formerly-bundled-plugin Doctor, and subsequent completion checks. Nine jobs passed; 15 unselected jobs were skipped and are not coverage.

The inspected published proof artifact records passed / published-updater-import-preserved: two retained history rows, the import receipt, and unrelated state were preserved; retired Task/Flow tables and indexes were absent; content schema 19 coexisted with published markers 15 while the old updater remained active. The qualifying Doctor already saw migrated content on entry, so this is preservation proof—not a claim that this particular Doctor first migrated it. No-op/Doctor outcomes are backed by executed source assertions, phase receipts, and successful log markers; their raw standalone reports are not separately published. Backup rollback is not applicable to the 9.2 lane.

The harness-only no-op correction fixed the first run’s advisory misclassification without changing runtime code. Its regression failed on the original assertion; 101 tests / 2 files passed in 10.85s, with type/lint/Docker-boundary checks and scoped P0 review.

Proof limitations: the Doctor/Gateway process fixture reached ready, but the parent’s loopback probe received a non-JSON HTTP 502 through this host’s proxy path. Its assertions and timeout remain unchanged; this is not counted as passing startup proof. No live-provider, native-device, or full-repository-suite claim is made. The installed-package private-completion scenario remains unrun locally.

Final local verification: production and all affected test/extension/script/root type lanes passed across scoped runs. Typed lint, full UI stylelint, line-cap and assertion-safety guards passed; baseline changes only remove or reduce retired debt. The source and isolated validation checkout match across 48,600 files. Independent review completed 24/24 passes with zero accepted P0 findings (scoped-clean, exit 0); the final two test diagnostic arguments were then type/lint checked. This is P0-scoped review, not merge or deployment approval.

Worked on by

Work sessions


View the OpenClaw team session

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: a5dd854a-868a-4418-bbc0-ce88118fc49a
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

ClawSweeper will not retry this unchanged revision.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: slack Channel integration: slack app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime extensions: lobster Extension: lobster cli CLI command changes scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling extensions: qa-lab extensions: webhooks extensions: codex plugin: file-transfer extensions: xai extensions: admin-http-rpc extensions: copilot plugin: workboard app: wearos App: wearos plugin: facetime FaceTime plugin size: XL labels Sep 23, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Before and after: Tasks removal baseline

Actual Control UI and native Workboard fixture, with identical synthetic content, fixed timestamp, Claw/light theme, and 1600×1000 viewport. These are local candidate captures—not a live Gateway deployment or native mobile-app proof.

Chat

Before

Before: Tasks rail and running-task count

After

After: Tasks rail and running-task count removed

Workboard details

Session and Run remain; separate Gateway task identity, status, and progress are removed.

Before

Before: Workboard Gateway task details

After

After: Workboard retains Session and Run without Gateway task fields

After-capture request audit: zero tasks.* RPCs across 29 chat and 24 Workboard requests. The removed Tasks route itself has no after-page comparison.

@roboclaw-bot

roboclaw-bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

No-schema revision: supersedes the storage-retirement plan

Peter requested an unchanged database schema and accepted loss of retired Task/Flow feature data in the work discussion. This supersedes the earlier schema-19/table-drop plan.

  • Keep current main’s shared-state schema 18 and agent schema 23, including the existing table/index/compatibility definitions. Do not merely lower the version while changing the layout.

  • Remove the new cron_run_history table, v19 retirement migration, and historical Task-first outcome extraction. No Task/Flow history conversion or automatic workflow conversion is required.

  • Keep Tasks/TaskFlow runtime, tools, RPCs, projections, and UI removed. Their old rows remain unused rather than retaining a generalized execution ledger. Cron can continue using its existing runtime=cron storage rows through the small Cron-owned adapter; its real admission receipts stay separate.

  • Preserve ordinary Cron and native execution, cancellation, requester custody, and restart behavior. Acceptance of retired feature data loss is not permission to break newly running native subagents or erase unrelated data.

  • Reconcile current main, prove unchanged schema admission and active-owner behavior, review the revised head, then land through the normal enforced gates. No live-state migration or deployment is being performed.

The currently published head still contains the old v19 implementation while this revision is prepared; prior updater evidence applies to that old head, not the forthcoming no-schema candidate.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Cron transcript: retained-owner integration

Actual Control UI with identical synthetic content and a mock Gateway, light theme, 1280×960. Before is the published removal baseline; after is the local table-retirement candidate being prepared for this same draft. This is UI-boundary proof, not a deployment or live-provider claim.

The retained cron transcript now keeps icon sizing on icons rather than narrowing message text. Main’s forwarded-message attribution, accessible role labels, and close-focus restoration are preserved. Paging and overflow checks passed.

Before

Before: icon sizing also narrows the user message

After

After: readable cron transcript with forwarded attribution

Integrate main and retire shared Tasks storage at schema 19, preserving Cron history and bound native subagent outcomes. Keep native execution, admission, recovery, and cancellation with their owners.

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 88bea43f-73dc-4d0b-a320-6ea58b4bb5c6
@openclaw-barnacle openclaw-barnacle Bot added the channel: voice-call Channel integration: voice-call label Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

ClawSweeper closed this pull request because it changes 190,244 lines (17,868 added, 172,376 removed) across 1,542 files, above this repository's 50,000-line limit for review. Changes this large cannot be reviewed safely or scanned within limits and usually indicate a stale branch merged against an old base. Please open a fresh pull request from current main containing only the intended change, or split it into focused pull requests. A maintainer can apply size: accepted-large to exempt a deliberately large change.

@clawsweeper clawsweeper Bot closed this Sep 23, 2026
roboclaw-bot and others added 2 commits September 24, 2026 01:01
Keep the published-updater no-op assertion strict while accepting the explicit nonmutating advisory for isolated state/config paths. Preserve status, reason, repair, survival, and Gateway-probe checks.

The regression failed on the original assertion; 101 harness tests now pass. No product runtime code changed.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: b0a4652f-c5a0-4c8c-b9dd-be9eeb4b5db6
@steipete

Copy link
Copy Markdown
Contributor

This retirement is being landed in smaller independently working batches:

The next batch moves automation transcripts to Cron-owned RPCs. The final native execution, completion/recovery, and Cron writer/pruner cutover stays together so each intermediate revision has one working owner. No removal-specific database schema change is introduced. This PR remains the reference for the remaining retirement until the replacement series is verified on main.

steipete added a commit that referenced this pull request Sep 27, 2026
Remove Tasks and TaskFlow runtime, APIs, CLI, SDK surfaces and panels after the Cron, session, native execution and media completion ownership cutovers. Preserve stored rows and import provable legacy native assignments through Doctor; ambiguous ownership stays untouched with a warning.

Follows #158221, #158217, #158225, #158222, #158702 and #158776. Related: #156532. Task-specific public APIs retire immediately; retained responsibilities use their existing owners.

Maintainer-authorized administrative landing after full CI run 36312986498 attempt 2 passed on 274595e, with subsequent actual conflicts reviewed and focused checks passing. Current PR CI preflight hits the 64 KiB changed-path metadata limit before tests (run 36335042695); its duplicate security-review status mirrors that planning failure. Review and scoped proof are recorded in the PR. Published 9.4 native import is proven; remaining native completion and 9.4 rollback witnesses are explicitly unproven.
@steipete

Copy link
Copy Markdown
Contributor

The TaskFlow removal has landed on main through the six prerequisite batches and #159179, merged as 6652f7eac8d96ccc50b0da648cbbd8b556fcfb7b.

The final change removes the Tasks/TaskFlow runtime and public surfaces while preserving existing data and the retained Cron, session, native-execution and media-completion owners. The replacement PR records the reviewed changes, CI, migration evidence and remaining proof limits. Closing this original cut as superseded.

@steipete steipete closed this Sep 27, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
Remove Tasks and TaskFlow runtime, APIs, CLI, SDK surfaces and panels after the Cron, session, native execution and media completion ownership cutovers. Preserve stored rows and import provable legacy native assignments through Doctor; ambiguous ownership stays untouched with a warning.

Follows openclaw#158221, openclaw#158217, openclaw#158225, openclaw#158222, openclaw#158702 and openclaw#158776. Related: openclaw#156532. Task-specific public APIs retire immediately; retained responsibilities use their existing owners.

Maintainer-authorized administrative landing after full CI run 36312986498 attempt 2 passed on 274595e, with subsequent actual conflicts reviewed and focused checks passing. Current PR CI preflight hits the 64 KiB changed-path metadata limit before tests (run 36335042695); its duplicate security-review status mirrors that planning failure. Review and scoped proof are recorded in the PR. Published 9.4 native import is proven; remaining native completion and 9.4 rollback witnesses are explicitly unproven.
@RomneyDa
RomneyDa deleted the openclaw/tasks-versus-cron-jobs-usefulness branch October 22, 2026 03:20
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: android App: android app: ios App: ios app: macos App: macos app: wearos App: wearos app: web-ui App: web-ui channel: slack Channel integration: slack channel: voice-call Channel integration: voice-call cli CLI command changes commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: admin-http-rpc extensions: codex extensions: copilot extensions: lobster Extension: lobster extensions: qa-lab extensions: webhooks extensions: xai gateway Gateway runtime plugin: facetime FaceTime plugin plugin: file-transfer plugin: workboard scripts Repository scripts size: accepted-large Maintainer-accepted large change; exempts ClawSweeper size closure, not review or CI. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants