Skip to content

fix(ui): surface auto-disabled automations instead of hiding them as paused - #123769

Merged
steipete merged 2 commits into
mainfrom
codex/autoqa-cron-autodisabled
Aug 14, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/autoqa-cron-autodisabled

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

An automation that auto-disables (10 consecutive run failures, or 3 schedule errors) is indistinguishable from an operator-paused job in the Control UI — it renders as plain "Paused" — and simultaneously drops out of every failure surface: the failed sidebar chip, the failing count, and the row's error dot all require enabled. The escalation removes visibility exactly when the problem became permanent. The recorded fact (state.autoDisabled with reason + count) is durable, public, and already used by the CLI (computeStatus) and doctor — but no web UI code read it.

Why This Change Was Made

Two coherent changes at the owning surfaces:

  • ui/src/lib/cron-status.ts (shared status owner): isCronJobActiveFailure now treats state.autoDisabled as an active failure regardless of enabled — auto-disable is the escalated failure state, not an operator pause (invariant comment added). Operator-paused jobs with historical errors stay unflagged, as before.
  • ui/src/pages/cron/view.ts: the disabled note renders "Auto-disabled · N run failures/schedule errors" in danger color with the last error as tooltip, instead of the generic "Paused"; the row keeps its error dot via the predicate change.

User Impact

Operators can see that an automation was auto-disabled, why, and after how many failures — and auto-disabled jobs keep raising the failed chip until acted on.

Evidence

  • 2 new regression tests fail pre-fix (predicate hides auto-disabled; row renders plain "Paused"), pass post-fix: cron-status.test.ts, new view-auto-disabled.test.ts; plus view.test.ts (44) and sidebar-attention.test.ts (15) green.
  • pnpm tsgo:ui clean; oxfmt/oxlint clean.
  • Autoreview (Codex, commit mode): clean, overall 0.99.

Known residual (named follow-up, server-side): the stats-card failing count uses a server-filtered enabled+error query (loadCronFailingCount) and one-shot retry-exhausted jobs never get an autoDisabled record at all (timer-outcomes.ts); both need gateway-side changes and are out of scope for this UI-truth fix.

Production LOC delta: +30 (distinct disabled-state renderer + predicate branch + locale strings + CSS, comment-weighted per repo policy); tests +44.

@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 14, 2026 17:26
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 14, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 14, 2026, 3:08 PM ET / 19:08 UTC.

ClawSweeper review

What this changes

The PR labels auto-disabled automations distinctly in the Control UI, marks them as active failures, and adds focused UI regression tests.

Merge readiness

⛔ Blocked by patch quality or review findings - 7 items remain

Keep this PR open: it improves row and sidebar visibility, but the Failing statistic still excludes the same auto-disabled jobs, and singular schedule-error copy is grammatically wrong.

Priority: P2
Reviewed head: c8b171337b0032eda39c0b69b60b4989adc2ce05

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 6 items Scheduler state: The scheduler atomically marks an auto-disabled job disabled and records the durable auto-disable fact.
Summary exclusion: The Failing statistic requests only enabled jobs with an error status, while list filtering rejects disabled jobs before checking status.
New UI predicate: The branch treats every auto-disabled job as an active failure, creating a disagreement with the unchanged enabled-only summary request.
Findings 2 actionable findings [P2] Align the Failing statistic with auto-disabled jobs
[P2] Use count-aware auto-disabled copy
Security None None.

How this fits together

The scheduler records an auto-disable reason and disables the automation; the Gateway exposes that state to the Control UI. The UI uses it in automation rows, sidebar attention, and the Failing summary statistic.

flowchart LR
  A[Scheduler failure] --> B[Auto-disabled automation state]
  B --> C[Gateway automation list]
  C --> D[Control UI failure logic]
  D --> E[Row and sidebar alert]
  C --> F[Failing summary statistic]
Loading

Before merge

  • Align the Failing statistic with auto-disabled jobs (P2) - This new predicate marks an auto-disabled job as failed for the row and sidebar, but loadCronFailingCount still requests only enabled error jobs. The scheduler clears enabled when it records autoDisabled, so the same job can show a red dot while the Failing statistic remains zero; add the server-owned active-failure count or filter and cover both run and schedule auto-disable paths.
  • Use count-aware auto-disabled copy (P2) - This selection always uses plural labels. A schedule-timestamp failure can create an auto-disabled job with consecutiveErrors: 1, producing “1 schedule errors”; add singular or count-neutral copy and cover that state. This was visible at the prior reviewed head and is a late finding.
  • Resolve merge risk (P1) - Merging leaves an auto-disabled job visibly failed in its row and sidebar while the Failing statistic can still report zero.
  • Resolve merge risk (P1) - The branch has no redacted before/after Control UI screenshot or recording, required by the repository policy for UI-visible changes.
  • Resolve merge risk (P1) - The bug-fix diff is production +32 lines; the added reason/count presentation is necessary because generic Paused copy cannot express the durable state, but it should land with the server-owned summary repair rather than as a partial second failure definition.
  • Complete next step (P2) - Both remaining findings have a narrow, source-proven repair path across the existing cron list and Control UI boundaries.
  • Improve patch quality - Address the highest-priority review finding and re-run the changed-surface validation.

Findings

  • [P2] Align the Failing statistic with auto-disabled jobs — ui/src/lib/cron-status.ts:24-28
  • [P2] Use count-aware auto-disabled copy — ui/src/pages/cron/view.ts:805-810
Agent review details

Security

None.

PR surface

Source +32, Tests +38. Total +70 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 4 38 6 +32
Tests 2 38 0 +38
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 76 6 +70

Review metrics

Metric Value Why it matters
Production vs test LOC production +38/-6 (net +32), tests +38/-0 The visual distinction has a concrete operator benefit, but this positive bug-fix growth is not ready to merge while the summary path retains contradictory semantics.

Merge-risk options

Maintainer options:

  1. Complete the canonical failure count (recommended)
    Add a Gateway-owned active-failure count or filter that includes auto-disabled jobs but excludes operator-paused historical errors, then make the UI summary and singular copy use it.

Technical review

Best possible solution:

Expose one Gateway-owned active-failure count or filter, consume it in the Failing statistic, use count-aware auto-disabled copy, and attach redacted browser proof of paused versus auto-disabled states.

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

Yes—source-reproducible: auto-disable writes enabled=false with state.autoDisabled, while the Failing query accepts only enabled error jobs. No live execution was performed in this read-only review.

Is this the best way to solve the issue?

No. The row/sidebar change is sound, but the best fix keeps the active-failure predicate at the Gateway summary boundary and repairs singular display copy.

Full review comments:

  • [P2] Align the Failing statistic with auto-disabled jobs — ui/src/lib/cron-status.ts:24-28
    This new predicate marks an auto-disabled job as failed for the row and sidebar, but loadCronFailingCount still requests only enabled error jobs. The scheduler clears enabled when it records autoDisabled, so the same job can show a red dot while the Failing statistic remains zero; add the server-owned active-failure count or filter and cover both run and schedule auto-disable paths.
    Confidence: 0.99
  • [P2] Use count-aware auto-disabled copy — ui/src/pages/cron/view.ts:805-810
    This selection always uses plural labels. A schedule-timestamp failure can create an auto-disabled job with consecutiveErrors: 1, producing “1 schedule errors”; add singular or count-neutral copy and cover that state. This was visible at the prior reviewed head and is a late finding.
    Confidence: 0.98
    Late finding: first raised on code an earlier review cycle already covered.

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 3289e08c3005.

Labels

