Skip to content

refactor(ios): keep cron snapshot pagination consistent - #139335

Merged
steipete merged 1 commit into
mainfrom
codex/deslop-ios-cron-pagination
Sep 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/deslop-ios-cron-pagination

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Existing app-hosted baseline: 85 tests passed, with zero failures or skips, using a fresh owned iOS simulator and verified signed host/test bundles.
  • Final candidate simulator run: 89 tests passed, zero failures or skips (18 automation-model tests and 71 sidebar/presentation tests). The fresh iOS simulator used verified signed app/test bundles and was deleted after execution.
  • Source-extracted Swift comparison: 161,017 deterministic page sequences at both original caller budgets yielded 322,034 matching old/new comparisons, plus 16 independent expected-result checks. It compares results and requested offsets; this is algorithm evidence, not app or network execution.
  • All 13 classified apps checks passed, including Swift lint and the native schema guard. Independent peer review and all three managed Codex review partitions found no accepted P0–P2 findings.

Committed head: 104ff35ab890602543179a88eadd661fb7a4ceeb, based on ac53dc9687cae714e648791268573ad2e00278ea. 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 main de2c4b1768d9babd158c49d83aa91b67eff50dbc with this head. The completed ClawSweeper review has no findings or before-merge actions.

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.
@clawsweeper

clawsweeper Bot commented Sep 5, 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: ios App: ios size: M maintainer Maintainer-authored PR labels Sep 5, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 3:59 PM ET / 19:59 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 104ff35ab890602543179a88eadd661fb7a4ceeb

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving consolidation with useful collector coverage and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER classification exempts this internal refactor from the external-contributor proof gate. Reported simulator tests and algorithm comparisons support collector equivalence but do not establish a live Gateway run; no new authority boundary requires separate proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER classification exempts this internal refactor from the external-contributor proof gate. Reported simulator tests and algorithm comparisons support collector equivalence but do not establish a live Gateway run; no new authority boundary requires separate proof.
Evidence reviewed 8 items Introduced patch and source identity: The complete host-pinned merge-base-to-head patch changes only the collector, its two callers, and behavior tests. The verified test merge has the pinned base and PR head as parents and reports the same four changed paths.
Current main still has both loops: The three production files on fetched main are identical to the PR merge-base versions. Direct inspection confirms separate overview and sidebar pagination loops remain; this consolidation is not already implemented there.
Caller behavior is preserved: The overview retains three whole-snapshot attempts, 100 pages, 20,000 jobs, 200-row requests and a 12-second timeout. The sidebar retains five pages, 1,000 jobs and its existing publication guard. Early terminal pages still return jobs with an unknown total when the count does not match.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Other +80. Total +80 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 4 213 133 +80
Total 4 213 133 +80

Review metrics

Metric Value Why it matters
Production versus test footprint Production −44 lines; tests +124 lines The consolidation removes duplicate production policy while replacing predicate checks with collector-level behavior coverage.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #139322
Summary: This PR implements the explicitly linked consolidation request; the issue should remain open until the implementation lands.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This is requested internal cleanup with preserved behavior and no reported user-facing incident.
  • 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: The supplied MEMBER classification exempts this internal refactor from the external-contributor proof gate. Reported simulator tests and algorithm comparisons support collector equivalence but do not establish a live Gateway run; no new authority boundary requires separate proof.

Evidence

What I checked:

  • Introduced patch and source identity: The complete host-pinned merge-base-to-head patch changes only the collector, its two callers, and behavior tests. The verified test merge has the pinned base and PR head as parents and reports the same four changed paths. (apps/ios/Sources/Design/AgentProModels.swift:363, 104ff35ab890)
  • Current main still has both loops: The three production files on fetched main are identical to the PR merge-base versions. Direct inspection confirms separate overview and sidebar pagination loops remain; this consolidation is not already implemented there. (apps/ios/Sources/Design/AgentProTab+GatewayData.swift:209, 6b1314938d6d)
  • Caller behavior is preserved: The overview retains three whole-snapshot attempts, 100 pages, 20,000 jobs, 200-row requests and a 12-second timeout. The sidebar retains five pages, 1,000 jobs and its existing publication guard. Early terminal pages still return jobs with an unknown total when the count does not match. (apps/ios/Sources/Design/AgentProTab+GatewayData.swift:200, 104ff35ab890)
  • Behavior-level test coverage: The replacement tests exercise the production collector with fetched pages, checking order, normalized identity, duplicate rejection, count contradictions, unavailable pages, offsets, caller budgets and terminal metadata. The injection closure is needed by both production callers rather than being a test-only seam. (apps/ios/Tests/AgentAutomationModelsTests.swift:114, 104ff35ab890)
  • Gateway contract and alternative collector: The Gateway cron service locks each list page and emits a snapshot revision, total and explicit next offset. The existing session-roster collector instead reconciles duplicate keys and can retain partial results, so reusing it would change the cron contract. (src/cron/service/ops-read.ts:323, 104ff35ab890)
  • Requested cleanup and supplied validation: The supplied body links the open, same-author request [Refactor]: centralize iOS cron snapshot pagination #139322 and explicitly claims no runtime defect. It reports 89 passing simulator-hosted tests and 322,034 matching algorithm comparisons, distinguishing those comparisons from network execution. These are contributor-reported results, not reviewer-executed validation. The prior review covered this same head and retained no findings. (104ff35ab890)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: 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 (1 earlier review cycle)
  • reviewed 2026-09-05T19:54:57.846Z sha 104ff35 :: needs maintainer review before merge. :: none

@steipete
steipete merged commit 967bd8a into main Sep 5, 2026
74 checks passed
@steipete
steipete deleted the codex/deslop-ios-cron-pagination branch September 5, 2026 20:51
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios 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.

[Refactor]: centralize iOS cron snapshot pagination

1 participant