Skip to content

feat(cron): let human owners manage and transfer automations - #189749

Merged
roboclaw-bot merged 11 commits into
mainfrom
openclaw/gentle-prawn
Nov 1, 2026
Merged

roboclaw-bot merged 11 commits into
mainfrom
openclaw/gentle-prawn

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Automation owners cannot manage or hand over their schedules from the Automations page without administrator access.

User Impact and Design

The editor gains an Owner selector beneath Agent. Administrators and the current human owner can edit or transfer an automation; other humans cannot modify it. Agent-created jobs retain separate conversation-scoped capability checks.

A transfer pauses the automation, cancels active occurrences, and retires captured execution authority. The recipient cannot silently use the previous owner's credentials. Trusted human-creator records supply the initial owner without rewriting audit provenance. Ordinary edits, force-run, or transferring back do not satisfy the requirement for fresh execution-authority capture.

The Gateway owns authorization and retirement; the UI reflects its decisions. Human ownership, immutable creator provenance, and agent/session capability stay separate. Host-command, session-routing, tool and approval restrictions are preserved. Requested by @VACInc.

Review Repairs

Initial five findings repaired in 9b34a698 (original 3de16314):

  • Private ownerTransferPending distinguishes actual transfers from legacy app-only recovery.
  • Pending transfers are blocked before isolated/main/named-session dispatch; only fresh private authority capture clears the guard.
  • Profile-directory reads obey visibility, attachment and Gateway lifecycle admission.
  • E2E inventory, direct run/remove commit-guard assertions and keyboard navigation are updated.

The active-execution finding on 156ed1d1 is repaired in 49f55e04: the existing committed-mutation cancellation owner now cancels when human ownership changes, including force-runs of already-paused jobs. Explicit-disable cancellation remains intact, while display edits and unchanged ownership do not cancel. This adds two net production lines, not another revocation mechanism.

Current Candidate and Proof

Published head be693bc6c568c5c5778925a324844710410173b1 has exactly the tested 49f55e04 tree. Rebased onto 7232a8de67eff527b3f5764987312f2424beda94 as requested; the rebase tree matched an independent integration oracle. Upstream Memory/hovercard fixes were preserved, not replaced with obsolete assertions. Human credit and authored repairs were retained.

  • Final-head CI passed: run 41253288557. Pre-merge full check snapshot: 100 success, 66 skipped, 1 neutral, zero failed or pending. Both real-Gateway E2E shards passed, including the active-transfer scenario.
  • Active transfer red/green: on 156ed1d1, both enabled/paused scheduler cases fail because cancellation never arrives, and the real Gateway/browser run incorrectly completes successfully after transfer. With 49f55e04, scheduler 3/3 pass and real-Gateway/browser 1/1 passes.
  • The browser proof first executes a real file-write tool through a local HTTP model with a synthetic credential. It then holds another model response during a force-run of a paused job, transfers ownership, and releases an attempted write. The run terminates with the transfer cancellation reason, the file does not exist, and no further provider request occurs. Former-owner denial, recipient edits, and isolated/shared recovery failures remain covered. No paid/external model or real credential is claimed.
  • Local repair timings: scheduler 0.641 s test / 50.61 s wall including worker preparation; browser 6.827 s test / 55.42 s Vitest wall. The existing browser boot is reused. 41 net test lines are allocated for the distinct in-flight boundary; no new suite or timeout increase.
  • Targeted lint, formatting, canonical Cron and UI-E2E typechecks, and diff checks passed. Fresh independent P0–P2 autoreview of the repair is scoped-clean. Simplification retained the existing cancellation owner.
  • Latest-stable upgrade passed: run 41251264471, baseline 2026.10.8, pinned package/workflow 156ed1d1, both base and cron-scheduled-authority scenarios successful. Package integrity and npm install acceptance also passed. This is explicitly pre-repair-head evidence: the only later production change is post-commit active-run cancellation; schemas, migration, persisted fields, recovery and startup are unchanged. Current-head cancellation behavior is separately proven above. No image publication or deployment.

Retained earlier proof and disclosed gaps

  • Scheduler/session/fallback/store 44/44, including legacy creator backfill, app-only recovery, transfer back, persistence and fresh-authority recovery. Four behavior regressions fail on original base fd55221c and pass with the fix; ownership UI likewise fails on the base.
  • Gateway policy 21/21, ownership UI 1/1, E2E inventory 14/14, production types/lint/build passed. Earlier lifecycle suite 33/34: the cold lazy-render failure reproduced on untouched original base. A separate cold local rebased run timed out before Gateway readiness; the subsequently expanded red/green scenario reached the actual behavior, and final-head CI passed. Neither setup failure is counted as passing proof.
  • Notice fixture repair preserves requester/foreign-job nondisclosure and write denial. Upstream Memory/hovercard expectations are retained; no production permission relaxation.
  • An earlier local-review migration suggestion was declined because an unmerged, undeployed intermediate revision is not a shipped compatibility contract. Released stored-data compatibility is covered by the upgrade and legacy tests above.