Label justifications:

  • P2: The PR leaves a limited-scope but directly user-visible automation-failure summary inconsistent.
  • merge-risk: 🚨 other: Merging can show a permanent automation failure in one UI surface while the page-level Failing statistic omits it.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🌊 off-meta tidepool and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs ui/src/lib/cron/index.test.ts ui/src/lib/cron-status.test.ts ui/src/pages/cron/view-auto-disabled.test.ts.
  • [P1] node scripts/run-vitest.mjs packages/gateway-protocol/src/cron-validators.test.ts src/cron/service/ops.update.disable-and-list.test.ts src/cron/service/timer-trigger.test.ts.
  • [P1] pnpm tsgo:ui.

What I checked:

  • Scheduler state: The scheduler atomically marks an auto-disabled job disabled and records the durable auto-disable fact. (src/cron/service/auto-disable.ts:35, 3289e08c3005)
  • Summary exclusion: The Failing statistic requests only enabled jobs with an error status, while list filtering rejects disabled jobs before checking status. (ui/src/lib/cron/scope.ts:20, 3289e08c3005)
  • New UI predicate: The branch treats every auto-disabled job as an active failure, creating a disagreement with the unchanged enabled-only summary request. (ui/src/lib/cron-status.ts:24, c8b171337b00)
  • One-error schedule path: An invalid schedule timestamp can auto-disable with consecutiveErrors set to 1, so the new always-plural schedule-error string renders incorrectly. (src/cron/service/timer-trigger.ts:61, 3289e08c3005)
  • Re-review continuity: All six touched UI files are unchanged between the prior reviewed head and the current merge head, so the earlier count finding remains and the pluralization finding was equally visible before the merge-from-main refresh. (ui/src/pages/cron/view.ts:805, c8b171337b00)
  • Area history: Blame attributes the existing UI summary path and recent cron-status maintenance to Peter Steinberger; shallow history supports routing but not broader attribution. (ui/src/lib/cron/scope.ts:13, f9d9b9da2b9c)

Likely related people:

  • steipete: Current-main blame and recent commits connect Peter Steinberger to the summary query and cron-status behavior. (role: recent cron UI and scheduler contributor; confidence: medium; commits: f65a6f81de6d, f9d9b9da2b9c, b4fb2765d64e; files: ui/src/lib/cron/scope.ts, ui/src/lib/cron-status.ts, src/cron/service/auto-disable.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 (3 earlier review cycles)
  • reviewed 2026-08-14T17:34:32.998Z sha 43c8b78 :: found issues before merge. :: [P2] Keep the failing-count query aligned with auto-disabled failures
  • reviewed 2026-08-14T18:03:27.303Z sha 1d43ab5 :: found issues before merge. :: [P2] Align the Failing statistic with auto-disabled jobs
  • reviewed 2026-08-14T18:21:52.583Z sha b4fb276 :: found issues before merge. :: [P2] Align the Failing statistic with auto-disabled jobs

…paused

An auto-disabled job (10 consecutive run failures / 3 schedule errors)
rendered as plain 'Paused' and simultaneously vanished from the failed
chip, the failing count, and the error dot — the escalation removed
visibility exactly when the problem became permanent. The recorded fact
(state.autoDisabled, already public and used by CLI/doctor) now renders as
a distinct danger note with the reason and count, and auto-disabled jobs
stay in the active-failure predicate.
@steipete
steipete merged commit 1805e8e into main Aug 14, 2026
156 checks passed
@steipete
steipete deleted the codex/autoqa-cron-autodisabled branch August 14, 2026 19:39
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
…paused (openclaw#123769)

An auto-disabled job (10 consecutive run failures / 3 schedule errors)
rendered as plain 'Paused' and simultaneously vanished from the failed
chip, the failing count, and the error dot — the escalation removed
visibility exactly when the problem became permanent. The recorded fact
(state.autoDisabled, already public and used by CLI/doctor) now renders as
a distinct danger note with the reason and count, and auto-disabled jobs
stay in the active-failure predicate.
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 maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant