Skip to content

fix(cron): complete jobs filters#87620

Merged
steipete merged 4 commits into
openclaw:mainfrom
Alix-007:issue-9455-cron-job-filter
May 28, 2026
Merged

fix(cron): complete jobs filters#87620
steipete merged 4 commits into
openclaw:mainfrom
Alix-007:issue-9455-cron-job-filter

Conversation

@Alix-007

@Alix-007 Alix-007 commented May 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #9455

Summary

  • Include cron job ids in cron.list text search so Jobs search can match IDs.
  • Add an Unknown last-run status filter for Jobs and normalize preferred lastRunStatus, legacy lastStatus, and missing status in the UI.
  • Cover the service, controller, and view surfaces with targeted checks.

Real behavior proof

  • Behavior or issue addressed: Cron Jobs list filtering from [Feature]: Cron Jobs UI: add filter bar above Jobs list (status/kind/search) #9455 now matches job IDs during text search and lets the Jobs last-run status filter select Unknown while still recognizing preferred lastRunStatus and legacy lastStatus values.
  • Real environment tested: Local OpenClaw checkout /media/vdc/0668001470/workSpace/claw-campaign/openclaw-issue-9455 at 849f83bdf9 on Linux, Node v22.22.0, pnpm 11.2.2, running repository code via node --import tsx against a temporary cron store JSON.
  • Exact steps or command run after this patch: Created a temporary cron store with two cron job records, constructed CronService from src/cron/service.ts, ran service.listPage({ query: "tax" }), then imported getVisibleCronJobs from ui/src/ui/controllers/cron.ts and applied skipped and unknown last-status filters to three UI job records.
  • Evidence after fix: Terminal output from the local run:
{
  "command": "CronService.listPage({ query: \"tax\" }) and getVisibleCronJobs(...) ",
  "serviceJobIdsForTaxQuery": [
    "tax-digest"
  ],
  "uiSkippedStatusJobIds": [
    "preferred",
    "legacy"
  ],
  "uiUnknownStatusJobIds": [
    "missing"
  ]
}
  • Observed result after fix: The tax search returned tax-digest by job ID even though its display name was Finance digest; the skipped filter returned both the preferred lastRunStatus job and the legacy lastStatus job; the unknown filter returned only the job with no last status.
  • What was not tested: I did not run a browser control UI session; the local run exercised the same service and UI controller modules, and the supplemental view check covers the rendered Unknown option.

Supplemental checks

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.cron.config.ts src/cron/service.list-page-sort-guards.test.ts --reporter=verbose
  • node scripts/run-vitest.mjs ui/src/ui/controllers/cron-filters.test.ts --reporter=verbose
  • node scripts/run-vitest.mjs ui/src/ui/views/cron.test.ts --reporter=verbose
  • node_modules/.bin/oxfmt --check src/cron/service/ops.ts src/cron/service.list-page-sort-guards.test.ts ui/src/ui/controllers/cron.ts ui/src/ui/controllers/cron-filters.test.ts ui/src/ui/views/cron.ts ui/src/ui/views/cron.test.ts
  • node_modules/.bin/oxlint --tsconfig config/tsconfig/oxlint.core.json src/cron/service/ops.ts src/cron/service.list-page-sort-guards.test.ts ui/src/ui/controllers/cron.ts ui/src/ui/controllers/cron-filters.test.ts ui/src/ui/views/cron.ts ui/src/ui/views/cron.test.ts
  • git diff --check origin/main...HEAD

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 28, 2026, 6:02 PM ET / 22:02 UTC.

Summary
The branch adds job-id text search and schedule-kind/last-run-status cron.list filters, sends table filters from the Control UI, normalizes preferred and legacy cron run statuses, updates Swift gateway models, and adds focused tests.

PR surface: Source +94, Tests +119, Other +8. Total +221 across 20 files.

Reproducibility: yes. from source inspection: current main omits job.id from the cron.list search haystack and has no server-side schedule-kind or last-run-status list filters. I did not run an executable current-main repro because this was a read-only review.

Review metrics: 1 noteworthy metric.

  • Gateway protocol params: 2 optional cron.list params added. The additive RPC surface must stay aligned across schema, server forwarding, generated client artifacts, and focused validator tests before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

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

Rank-up moves:

  • Resolve the dirty merge state and rerun the focused cron service, protocol, UI controller/view, format, lint, and diff checks on the resolved head.

Risk before merge

  • [P1] GitHub currently reports the PR as dirty against the base branch; maintainers need a conflict-aware rebase or merge resolution that preserves the additive protocol/schema/server/UI alignment before landing.

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused cron filtering change after resolving the dirty merge state and rerunning the supplied cron service, protocol, controller, view, format, lint, and diff checks on the resolved head.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No repair lane is needed for a code defect; the actionable blocker is human/maintainer handling of the dirty merge state and normal PR review after refresh.

Security
Cleared: The diff does not touch dependencies, lockfiles, CI, secrets, install scripts, or other code-execution supply-chain surfaces; the protocol change is additive and validated.

Review details

Best possible solution:

Land the focused cron filtering change after resolving the dirty merge state and rerunning the supplied cron service, protocol, controller, view, format, lint, and diff checks on the resolved head.

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

Yes, from source inspection: current main omits job.id from the cron.list search haystack and has no server-side schedule-kind or last-run-status list filters. I did not run an executable current-main repro because this was a read-only review.

Is this the best way to solve the issue?

Yes, the proposed direction is the narrowest maintainable fix: add optional cron.list filters at the service/protocol boundary, keep shared non-table loads out of table-only filters, and preserve legacy lastStatus while preferring lastRunStatus. The only blocker is merge-state refresh, not a replacement design.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 938b2a84dd41.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix terminal output from a local OpenClaw checkout exercising CronService.listPage and getVisibleCronJobs with the changed filters, plus focused supplemental checks.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This is a limited-blast-radius cron Jobs filtering improvement for the Control UI and gateway cron.list surface.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes after-fix terminal output from a local OpenClaw checkout exercising CronService.listPage and getVisibleCronJobs with the changed filters, plus focused supplemental checks.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix terminal output from a local OpenClaw checkout exercising CronService.listPage and getVisibleCronJobs with the changed filters, plus focused supplemental checks.
Evidence reviewed

PR surface:

Source +94, Tests +119, Other +8. Total +221 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 11 111 17 +94
Tests 8 132 13 +119
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 8 0 +8
Total 20 251 30 +221

What I checked:

  • Root policy read: The full root review policy was read before judging the PR. (AGENTS.md:1)
  • Scoped policy read: UI and gateway/protocol scoped guides were read; the additive protocol guidance and UI ownership guidance are relevant to this review. (src/gateway/protocol/AGENTS.md:1)
  • Current main gap: Current main filters cron.list by enabled state, agent, and a query haystack that omits job.id; it has no schedule-kind or last-run-status server-side filters. (src/cron/service/ops.ts:318, 938b2a84dd41)
  • Current UI gap: Current main has schedule and last-status UI filters, but the last-status filter compares only legacy state.lastStatus and the Jobs dropdown lacks the Unknown option. (ui/src/ui/controllers/cron.ts:360, 938b2a84dd41)
  • PR server implementation: The PR head adds scheduleKind and lastRunStatus option normalization, filters by them before paging, resolves preferred lastRunStatus before legacy lastStatus, and includes job.id in the search haystack. (src/cron/service/ops.ts:349, 66bf1c4fdde8)
  • PR UI implementation: The PR head sends scheduleKind and lastRunStatus only for table-filtered cron Jobs loads and keeps shared cron job loads from inheriting table-only filters. (ui/src/ui/controllers/cron.ts:279, 66bf1c4fdde8)

Likely related people:

  • steipete: Current-main blame for the cron listPage, UI controller, and cron protocol schema points to a661506, and this PR also contains follow-up commits by the same person refining paging and lint/test behavior. (role: recent area contributor and PR updater; confidence: high; commits: a661506b0f4e, 24104bf338e3, 593b8110244c; files: src/cron/service/ops.ts, ui/src/ui/controllers/cron.ts, src/gateway/protocol/schema/cron.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.

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 28, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg: ✨ hatched 💎 rare Mossy Test Hopper. Rarity: 💎 rare. Trait: purrs at green checks.

Details

Share on X: post this hatch
Copy: My PR egg hatched a 💎 rare Mossy Test Hopper in ClawSweeper.
Hatchability:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

About:

  • Eggs appear after real-behavior proof passes. They are collectible flavor only.
  • Review momentum changes the shell state: follow-up work warms it, re-review makes it wobble, and a clean final review lets it hatch.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@Alix-007
Alix-007 force-pushed the issue-9455-cron-job-filter branch from a9b2fbe to 849f83b Compare May 28, 2026 12:28
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 28, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels May 28, 2026
@steipete steipete self-assigned this May 28, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M commands Command implementations and removed size: S proof: sufficient ClawSweeper judged the real behavior proof convincing. labels May 28, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels May 28, 2026
@steipete
steipete force-pushed the issue-9455-cron-job-filter branch from 66bf1c4 to 033dd48 Compare May 28, 2026 22:12
@openclaw-barnacle openclaw-barnacle Bot removed commands Command implementations proof: sufficient ClawSweeper judged the real behavior proof convincing. labels May 28, 2026
@steipete
steipete merged commit ff21b4e into openclaw:main May 28, 2026
100 of 103 checks passed
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 gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: supplied External PR includes structured after-fix real behavior proof. 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.

[Feature]: Cron Jobs UI: add filter bar above Jobs list (status/kind/search)

2 participants