Repository navigation
refactor(ios): keep cron snapshot pagination consistent - #139335
Conversation
Preserve sidebar and overview budgets, retries, snapshot validation, and terminal metadata through one model-owned collector. Replace predicate tests with fetch-driven behavior coverage. Refs #139322.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 3:59 PM ET / 19:59 UTC. ClawSweeper reviewWhat this changesThe iOS sidebar and agent overview share one scheduled-job pagination collector while retaining their existing limits, requests, retries, and result handling. Merge readiness✅ Ready for maintainer review Keep open: this requested consolidation remains useful on current main, preserves the existing pagination behavior, and introduces no actionable correctness finding. The prior review reported no findings requiring follow-up. Priority: P3 Review scores
Verification
How this fits togetherThe iOS app requests pages of scheduled jobs from the Gateway for its sidebar and agent overview. The collector checks page consistency and returns an ordered snapshot or failure for each screen to handle. flowchart TD
A[Sidebar refresh] --> C[Caller request and limits]
B[Agent overview refresh] --> C
C --> D[Gateway scheduled-job pages]
D --> E[Shared snapshot collector]
E --> F{Consistent and within bounds?}
F -->|Yes| G[Ordered jobs for screen]
F -->|No| H[Caller handles failure]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceOther +80. Total +80 across 4 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep cron snapshot validation on the existing list model, with request construction, retries and publication owned by the two screens. Do we have a high-confidence way to reproduce the issue? Not applicable: the linked request explicitly describes duplicated implementation rather than a runtime defect, and current main confirms both loops exist. Is this the best way to solve the issue? Yes: the existing list model is a narrow shared owner; the session-roster pager has different duplicate and partial-result semantics, while a generic framework would add unnecessary scope. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6b1314938d6d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
Preserve sidebar and overview budgets, retries, snapshot validation, and terminal metadata through one model-owned collector. Replace predicate tests with fetch-driven behavior coverage. Refs openclaw#139322.
Closes #139322
What Problem This Solves
The iOS sidebar and agent overview independently maintain the same cron snapshot pagination rules. Updating either copy can leave the two screens with different handling of concurrent changes, duplicate rows or incomplete results. This is maintainer-requested consolidation; no existing iOS pagination defect is claimed.
Why This Change Was Made
Both callers now use one collector on
CronJobsListLite. It validates the complete snapshot and preserves server order, while each caller retains its request construction, timeout, retry and publication ownership. The copied loops and free internal predicates are removed; one ID set also replaces separate per-page and accumulated duplicate checks.Production changes are +57/−101 (−44 lines). Tests are +156/−32 (+124 lines), replacing two predicate tests with six fetch-driven tests covering 31 scenarios. The legacy decoder and 11 unrelated test bodies are unchanged.
User Impact
Behavior remains unchanged: the sidebar permits five pages/1,000 jobs, and the overview permits 100 pages/20,000 jobs with three whole-snapshot attempts. Both retain 200-row requests and 12-second RPC timeouts. Changed snapshots and invalid or incomplete walks still return nil; existing early-terminal and empty-advancing-page behavior is preserved.
This changes no configuration, persisted data, schema, Gateway protocol or UI appearance.
Evidence
Committed head:
104ff35ab890602543179a88eadd661fb7a4ceeb, based onac53dc9687cae714e648791268573ad2e00278ea. The commit matches the verified four-file patch SHA-256:d9d022a9eea95a3da25b201f14d3c51f6cc34ed9ead46edad6c6af27f3469c2a. Local execution logs, exact source manifests and algorithm comparison artifacts are retained.Exact-head CI passed all nine selected jobs with no failures or reruns, including Release/test builds and iPhone, iPad and Apple Watch captures. Its actual tested merge is
67b3f985b6d0f62ca7814585b32897267b7005c1, combining mainde2c4b1768d9babd158c49d83aa91b67eff50dbcwith this head. The completed ClawSweeper review has no findings or before-merge actions.