Skip to content

chore(cron): cover execution diagnostics - #118964

Merged
vincentkoc merged 1 commit into
mainfrom
qa-a03-cron-diagnostics-20260803
Aug 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
qa-a03-cron-diagnostics-20260803

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Cron QA coverage did not prove that isolated-run provider admission failures or terminal timeout and execution-denial outcomes survive through the operator-visible event and persisted run-history boundaries.

Why This Change Was Made

Adds a test-only QA scenario that executes production CronService jobs through the isolated-agent orchestration path. The preflight case uses a real broken loopback transport, while timeout and denial are injected at the external agent boundary so production normalization, diagnostics, event emission, and SQLite persistence remain under test.

User Impact

No runtime behavior changes. Maintainers gain regression proof for:

  • automation.model-provider-preflight
  • automation.timeout-and-denial-diagnostics

Evidence

  • Exact reviewed head: 810f42dd82007f30e275bb29cca222a005594521
  • node scripts/run-vitest.mjs src/cron/cron-execution-diagnostics.e2e.test.ts
    • 1 file passed
    • 3 tests passed
  • Both exact QA coverage IDs resolve uniquely to cron-execution-diagnostics
  • Hosted exact-target CI: https://github.com/openclaw/openclaw/actions/runs/30853306497
    • private-QA build artifacts and all four QA Smoke profiles passed
    • focused cron isolated-agent, cron service, cron core, and test-types lanes passed
  • Fresh autoreview found no actionable issue (correct: 0.99)
  • ClawSweeper reviewed this exact head and found no patch defect
  • git diff --check
  • Production LOC delta: 0

Collision Disposition

As of August 3, 2026, #117340, #117425, #102116, #115933, and #117884 remain open at unchanged heads. No owner-path change has landed on main, so the optional ClawSweeper refresh is explicitly deferred. This exact head remains frozen against unrelated main drift.

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc vincentkoc changed the title test(cron): cover execution diagnostics chore(cron): cover execution diagnostics Aug 3, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 5:12 PM ET / 21:12 UTC.

ClawSweeper review

What this changes

This draft adds a QA Lab scenario and a CronService end-to-end test that verifies provider-preflight, timeout, and execution-denial diagnostics reach finished events and persisted cron run history.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this maintainer-authored draft open. The checkout does not yet contain either added file, and the patch adds a useful cross-boundary regression test for diagnostics that existing unit-level tests cover separately; no concrete patch defect was found in read-only review.

Priority: P3
Reviewed head: 810f42dd82007f30e275bb29cca222a005594521

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused and exercises real cron event and persistence boundaries, with no actionable correctness finding in review.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only draft does not require contributor real-setup proof; the relevant merge evidence is the focused CronService regression run reported in the PR body.
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, test-only draft does not require contributor real-setup proof; the relevant merge evidence is the focused CronService regression run reported in the PR body.
Evidence reviewed 6 items New regression boundary: The proposed test starts a real CronService, invokes its isolated-agent job path, then asserts both the finished event and the persisted run-history row for preflight, timeout, and execution-denial outcomes.
Canonical timeout owner: Current cron isolated-run handling classifies nested command-lane timeouts, preserves the resolved provider/model, and builds a canonical cron-setup diagnostic before returning the terminal result.
Persisted-history boundary: The history reader derives cron run-history rows from the SQLite task registry and filters them by the cron store key and job id, so the proposed assertion crosses the intended persistence boundary.
Findings None None.
Security None None.

How this fits together

Cron jobs pass through isolated-agent admission and execution, then CronService publishes a finished event and records a durable task-run entry. The new test exercises that path from provider preflight or terminal failure through the operator-visible event and SQLite-backed history reader.

flowchart LR
  A[Scheduled cron job] --> B[Isolated agent admission]
  B --> C[Provider preflight or agent execution]
  C --> D[Terminal diagnostic normalization]
  D --> E[Finished cron event]
  D --> F[Durable task-run record]
  F --> G[Run-history reader]
Loading

Before merge

  • Resolve merge risk (P2) - Three linked open cron runtime PRs still touch adjacent preflight, timeout, and delivery behavior; refresh this draft’s assertions against their final merged semantics before landing.
Agent review details

Security

None.

PR surface

Tests +262, Other +31. Total +293 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 262 0 +262
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 31 0 +31
Total 2 293 0 +293

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: qa/scenarios/scheduling/cron-execution-diagnostics.yaml. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain this focused integration coverage, then rebase or refresh it after the linked cron runtime fixes settle so its event and persisted-history assertions remain aligned with the canonical terminal outcomes.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain this focused integration coverage, then rebase or refresh it after the linked cron runtime fixes settle so its event and persisted-history assertions remain aligned with the canonical terminal outcomes.

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

Not applicable: this PR adds regression coverage rather than reporting a separately reproducible user-facing defect. Its asserted path is source-backed through CronService, the isolated runner, events, and SQLite history.

Is this the best way to solve the issue?

Yes. A single integration test that reaches the real CronService persistence and event boundaries complements the existing isolated-run and service-level tests more directly than adding more mocks at either boundary.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a test-only diagnostic-coverage improvement with no runtime behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only draft does not require contributor real-setup proof; the relevant merge evidence is the focused CronService regression run reported in the PR body.

Label justifications:

  • P3: This is a test-only diagnostic-coverage improvement with no runtime behavior change.
  • 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, test-only draft does not require contributor real-setup proof; the relevant merge evidence is the focused CronService regression run reported in the PR body.

Evidence

What I checked:

Likely related people:

  • steipete: Current isolated-run timeout handling and cron task-run finalization trace to the recent ownership refactor authored by Peter Steinberger. (role: recent area contributor; confidence: high; commits: 5a65c96fc708; files: src/cron/isolated-agent/run.ts, src/cron/service/task-runs.ts)

Rank-up moves

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

  • Refresh the focused cron test after the linked open cron runtime changes are merged or explicitly deferred.

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.

@vincentkoc

Copy link
Copy Markdown
Member Author

Rank-up move disposition:

@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 21:18
@vincentkoc
vincentkoc merged commit ac6cc33 into main Aug 3, 2026
198 of 207 checks passed
@vincentkoc
vincentkoc deleted the qa-a03-cron-diagnostics-20260803 branch August 3, 2026 21:29
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

extensions: qa-lab maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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