Visual Proof

Actual source UI, same synthetic fixture, Chromium 1440×1000, before original base and after a58a740; this UI is unchanged by the rebase and cancellation repair. Both sanitized captures were inspected, attached in the originating chat, and uploaded in the proof comment. Both images were also verified rendering at 1440×1000 in the actual GitHub PR page and those rendered screenshots inspected. Visual gate complete.

Before: automation editor without human owner selector

After: human Owner selector directly below Agent

Final-head ClawSweeper review complete: review, reviewed be693bc6 at 2026-11-01 00:06 UTC. No findings, no before-merge items, ready for maintainer review. No live Gateway, deployment, or user automation was modified.

Worked on by

@clawsweeper

clawsweeper Bot commented Oct 31, 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: web-ui App: web-ui gateway Gateway runtime size: XL labels Oct 31, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 31, 2026 20:39
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: be693bc6c568c5c5778925a324844710410173b1
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/server-methods/method-authorization.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds human-owned automation management and transfers that pause jobs, cancel active runs, and retire captured execution authority.

Example: Alice transfers “Hourly session ping” to Bob.

  • Before: Managing ownership requires administrator access.
  • After: Alice can transfer her automation; Bob can edit it, Alice loses management access, and execution requires fresh authority.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent feature with inspected visual evidence, production-boundary authority scenarios, compatible stored-state handling, and the previous blockers repaired.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots establish the selector; the supplied real-Gateway/browser results exercise authorized edits, former-owner denial, recipient recovery refusal, and reassignment during a held real HTTP provider response before attempted filesystem I/O, with successful CI for the pinned head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Human automation owners cannot manage or hand over their schedules from the Automations page without administrator access.
Reason: Maintainer authorship establishes direction, and the feature provides useful owner management while preserving separate execution consent and agent/session restrictions.

Merge readiness

✅ Ready for maintainer review

This PR delivers a maintainer-directed ownership feature, addresses the previous findings, and has successful pinned-head CI; no actionable correctness defect remains.

Priority: P2
Reviewed head: be693bc6c568c5c5778925a324844710410173b1

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI sends automation mutations through Gateway authorization to the existing cron persistence and execution owners, which store ownership and enforce cancellation and credential recovery.

flowchart LR
  A[Human operator] --> B[Automations editor]
  B --> C[Gateway ownership checks]
  C --> D[Cron mutation owner]
  D --> E[SQLite job storage]
  D --> F[Active run cancellation]
  E --> G[Scheduled execution admission]
  G --> H[Authorized tools and provider calls]
Loading

Technical review

Best possible solution:

Keep human management ownership in the existing Gateway and cron owners, with transfer cancellation and fresh execution-authority capture enforced before effects.

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

Current main's authorization path confirms that direct human scheduler mutations require administrator scope; no target code was executed during this review.

Is this the best way to solve the issue?

The implementation keeps management ownership separate from creator provenance and conversation capabilities, and extends existing mutation, cancellation, profile-selection, and credential owners rather than adding a competing authority system.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9db2a19 adds src/cron/service/jobs-mutation-persistence.ts:99 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9db2a19abb2b; files: src/cron/service/jobs-mutation-persistence.ts)
  • Josh Lehman: Raw commit 2011274 adds src/cron/execution-context-admission.ts:65 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 201127429a03; files: src/cron/execution-context-admission.ts)
  • Jason (Json): Raw commit d25a316 adds src/cron/store/job-mutations.worker.ts:159 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d25a316fc7c3; files: src/cron/store/job-mutations.worker.ts)

PR surface

Source +493, Tests +555, Docs +15, Other +2. Total +1065 across 52 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 34 638 145 +493
Tests 15 626 71 +555
Docs 1 34 19 +15
Config 0 0 0 0
Generated 0 0 0 0
Other 2 2 0 +2
Total 52 1300 235 +1065

Review metrics

Metric Value Why it matters
Production versus test changes Production +638/-145; tests and test infrastructure +626/-71. Growth implements ownership authorization, persistence, and UI presentation, with distinct storage, session-dispatch, lifecycle, and final-effect regressions; production totals include generated protocol predicates.
Ownership contract One optional update parameter and two persisted job fields. ownerProfileId supplies human management ownership; private ownerTransferPending distinguishes transfers from existing app-only recovery without adding a table or global configuration option.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Useful scoped automation-management functionality without evidence of an urgent production outage.
  • merge-risk: 🚨 security-boundary: The maintainer-directed change permits authenticated human owners to mutate schedules without administrator scope; inspected commit guards and supplied final-effect scenarios cover foreign, former, and reassigned owners.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • 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 (2 earlier review cycles)
  • reviewed 2026-10-31T20:56:12.321Z sha eb447d4 :: needs real behavior proof before merge. :: [P1] Preserve existing app-only recovery executions | [P1] Enforce transfer recovery on shared-session executions | [P2] Admit profile-directory reads through the page lifecycle | [P2] Update the E2E inventory oracle for the new suite | [P2] Update direct Cron consumers for the required commit guard
  • reviewed 2026-10-31T23:16:15.597Z sha 156ed1d :: needs real behavior proof before merge. :: [P1] Cancel admitted executions when human ownership changes

Reviewed October 31, 2026, 8:06 PM ET / November 1, 2026, 00:06 UTC (Revision 3).

@roboclaw-bot roboclaw-bot added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 31, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Inspected before/after browser proof

Actual source Control UI in Chromium at 1440×1000, with the same synthetic disabled automation and profile-directory fixture. Each capture passed a Vitest browser assertion for the editor and the presence/absence of the Owner field, then the shared settled-frame screenshot checks. Both images were inspected and contain only synthetic data.

  • Before: original feature base fd55221c27484dce93589ec9ad4794c2cdfa905d. No human Owner selector.
  • After: published head a58a7402767a3eef1eef13aac8af7cadaa84a9c5. Owner appears directly below Agent, with Alice Owner selected.

This proves the rendered change, not real-Gateway authorization or provider credential isolation; those remain separate test boundaries.

Before

Before: automation editor without a human Owner field

After

After: Owner selector beneath Agent with Alice Owner selected

roboclaw-bot and others added 9 commits October 31, 2026 23:05
Keep the human owner separate from creator provenance, enforce owner/admin mutations, and retire execution authority on transfer. Add Gateway, runtime and UI regression coverage; allocate 353 net regression-test lines for these distinct boundaries.

Co-authored-by: VACInc <[email protected]>
Keep prior published history while preparing the next independent PR.

Co-authored-by: VACInc <[email protected]>

# Conflicts:
#	src/agents/subagents/announce/subagent-announce-controller-source.ts
#	src/agents/subagents/registry/subagent-controller-inputs.test.ts
Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: bc29e621-c332-4cb0-ad1c-6454be532f36
Distinguish actual transfers from legacy app-only recovery, guard shared-session dispatch, and repair ownership UI lifecycle and regression contracts.

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

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: 16a9f6bb-6328-4e37-b985-ec057ddcf989
Integrate the exact CI base and repair the two failed E2E contracts. Non-admin notices retain read-only coverage and revoke in-flight reads when their operator source disappears. Match the combined hovercard context row.

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

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: 221b9b4d-50ad-4559-a54a-67f562310de4
Integrate the exact failing CI base and preserve its separator-free settings rows. Keep the Memory assertions on host sizing and asset/probe lifecycle without restoring removed dividers.

Co-authored-by: VACInc <[email protected]>
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/gentle-prawn branch from 82b0997 to 156ed1d Compare October 31, 2026 23:07
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
roboclaw-bot and others added 2 commits October 31, 2026 23:36
Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: d4886ab5-c875-482d-b87c-b87871d59823
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 1, 2026
@roboclaw-bot
roboclaw-bot merged commit 975e68c into main Nov 1, 2026
176 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/gentle-prawn branch November 1, 2026 00:11
steipete added a commit that referenced this pull request Nov 1, 2026
Isolate presented permissions from aggregate search state while retaining live owner, identity, and access updates. Keep mutation-time authority checks unchanged.

Related: #189749. Chromium desktop script CPU returns to the feature-parent baseline; mobile median is within 4%, with a noisy identical-parent tail. Preserve owner-management and transfer behavior.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 2, 2026
Isolate presented permissions from aggregate search state while retaining live owner, identity, and access updates. Keep mutation-time authority checks unchanged.

Related: openclaw#189749. Chromium desktop script CPU returns to the feature-parent baseline; mobile median is within 4%, with a noisy identical-parent tail. Preserve owner-management and transfer behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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. security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant