Skip to content

fix(macos): cron editor drops advanced delivery routes - #118047

Merged
steipete merged 3 commits into
mainfrom
feat/macos-cron-delivery-fields
Aug 2, 2026
Merged

steipete merged 3 commits into
mainfrom
feat/macos-cron-delivery-fields

Conversation

@steipete

@steipete steipete commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Related: #117909

What Problem This Solves

Fixes an issue where users editing an existing cron job in the macOS app would lose its thread, completion, or failure delivery routing when saving because the native client did not mirror those gateway fields.

Why This Change Was Made

The macOS delivery mirror now preserves threadId, completionDestination, and failureDestination using their exact heterogeneous JSON representation, matching the gateway protocol without native defaults. The existing delivery summary shows the exact protocol field names and configured values as verbatim operator data, and editor saves retain them while keeping completionDestination scoped to announce delivery.

User Impact

Cron jobs edited in the native macOS client retain their advanced delivery routing instead of silently dropping it. Existing delivery details also expose the configured thread and completion/failure destinations.

Evidence

  • Hosted macos-swift passed on head 819f8559b111c6532cbd9b57291c5516c764731d, including strict lint, release build, OpenClawKit tests, and full Swift tests.
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer swift test --package-path apps/macos --filter 'CronModelsTests|CronJobEditorSmokeTests' — passed 21 tests in 2 suites on the final source.
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer swift build --package-path apps/macos --product OpenClaw --configuration release — passed locally; hosted CI repeated the release build on the final source.
  • node --import tsx scripts/native-app-i18n.ts verify — passed with changed=false and all native source guards green.
  • Targeted strict SwiftLint on all six touched files — 0 violations.
  • Targeted SwiftFormat with the repository configuration — clean.
  • git diff --check origin/main...HEAD — passed.
  • Autoreview — clean after the implementation and each CI repair, with no accepted or actionable findings.
  • node scripts/check-changed.mjs could not acquire a ready hosted Crabbox provider from this worktree; the PR's hosted macOS, i18n, Periphery, and repository checks supplied the heavy proof and finished green.

AI-assisted: yes. I reviewed the complete change and understand the protocol-preservation behavior.

@openclaw-barnacle openclaw-barnacle Bot added the app: macos App: macos label Aug 2, 2026
@steipete
steipete marked this pull request as ready for review August 2, 2026 16:18
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 12:37 PM ET / 16:37 UTC.

ClawSweeper review

What this changes

The PR adds macOS model and save-payload preservation for cron thread IDs plus completion and failure delivery destinations, and displays those routes in the cron summary.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 7 items remain

The full protocol and current macOS editor path show one remaining delivery regression: saving an existing webhook-mode cron job converts it to no delivery. The PR also still lacks inspectable after-fix native-app evidence for the edit/save path, so it should remain open for a focused correction and redacted real-behavior proof.

Priority: P1
Reviewed head: 819f8559b111c6532cbd9b57291c5516c764731d

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The delivery-field preservation is useful, but an existing supported routing mode still regresses and the native edit/save behavior lacks real after-fix proof.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR body reports Swift tests and a release build, but no inspectable after-fix native edit/save recording, terminal transcript, runtime output, log, or linked artifact is available. Add redacted proof of the macOS flow after fixing the webhook case; updating the PR body should trigger a fresh 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.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports Swift tests and a release build, but no inspectable after-fix native edit/save recording, terminal transcript, runtime output, log, or linked artifact is available. Add redacted proof of the macOS flow after fixing the webhook case; updating the PR body should trigger a fresh 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 5 items Gateway delivery contract: The cron protocol permits none, announce, and webhook modes; a webhook mode requires to, while the shared fields include threadId, accountId, and failureDestination.
Webhook save regression: At the PR head, hydration maps every non-announce delivery mode to the editor's none selection. The builder then sends {mode: "none"} and never includes the original webhook to value, so a webhook job is changed on save.
Gateway confirms the loss is persisted: When a patch changes delivery from webhook to none, the Gateway clears to; its merge behavior preserves an omitted account ID, so the prior account-ID concern does not remain, but the webhook-mode concern does.
Findings 1 actionable finding [P1] Preserve existing webhook delivery mode
Security None None.

How this fits together

The macOS app reads cron jobs from the Gateway, hydrates them into the native editor, then submits a delivery patch back to the Gateway when the user saves. The Gateway merges omitted delivery fields into the stored cron job and dispatches scheduled output according to the resulting mode and destination.

flowchart LR
  A[Gateway cron job] --> B[macOS cron model]
  B --> C[Native editor]
  C --> D[Save delivery patch]
  D --> E[Gateway patch merge]
  E --> F[Stored cron routing]
  F --> G[Completion or failure delivery]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports Swift tests and a release build, but no inspectable after-fix native edit/save recording, terminal transcript, runtime output, log, or linked artifact is available. Add redacted proof of the macOS flow after fixing the webhook case; updating the PR body should trigger a fresh 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.
  • Preserve existing webhook delivery mode (P1) - The Gateway supports webhook delivery, but hydration maps every non-announce mode to .none; a subsequent save sends mode: none without the webhook target. The Gateway's merge then clears to, silently disabling delivery for existing webhook cron jobs. This is the previous webhook blocker and remains unfixed at the current head.
  • Resolve merge risk (P1) - Merging as written lets a normal macOS edit of an existing webhook-mode cron job silently replace its required webhook target with no delivery.
  • Resolve merge risk (P1) - The reported Swift tests exercise announce-mode preservation only, so they do not establish the real edit/save behavior for webhook-mode jobs or show the repaired native flow.
  • Complete next step (P2) - The maintainer-labeled PR needs its remaining webhook-mode regression repaired and contributor-supplied real behavior proof before a merge decision.
  • Improve patch quality - Preserve or safely gate existing webhook delivery mode and its to target, with a focused regression test.
  • Improve patch quality - Add redacted native-app or terminal/runtime evidence showing an existing cron job retains its advanced routes after edit and save.

Findings

  • [P1] Preserve existing webhook delivery mode — apps/macos/Sources/OpenClaw/CronModels.swift:60-62
Agent review details

Security

None.

PR surface

Other +76. Total +76 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 6 82 6 +76
Total 6 82 6 +76

Review metrics

None.

Root-cause cluster

Relationship: canonical
Canonical: #118047
Summary: This PR is the active macOS-specific candidate for preserving cron routing; the merged web-UI work addressed the analogous clone/edit contract but does not repair the remaining native webhook-save regression.

Members:

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

Merge-risk options

Maintainer options:

  1. Preserve webhook mode before merge (recommended)
    Keep an existing webhook delivery mode and its required target intact when the native editor saves a job, with focused coverage for that edit path.
  2. Pause the PR
    Pause rather than merge if the macOS editor is intentionally limited to announce delivery and no safe read-only or raw-preservation design is accepted.

Technical review

Best possible solution:

Represent unsupported webhook delivery as read-only or preserve its raw mode and target through the macOS editor, add a webhook edit/save regression test, and attach redacted native-app proof that saving an advanced-routing job retains its Gateway routing.

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

Yes, by source: load a cron job whose delivery mode is webhook, open and save it in the macOS editor, and inspect the outgoing patch. The editor maps it to none, and the Gateway clears the old webhook target on that mode change.

Is this the best way to solve the issue?

No. The patch preserves several announce-related fields, but it does not preserve the complete supported delivery union; handling webhook jobs as none violates the Gateway contract and retains the original silent-routing-loss class.

Full review comments:

  • [P1] Preserve existing webhook delivery mode — apps/macos/Sources/OpenClaw/CronModels.swift:60-62
    The Gateway supports webhook delivery, but hydration maps every non-announce mode to .none; a subsequent save sends mode: none without the webhook target. The Gateway's merge then clears to, silently disabling delivery for existing webhook cron jobs. This is the previous webhook blocker and remains unfixed at the current head.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: An ordinary macOS cron edit can silently disable a previously configured webhook delivery route.
  • merge-risk: 🚨 message-delivery: The changed delivery-preservation surface still converts a supported webhook route into none during save.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports Swift tests and a release build, but no inspectable after-fix native edit/save recording, terminal transcript, runtime output, log, or linked artifact is available. Add redacted proof of the macOS flow after fixing the webhook case; updating the PR body should trigger a fresh 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

What I checked:

  • Gateway delivery contract: The cron protocol permits none, announce, and webhook modes; a webhook mode requires to, while the shared fields include threadId, accountId, and failureDestination. (packages/gateway-protocol/src/schema/cron.ts:375, b84e14f22255)
  • Webhook save regression: At the PR head, hydration maps every non-announce delivery mode to the editor's none selection. The builder then sends {mode: "none"} and never includes the original webhook to value, so a webhook job is changed on save. (apps/macos/Sources/OpenClaw/CronJobEditor+Helpers.swift:63, 819f8559b111)
  • Gateway confirms the loss is persisted: When a patch changes delivery from webhook to none, the Gateway clears to; its merge behavior preserves an omitted account ID, so the prior account-ID concern does not remain, but the webhook-mode concern does. (src/cron/service/jobs.ts:555, b84e14f22255)
  • Current-main provenance: The adjacent web-UI cron-routing work was merged to current main as a5b8b7052b27fbc9607add5277c5b9d31a92ff7b on 2026-08-02, and its author is the strongest available history signal for this shared delivery contract. (packages/gateway-protocol/src/schema/cron.ts:375, a5b8b7052b27)
  • Real behavior proof status: The PR body reports unit tests and a release build, but the supplied discussion has no inspectable recording, terminal transcript, runtime log, or artifact showing an existing macOS cron job with advanced routing being edited and saved.

Likely related people:

  • steipete: Current-main history attributes the immediately related merged cron delivery-contract work to this person, and the same area is the focus of this PR. (role: recent area contributor; confidence: high; commits: a5b8b7052b27; files: apps/macos/Sources/OpenClaw/CronJobEditor+Helpers.swift, apps/macos/Sources/OpenClaw/CronModels.swift, packages/gateway-protocol/src/schema/cron.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-02T16:24:11.777Z sha 578df9e28508f2f45ef6a87ed9b1cbb7a8bc1b6e :: needs real behavior proof before merge. :: [P1] Preserve the primary delivery account ID | [P1] Do not serialize webhook jobs as no-delivery jobs

@steipete
steipete force-pushed the feat/macos-cron-delivery-fields branch from 91a3729 to 819f855 Compare August 2, 2026 16:33
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 2, 2026
@steipete
steipete merged commit 19aad4a into main Aug 2, 2026
61 of 63 checks passed
@steipete
steipete deleted the feat/macos-cron-delivery-fields branch August 2, 2026 17:05
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
* fix(macos): preserve advanced cron delivery routing

* fix(macos): mark cron routing labels verbatim

* fix(macos): keep cron routing inventory stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant