Skip to content

fix(macos): show the full automation count - #139692

Merged
steipete merged 9 commits into
mainfrom
codex/fix-macos-cron-summary
Sep 6, 2026
Merged

steipete merged 9 commits into
mainfrom
codex/fix-macos-cron-summary

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where the Mac Automations menu shows an incomplete enabled-job count when the catalog spans a list page. With 201 enabled jobs, the rendered menu reported 200. Disabled jobs could also consume the fetched page before the menu filtered it.

Why This Change Was Made

The menu now consumes the Gateway's filtered total and requests its eight enabled preview rows in next-run order. The total and rows belong to one Gateway-owned snapshot, so refreshes and route retirement update them together. This removes local filtering and sorting and retains the existing bounded preview and malformed-row tolerance.

The four existing request fields and filtered-total response are supported by the inspected stable Gateway contract. No new API, configuration, protocol version, or persistent store is introduced. Production LOC is unchanged; the Mac menu documentation describes the resulting count and preview.

User Impact

The menu reports the full enabled-job count while showing up to eight upcoming jobs. Cached summaries continue to belong to the selected Primary Gateway.

Evidence

The before-fix CI run 34022613591, head 7f4cf80e1caccfa297c9d786b498dbf239f57701, reproduced the actual rendered row “Automations, 200” against the expected “Automations, 201”. Its exact synthetic response decoded successfully: 200 returned rows, total 201, current connection and Gateway lease, and eight visible previews. The full owned-row image and diagnostic artifact are retained for the before/after comparison.

Earlier attempts did not reproduce the count defect. They exposed fixture/inspection problems, including an untyped string-fragment map selecting GRDB's SQL interpolation overload; the fixture now explicitly produces strings. Those failures are preserved and excluded from the successful baseline claim.

The candidate updates existing row-loss and Gateway-retirement coverage and checks that a count-only refresh notifies observers while its eight preview IDs remain unchanged. Candidate native build and runtime results passed in CI 34026309350. The exact response has total 201 and eight enabled rows; strict/lossy decoding, the store and preview all contain eight. The actual rendered accessibility value is “Automations, 201”. All targeted count, refresh, decoding and route-lifecycle cases passed. Temporary capture, response export, tracing, and CI upload support are now removed. The permanent regression uses the shared accessibility helper and reads the rendered static-text value. All native runtime execution uses disposable CI and synthetic data.

Candidate 0134f20a87ed719e1ac3347b019bf15ed25e9101 passed scoped Swift formatting/lint/parsing, docs checks, all 13 selected check stages and 1,121 Node fixture executions. Independent source and managed P2 reviews found no actionable issue. Full candidate Swift compilation and the after image have now passed disposable CI; temporary proof cleanup is complete, and final cleaned-head native validation remains before landing.

The images below are the original synthetic owned-row captures from the failing baseline (200) and repaired candidate (201). Both complete captures were inspected before upload.

Before: 201 enabled jobs incorrectly show 200

After: the full count correctly shows 201 with eight previews
The cleaned final head f7d9ed63f027d07a42189fdbe1d6ef747a9f988c has a fully reviewed 11-file PR diff: production LOC unchanged, tests/support +120 and docs +2. All 13 final check stages and 1,121 Node tooling tests passed. All four production files remain identical to the successful instrumented candidate. The original comparison images are retained above; fresh CI has now passed the permanent test without temporary capture machinery.

The cleaned head passed CI 34029038216: 11 successful jobs and 23 skips. Actual checkout a976c712a2ebcfdb312d9a0cdbfbc3a3e326b6e1 includes the exact final test and fixtures. The permanent rendered-count/eight-preview test passed, as did all 14 targeted functions / 28 cases and the shared-helper settings smoke test.

Review follow-up: the latest review's sole open item was inability to retrieve linked images/artifacts. I inspected both complete original synthetic captures before uploading them, then read the exact final native checkout and test receipts. The final Mac log is SHA-256 5ec1b249022912c1a7b3a809928dbe17769dd0f06626701f5046daeebde857a1; its permanent Automations test passes at line 11696. The earlier 201 image remains attributed to instrumented candidate 0134f20a, while this final run independently proves the cleaned test. This resolves the evidence-inspection gap; the review identified no code or security finding, and all temporary capture/export support is removed.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: S maintainer Maintainer-authored PR labels Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 03:45
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 7:38 AM ET / 11:38 UTC.

ClawSweeper review

What this changes

The macOS Automations menu displays the Gateway’s full enabled-job count alongside up to eight upcoming jobs, with updated regression coverage and documentation.

Merge readiness

✅ Ready for maintainer review

The fix remains necessary on current main. No actionable correctness or security findings remain; the temporary capture concern is resolved, and the earlier reviewer-side media retrieval limitation does not warrant another contributor request.

Priority: P2
Reviewed head: f7d9ed63f027d07a42189fdbe1d6ef747a9f988c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with relevant native rendering evidence, preserved lifecycle checks, and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The captured evidence reports the production native Automations row rendering 200 before and 201 after, with eight previews in disposable macOS CI; final cleaned-head test receipts supplement the original captures. Linked media could not be independently retrieved here, but production code matches the demonstrated candidate and the reviewer limitation does not create a contributor proof blocker.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The captured evidence reports the production native Automations row rendering 200 before and 201 after, with eight previews in disposable macOS CI; final cleaned-head test receipts supplement the original captures. Linked media could not be independently retrieved here, but production code matches the demonstrated candidate and the reviewer limitation does not create a contributor proof blocker.
Evidence reviewed 7 items Current main still counts the returned page: At the fetched main revision, GatewayConnection+Cron decodes only jobs, and configureAutomations displays jobs.count after local filtering. The server caps a page at 200, so the central defect remains.
Existing Gateway pagination contract: Inspected current main and v2026.9.2 listPage implementation: filtering and sorting precede total calculation and slicing, and the response carries both total and jobs. Current protocol schema accepts includeDisabled, limit, sortBy, and sortDir. The stable service implementation was readable; stable handler/schema blobs were unavailable locally.
Count and preview retain one lifecycle owner: The introduced code requests eight enabled jobs, decodes the independent total, and stores both under the existing Gateway lease and request-generation checks. Route retirement and canceled requests retain their existing rejection boundaries.
Findings None None.
Security None None.

How this fits together

The macOS menu requests scheduled-job data from the selected Primary Gateway. Its refresh store keeps the count and preview together and supplies them to the native menu renderer.

flowchart LR
  A[Primary Gateway] --> B[Filter enabled jobs]
  B --> C[Full total and eight upcoming jobs]
  C --> D[Validate current Gateway ownership]
  D --> E[Cached menu summary]
  E --> F[Automations count and preview]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Docs +2, Other +120. Total +122 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 10 227 107 +120
Total 11 230 108 +122

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net 0 lines; tests/support +120 lines The repair reuses existing production owners while adding rendered-count and observation coverage.

Technical review

Best possible solution:

Use the Gateway’s authoritative filtered total and bounded preview within the existing menu refresh lifecycle.

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

Yes: current main counts a page capped at 200, so 201 enabled jobs undercount; disabled rows can also displace enabled previews. This review established the mechanism from source without executing tests.

Is this the best way to solve the issue?

Yes: consuming the existing filtered total fixes the owning boundary without fetching every page or introducing another API, setting, or persistent store.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7cfda7a5a246.

Labels

Label justifications:

  • P2: Incorrect menu counts affect large automation catalogs without disrupting job execution.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The captured evidence reports the production native Automations row rendering 200 before and 201 after, with eight previews in disposable macOS CI; final cleaned-head test receipts supplement the original captures. Linked media could not be independently retrieved here, but production code matches the demonstrated candidate and the reviewer limitation does not create a contributor proof blocker.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured evidence reports the production native Automations row rendering 200 before and 201 after, with eight previews in disposable macOS CI; final cleaned-head test receipts supplement the original captures. Linked media could not be independently retrieved here, but production code matches the demonstrated candidate and the reviewer limitation does not create a contributor proof blocker.

Evidence

What I checked:

  • Current main still counts the returned page: At the fetched main revision, GatewayConnection+Cron decodes only jobs, and configureAutomations displays jobs.count after local filtering. The server caps a page at 200, so the central defect remains. (apps/macos/Sources/OpenClaw/StatusMenuSummaries.swift:147, 7cfda7a5a246)
  • Existing Gateway pagination contract: Inspected current main and v2026.9.2 listPage implementation: filtering and sorting precede total calculation and slicing, and the response carries both total and jobs. Current protocol schema accepts includeDisabled, limit, sortBy, and sortDir. The stable service implementation was readable; stable handler/schema blobs were unavailable locally. (src/cron/service/ops-read.ts:323, 3928bad9badf)
  • Count and preview retain one lifecycle owner: The introduced code requests eight enabled jobs, decodes the independent total, and stores both under the existing Gateway lease and request-generation checks. Route retirement and canceled requests retain their existing rejection boundaries. (apps/macos/Sources/OpenClaw/CronJobsStore.swift:85, f7d9ed63f027)
  • Rendered regression and observation coverage: The permanent native test hosts the production Automations row, reads its accessibility text, expects a count of 201, and checks eight previews. Separate coverage checks count-only observation updates, malformed rows, cancellation, and Gateway replacement. The extracted accessibility helper preserves the existing settings smoke behavior. (apps/macos/Tests/OpenClawIPCTests/StatusMenuSummariesTests.swift:12, f7d9ed63f027)
  • Captured native proof and follow-up: The supplied PR snapshot, sourceRevision a01d3e752d51125ac1ba6df47084db80d5ae12c3035c9f8bc8bc2a3ed1d75302, reports actual rendered native output changing from 200 to 201 with synthetic Gateway responses in disposable macOS CI. It links original before/after captures and final CI https://github.com/openclaw/openclaw/actions/runs/34029038216, identifying the final log SHA-256 and passing permanent test. GitHub DNS and browser retrieval failed here, so media and log contents were not independently viewed. The reported CI checkout is a test merge, not the original PR head or validation of the currently pinned base. (f7d9ed63f027)
  • Production code matches the demonstrated candidate: The production-source comparison is empty between the instrumented candidate and cleaned head. The final introduced diff contains no temporary capture/export or workflow upload machinery, resolving the historical capture finding. (apps/macos/Sources/OpenClaw/GatewayConnection+Cron.swift:42, f7d9ed63f027)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-06T06:48:20.450Z sha 2ea55aa :: blocked before merge. :: [P2] Make the temporary proof capture safe to rerun
  • reviewed 2026-09-06T07:19:39.054Z sha 2ea55aa :: blocked before merge. :: [P2] Make the temporary proof capture safe to rerun
  • reviewed 2026-09-06T07:29:08.993Z sha 686d349 :: blocked before merge. :: [P2] Make the temporary proof capture safe to rerun
  • reviewed 2026-09-06T08:12:24.105Z sha 7a65983 :: blocked before merge. :: [P2] Make the temporary proof capture safe to rerun
  • reviewed 2026-09-06T08:49:59.726Z sha 7f4cf80 :: blocked before merge. :: [P2] Make the temporary proof capture safe to rerun
  • reviewed 2026-09-06T10:08:03.873Z sha 0134f20 :: blocked before merge. :: [P2] Make the temporary proof capture safe to rerun
  • reviewed 2026-09-06T10:38:00.830Z sha 0134f20 :: blocked before merge. :: [P2] Make the temporary proof capture safe to rerun
  • reviewed 2026-09-06T11:09:38.886Z sha f7d9ed6 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 6, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 6, 2026
Keep the server-filtered total and eight next-run previews in one Gateway-owned snapshot. Remove duplicate local filtering and sorting; retain cancellation, observation and route retirement.
@steipete steipete changed the title fix(macos): show the full automation count in the menu fix(macos): show the full automation count Sep 6, 2026
Keep the rendered count regression on the shared accessibility helper after verified before/after CI. Remove temporary captures, wire diagnostics and artifact upload machinery.
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Sep 6, 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. proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 6, 2026
@steipete
steipete merged commit 9b043a1 into main Sep 6, 2026
83 checks passed
@steipete
steipete deleted the codex/fix-macos-cron-summary branch September 6, 2026 11:54
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc pushed a commit to gaoanze888/openclaw that referenced this pull request Sep 6, 2026
* commit '3ed964c8ca6206d26ecc0b6567ccd1389d9948fc': (36 commits)
  refactor(plugins): unify install config snapshot preparation (openclaw#140081)
  fix: cloud provisioning stays failed after temporary storage recovers (openclaw#140021)
  fix(ci): preflight job outputs exceed 1 MiB on full-plan pull requests (openclaw#140018)
  refactor: consolidate command and provider helpers (openclaw#140072)
  fix(doctor): replace unavailable TUI cleanup advice (openclaw#140074)
  fix(plugins): avoid scoped pack failures and missing runtime entries (openclaw#140016)
  fix: clarify background command timeouts (openclaw#140022)
  fix(workboard): refresh board navigation while retaining drafts (openclaw#139952)
  fix: preserve newer chat drafts when rewind completes (openclaw#140066)
  feat(transcripts): browse and export saved meeting archives (openclaw#139875)
  fix(cron): complete timeout test observation phase (openclaw#140076)
  fix(macos): show the full automation count (openclaw#139692)
  fix: native worker turns fail to load WebSocket transport (openclaw#140071)
  fix(cli): complete quoted Bash option values (openclaw#140034)
  fix(chat): show command instructions while pending (openclaw#140041)
  refactor(cli): use canonical resume result schema (openclaw#140056)
  fix: restore package acceptance across install runtimes (openclaw#140062)
  refactor(auto-reply): keep model-selection fixtures in tests (openclaw#140069)
  fix(plugins): remove owned aliases before uninstalling files (openclaw#140065)
  fix: completed replies hang when context-engine cleanup stalls (openclaw#140023)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
* test(macos): capture paginated automation count regression

* test(macos): observe hosted automation row accessibility

* test(macos): verify cron fixture before count proof

* test(macos): type the captured accessibility value

* test(macos): diagnose automation response decoding

* test(macos): retain the synthetic automation response

* test(macos): keep automation fixture fragments as JSON text

* fix(macos): show the full automation count

Keep the server-filtered total and eight next-run previews in one Gateway-owned snapshot. Remove duplicate local filtering and sorting; retain cancellation, observation and route retirement.

* test(macos): remove temporary automation count capture

Keep the rendered count regression on the shared accessibility helper after verified before/after CI. Remove temporary captures, wire diagnostics and artifact upload machinery.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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