Skip to content

feat(cron): add acpTurn for isolated ACP cron jobs - #85335

Closed
lxf-lxf wants to merge 4 commits into
openclaw:mainfrom
lxf-lxf:main
Closed

lxf-lxf wants to merge 4 commits into
openclaw:mainfrom
lxf-lxf:main

Conversation

@lxf-lxf

@lxf-lxf lxf-lxf commented May 22, 2026

Copy link
Copy Markdown

Support acpTurn payloads through acpx (oneshot Cursor/Codex runs), CLI --acp, Control UI editing, job validation, and docs for install and troubleshooting.

Summary

Describe the problem and fix in 2–5 bullets:

If this PR fixes a plugin beta-release blocker, title it fix(<plugin-id>): beta blocker - <summary> and link the matching Beta blocker: <plugin-name> - <summary> issue labeled beta-blocker. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.

  • Problem:
  • Solution:
  • What changed:
  • What did NOT change (scope boundary):

Motivation

Explain why this change should exist now. Link it to the user pain, failure mode, maintainer need, or product goal. If this is purely mechanical, write N/A.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #
  • This PR fixes a bug or regression

Real behavior proof (required for external PRs)

External contributors must show after-fix evidence from a real OpenClaw setup. Unit tests, mocks, lint, typechecks, snapshots, and CI are supplemental only. Screenshots are encouraged even for CLI, console, text, or log changes; terminal screenshots and copied live output count. Be mindful of private information like IP addresses, API keys, phone numbers, non-public endpoints, or other private details when providing evidence.

  • Behavior or issue addressed:
  • Real environment tested:
  • Exact steps or command run after this patch:
  • Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output):
  • Observed result after fix:
  • What was not tested:
  • Before evidence (optional but encouraged):

Root Cause (if applicable)

For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write N/A. If the cause is unclear, write Unknown.

  • Root cause:
  • Missing detection / guardrail:
  • Contributing context (if known):

Regression Test Plan (if applicable)

For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write N/A.

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file:
  • Scenario the test should lock in:
  • Why this is the smallest reliable guardrail:
  • Existing test that already covers this (if any):
  • If no new test is added, why not:

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

Diagram (if applicable)

For UI changes or non-trivial logic flows, include a small ASCII diagram reviewers can scan quickly. Otherwise write N/A.

Before:
[user action] -> [old state]

After:
[user action] -> [new state] -> [result]

Security Impact (required)

  • New permissions/capabilities? (Yes/No)
  • Secrets/tokens handling changed? (Yes/No)
  • New/changed network calls? (Yes/No)
  • Command/tool execution surface changed? (Yes/No)
  • Data access scope changed? (Yes/No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS:
  • Runtime/container:
  • Model/provider:
  • Integration/channel (if any):
  • Relevant config (redacted):

Steps

Expected

Actual

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
  • Edge cases checked:
  • What you did not verify:

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No)
  • Config/env changes? (Yes/No)
  • Migration needed? (Yes/No)
  • If yes, exact upgrade steps:

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk:
    • Mitigation:

Support acpTurn payloads through acpx (oneshot Cursor/Codex runs), CLI --acp,
Control UI editing, job validation, and docs for install and troubleshooting.

Co-authored-by: Cursor <[email protected]>
@lxf-lxf
lxf-lxf requested a review from a team as a code owner May 22, 2026 11:47
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes size: XL triage: blank-template Candidate: PR template appears mostly untouched. triage: dirty-candidate Candidate: broad unrelated surfaces; may need splitting or cleanup. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. triage: refactor-only Candidate: refactor/cleanup-only PR without maintainer context. labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 24, 2026, 6:25 AM ET / 10:25 UTC.

Summary
The PR adds a new acpTurn cron payload across CLI flags, cron runtime execution, Gateway validation, Control UI editing, docs, tests, and fork install scripts.

PR surface: Source +819, Tests +195, Docs +263, Other +388. Total +1665 across 34 files.

Reproducibility: not applicable. this is a feature PR rather than a broken current-main behavior report. The missing verification is after-fix real behavior proof for an actual OpenClaw/acpx cron run.

Review metrics: 3 noteworthy metrics.

  • Cron public API additions: 1 payload kind, 3 CLI flags, 1 protocol variant added. The new cron payload path must stay aligned across runtime validation, persistence, Gateway protocol, CLI, UI, docs, and proof before merge.
  • Fork install guidance: 2 scripts, 2 raw pipe-to-shell snippets added. Install and upgrade paths that execute contributor-fork code are security and operator-impact surfaces, not ordinary cron feature code.
  • ACP permission quickstart default: 1 approve-all example added. That example changes the practical security posture for non-interactive ACP cron jobs and needs explicit maintainer approval or safer guidance.

