Skip to content

fix(cron): retain stale delivery suppression diagnostics - #129408

Merged
steipete merged 2 commits into
mainfrom
codex/qa-stale-cron-delivery-explanation-20260825
Aug 26, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/qa-stale-cron-delivery-explanation-20260825

Conversation

@steipete

@steipete steipete commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Preserve the explanation when a cron run intentionally suppresses stale delivery.

Root cause

The delivery owner correctly suppresses messages that start hours late, but recorded the detailed scheduled-time/delay explanation only in logs and returned an unexplained undelivered result. Existing run history, CLI, UI, and state owners already propagate deliveryError; the authoritative owner simply never authored it.

Store the existing explanation once, reuse it for the unchanged warning log, and carry it in the existing result. Scheduling, message suppression, execution status, retry and completion policies, recipient custody, configuration, and the existing storage schema remain unchanged. The original author commit is preserved in the refreshed branch history.

Validation

  • All 139 delivery-owner tests pass, including the strengthened stale-delivery regression.
  • Two real scheduler, SQLite persistence, and finished-event regressions pass.
  • The real production CLI and completion owners were exercised across required, best-effort, and default delivery policies: the explanation is visible, run status remains successful, and each policy retains its existing completion outcome.
  • Changed-file formatting, lint, and two independent full-diff reviews pass.
  • Production delta: +3/-3, net zero.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 25, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 1:31 PM ET / 17:31 UTC.

ClawSweeper review

What this changes

The PR records the existing stale-delivery suppression message in the cron delivery result while retaining the current warning log and suppression behavior.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The PR remains necessary and the owner-layer repair is correct: current main logs the stale-delivery reason but does not return it through the existing diagnostic path.

Priority: P2
Reviewed head: a5cda46aac9c973e68ccd94777cd7a23347f597d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with credible regression coverage; only exact-head refresh remains before merge.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; the body additionally reports CLI, SQLite, and completion-owner validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; the body additionally reports CLI, SQLite, and completion-owner validation.
Evidence reviewed 5 items Current-main gap: Current main logs the stale-delivery explanation but returns a successful undelivered result without deliveryError.
Owner-layer repair: The PR assigns the existing warning text once, retains the warning log, and returns it in the suppression result.
Existing propagation: Finalization forwards deliveryError, while the service records it as delivery state and exposes it in finished events.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs src/cron/isolated-agent/delivery-dispatch.double-announce.test.ts

Result: PASS (completed)

[test] starting test/vitest/vitest.cron.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-129408-zxk97W/target

 ✓  cron  src/cron/isolated-agent/delivery-dispatch.double-announce.test.ts (139 tests) 813ms

 Test Files  1 passed (1)
      Tests  139 passed (139)
   Start at  17:32:07
   Duration  12.11s (transform 8.99s, setup 1.03s, import 9.90s, tests 813ms, environment 0ms)

[test] passed 1 Vitest shard in 18.80s
[test] starting test/vitest/vitest.cron.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-129408-zxk97W/target

 ✓  cron  src/cron/isolated-agent/delivery-dispatch.double-announce.test.ts (139 tests) 687ms

 Test Files  1 passed (1)
      Tests  139 passed (139)
   Start at  17:32:27
   Duration  5.79s (transform 2.86s, setup 461ms, import 4.40s, tests 687ms, environment 0ms)

[test] passed 1 Vitest shard in 12.31s

Assertions:

  • PASS expect_output: Test Files

How this fits together

Cron jobs produce a completion result that delivery dispatch either sends to a configured target or intentionally suppresses when too stale. Finalization persists that result into cron state and finished events used by CLI and UI history.

flowchart LR
  A[Cron schedule] --> B[Isolated job run]
  B --> C[Delivery dispatch]
  C --> D{Run too stale?}
  D -->|Yes| E[Suppressed result with diagnostic]
  D -->|No| F[Outbound delivery]
  E --> G[Run state and finished event]
  F --> G
  G --> H[CLI and UI history]
Loading

Before merge

  • Resolve merge risk (P1) - GitHub reports the clean PR as behind main; refresh it and obtain exact-head required checks before merge. This does not show a three-way-merge regression.
  • Complete next step (P2) - This maintainer-authored PR already contains the bounded repair; the remaining action is ordinary exact-head merge validation.
Agent review details

Security

None.

PR surface

Source 0, Tests +5. Total +5 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 3 0
Tests 1 5 0 +5
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 8 3 +5

Review metrics

Metric Value Why it matters
Production versus test delta production +0 net (3 added, 3 removed); tests +5 The patch reuses the existing diagnostic instead of expanding delivery policy or persistence surface.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Rebase or merge-queue refresh the compact owner-layer fix, retain the stale-suppression regression, and land after exact-head checks pass.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Rebase or merge-queue refresh the compact owner-layer fix, retain the stale-suppression regression, and land after exact-head checks pass.

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

Yes in source: current main logs the stale-delivery explanation but omits it from the returned result; the focused regression reaches that exact delayed-schedule branch.

Is this the best way to solve the issue?

Yes: recording the already-authored explanation at the delivery owner is preferable to reconstructing it in state, event, CLI, or UI consumers.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: The PR repairs missing operator diagnostics for an intentionally suppressed cron delivery without changing delivery policy.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; the body additionally reports CLI, SQLite, and completion-owner validation.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the PR-head repair and is the most frequent contributor in locally available delivery-dispatch history. (role: recent area contributor; confidence: high; commits: a5cda46aac9c, 86cfcd3833f7; files: src/cron/isolated-agent/delivery-dispatch.ts, src/cron/isolated-agent/run-finalize.ts)
  • SunnyShu: Authored the recent direct-delivery route persistence change in the same delivery owner. (role: adjacent owner; confidence: medium; commits: 0774c20d50e2; files: src/cron/isolated-agent/delivery-dispatch.ts)
  • Josh Lehman: Authored the recent current-session completion work that feeds the same finalization path. (role: adjacent owner; confidence: medium; commits: 133d5fff6c94; files: src/cron/isolated-agent/run-finalize.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh the PR against current main and verify green required checks for the resulting head.

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 (3 earlier review cycles)
  • reviewed 2026-08-25T16:25:01.429Z sha c228a6d :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T17:07:47.316Z sha c228a6d :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T18:07:37.262Z sha c228a6d :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

Rank-up move addressed: this PR was refreshed against tested green main f2ff510e21986f9b7700b16f4785ec1bd40f1b74 in signed head a5cda46aac9c973e68ccd94777cd7a23347f597d while preserving the original author commit c228a6ddb14620d76d827c3993fc0e2675b6a664 as its first parent. Required hosted checks for that exact resulting head will be confirmed green before landing. A second freshness-only rebase is unnecessary absent an actual conflict, failing native guard, or material stale-base risk.

@steipete
steipete merged commit a5537c6 into main Aug 26, 2026
203 checks passed
@steipete
steipete deleted the codex/qa-stale-cron-delivery-explanation-20260825 branch August 26, 2026 18:07
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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