Stored data model
Persistent data-model change detected: migration/backfill/repair: README.md, migration/backfill/repair: scripts/fork-upgrade.ps1, migration/backfill/repair: scripts/fork-upgrade.sh. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #85273
Summary: This PR is the open candidate implementation for the canonical scheduled ACP cron feature request; nearby cron/runtime PRs share files but solve different problems.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🧂 unranked krab
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted real behavior proof for an actual OpenClaw/acpx cron run.
  • Remove fork install scripts and raw fork install guidance from README/docs.
  • Rebase onto current main and update the active Gateway protocol and SQLite cron payload surfaces.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The external PR body leaves real behavior proof blank; it needs redacted terminal output, logs, screenshots, a recording, or a linked artifact showing an actual OpenClaw/acpx cron run after this patch, and updating the PR body should trigger a fresh ClawSweeper review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging as-is would publish contributor-fork install scripts and raw pipe-to-shell commands as upstream OpenClaw guidance.
  • [P1] The quickstart makes permissionMode: "approve-all" part of the minimal ACP cron setup, which would normalize auto-approved file writes and shell commands for scheduled non-interactive ACP jobs.
  • [P1] The branch is conflicting and targets stale protocol/persistence surfaces, so current main's active Gateway protocol package and SQLite payload codec would not safely accept and round-trip acpTurn without rework.
  • [P1] The external PR still lacks redacted after-fix proof for a real OpenClaw/acpx cron run.

Maintainer options:

  1. Narrow and harden before merge (recommended)
    Remove the fork installer/docs, replace approve-all as default guidance, rebase onto current protocol and SQLite cron surfaces, and require real acpx cron proof before another merge review.
  2. Accept the security posture explicitly
    Maintainers could choose to ship broad ACP auto-approval guidance and source-checkout installers, but that needs an owner-visible security decision rather than incidental feature scope.
  3. Pause behind the feature issue
    Keep the canonical feature issue open as the API/security decision point and replace this branch with a smaller implementation if first-class ACP cron is accepted.

Next step before merge

  • [P1] The remaining action is maintainer ACP cron API/security direction plus contributor rebase and real-world proof, not a narrow automated repair.

Security
Needs attention: The diff introduces concrete supply-chain and command-execution concerns through fork install scripts and unsafe ACP permission guidance.

Review findings

  • [P1] Drop fork upgrade scripts from upstream — scripts/fork-upgrade.sh:9
  • [P1] Do not make approve-all the quickstart default — docs/automation/cron-acp-quickstart.md:72-73
  • [P1] Rebase the cron protocol change onto the active package — src/gateway/protocol/schema/cron.ts:21-24
Review details

Best possible solution:

Keep the linked feature issue as the product/API decision point and require a narrowed, rebased implementation that removes fork installers, uses maintainer-approved ACP permission guidance, updates current protocol and SQLite contracts, and includes redacted real acpx cron proof.

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

Not applicable: this is a feature PR rather than a broken current-main behavior report. The missing verification is after-fix real behavior proof for an actual OpenClaw/acpx cron run.

Is this the best way to solve the issue?

No: first-class ACP cron may be useful, but this branch is not the best merge shape until maintainers choose the API/security boundary and the fork install, permission, persistence, protocol, UI/i18n, rebase, and proof gaps are fixed.

Full review comments:

  • [P1] Drop fork upgrade scripts from upstream — scripts/fork-upgrade.sh:9
    The added installer defaults to cloning and linking lxf-lxf/openclaw, and the README/quickstart commands tell users to pipe raw fork content into a shell. Upstream OpenClaw should not publish a contributor-fork remote-code-execution upgrade path as part of a cron feature.
    Confidence: 0.97
  • [P1] Do not make approve-all the quickstart default — docs/automation/cron-acp-quickstart.md:72-73
    The minimal ACP cron config sets permissionMode: "approve-all", while current ACP docs define that mode as auto-approving all file writes and shell commands. Use safe defaults or isolate this as explicit break-glass guidance after maintainer security review.
    Confidence: 0.96
  • [P1] Rebase the cron protocol change onto the active package — src/gateway/protocol/schema/cron.ts:21-24
    Current main validates cron payloads through packages/gateway-protocol/src/schema/cron.ts, but this branch adds acpTurn under the stale src/gateway/protocol/schema/cron.ts path. After a real rebase, current Gateway clients and validators would still lack the new payload variant.
    Confidence: 0.94
  • [P1] Persist acpTurn through the SQLite payload codec — src/cron/types.ts:192-195
    Current main persists cron jobs through src/cron/store/payload-codec.ts. Adding a new payload kind only to the type union leaves harness and cwd without an explicit SQLite encode/decode round trip, so saved jobs can be lost or rejected after restart.
    Confidence: 0.92
  • [P2] Regenerate locale bundles instead of hand-editing zh-CN — ui/src/i18n/locales/zh-CN.ts:1301-1310
    ui/src/i18n/locales/zh-CN.ts is generated under the scoped UI guide. Add the English source strings and run the i18n sync path so locale output and metadata stay consistent.
    Confidence: 0.88
  • [P2] Do not document jobs.json as active cron config — docs/automation/cron-acp-quickstart.md:104-105
    Current cron jobs persist in SQLite, and current repo policy treats legacy file stores as migration debt. Show this as a schema-only example or use CLI/Gateway RPC instructions instead of telling users to edit ~/.openclaw/cron/jobs.json.
    Confidence: 0.87

Overall correctness: patch is incorrect
Overall confidence: 0.92

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e9720c27fa69.

Label changes

Label justifications:

  • P2: This is a broad but non-emergency feature PR touching cron runtime, Gateway protocol, CLI, UI, docs, persistence, and command-execution security posture.
  • merge-risk: 🚨 compatibility: The branch adds a public cron payload/API surface while current main has moved protocol paths and added SQLite/command cron contracts the PR does not handle.
  • merge-risk: 🚨 security-boundary: The diff publishes fork pipe-to-shell installers and approve-all ACP cron guidance, expanding command/file-write execution risk in scheduled non-interactive runs.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The external PR body leaves real behavior proof blank; it needs redacted terminal output, logs, screenshots, a recording, or a linked artifact showing an actual OpenClaw/acpx cron run after this patch, and updating the PR body should trigger a fresh ClawSweeper review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +819, Tests +195, Docs +263, Other +388. Total +1665 across 34 files.

View PR surface stats
Area Files Added Removed Net
Source 23 880 61 +819
Tests 5 195 0 +195
Docs 4 263 0 +263
Config 0 0 0 0
Generated 0 0 0 0
Other 2 388 0 +388
Total 34 1726 61 +1665

Security concerns:

  • [high] Fork installer would execute contributor branch code — scripts/fork-upgrade.sh:9
    The added installer defaults to the lxf-lxf/openclaw fork and the docs recommend raw pipe-to-shell install commands, which would make upstream OpenClaw distribute third-party code execution as an official setup path.
    Confidence: 0.97
  • [high] Quickstart normalizes ACP approve-all — docs/automation/cron-acp-quickstart.md:72
    The minimal ACP cron config uses approve-all, which current docs define as auto-approving writes and shell commands for non-interactive ACP sessions instead of using safer defaults or explicit break-glass framing.
    Confidence: 0.96

What I checked:

Likely related people:

  • Vincent Koc: Current-main blame points to Vincent Koc on the active cron payload union, Gateway protocol cron schema, SQLite payload codec, and ACP permission documentation lines central to this PR's rebase and security review. (role: recent cron contract contributor; confidence: high; commits: 2ad2e4f2dc6c, aa69b12d0086; files: src/cron/types.ts, packages/gateway-protocol/src/schema/cron.ts, src/cron/store/payload-codec.ts)
  • Peter Steinberger: Git history shows recent ACP/acpx config, docs, and sessions_spawn hardening work that the scheduled ACP cron path would need to align with. (role: recent ACP/acpx and cron-adjacent contributor; confidence: medium; commits: f2602a5d7b67, 1f912482e509, fb61986767c7; files: docs/tools/acp-agents-setup.md, extensions/acpx, src/agents/acp-spawn.ts)
  • Onur Solmaz: History around ACPX runtime consumption and ACP thread-bound agents makes Onur relevant for the acpx execution boundary this feature would call. (role: recent ACPX runtime contributor; confidence: medium; commits: 154a7edb7cad, a7d56e3554d0, d669b27a45c3; files: extensions/acpx, src/acp, src/agents/acp-spawn.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat.

Where did the egg go?
  • The egg game starts only after the PR passes the real-behavior proof check.
  • Before that, no creature or rarity is rolled. The treat waits for real proof.
  • This is still just collectible flavor: proof affects review readiness, not creature quality.

@BingqingLyu

This comment was marked as spam.

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Jun 19, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed stale Marked as stale due to inactivity labels Jul 14, 2026
@steipete

Copy link
Copy Markdown
Contributor

Closing per ClawSweeper review verdict stalled_unproven_pr (decision packet 2026-07-14T10:48:07.488Z). This item was part of the audited close backlog (openclaw/clawsweeper#920) stranded by an apply-lane defect, drained manually after re-verification. If this is wrong, reopen and ClawSweeper will re-review.

@steipete steipete closed this Jul 29, 2026
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 cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: blank-template Candidate: PR template appears mostly untouched. triage: dirty-candidate Candidate: broad unrelated surfaces; may need splitting or cleanup. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. triage: refactor-only Candidate: refactor/cleanup-only PR without maintainer context.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants