feat(cron): add compact list responses#93395
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 15, 2026, 2:35 PM ET / 18:35 UTC. Summary PR surface: Source +36, Tests +108, Docs +2. Total +146 across 8 files. Reproducibility: no. high-confidence live reproduction was established in this read-only review. Source inspection shows current main cannot accept Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the additive compact list path after maintainers accept the public API shape and the contributor adds real Gateway or agent-tool proof showing compact and default full responses. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was established in this read-only review. Source inspection shows current main cannot accept Is this the best way to solve the issue? Yes, pending maintainer API acceptance: the opt-in Gateway/tool parameter is the narrowest maintainable shape because it preserves default output and keeps the cron service list contract full-job based. The missing piece is real behavior proof from a live-style cron list call. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c40db057da33. Label changesLabel justifications:
Evidence reviewedPR surface: Source +36, Tests +108, Docs +2. Total +146 across 8 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
2784308 to
6d836f8
Compare
|
Land-ready canonical fix for #93366.
|
6d836f8 to
e2496a9
Compare
e2496a9 to
4965e7e
Compare
|
Merged via squash.
Thanks @yu-xin-c! |
Merged via squash. Prepared head SHA: 4965e7e Co-authored-by: yu-xin-c <175149126+yu-xin-c@users.noreply.github.com> Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> Reviewed-by: @vincentkoc
Merged via squash. Prepared head SHA: 4965e7e Co-authored-by: yu-xin-c <175149126+yu-xin-c@users.noreply.github.com> Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> Reviewed-by: @vincentkoc
Summary
Adds an opt-in compact response mode for cron list calls.
cron.listnow acceptscompact: trueand returns lightweight job summaries withid,name,enabled,nextRunAtMs,scheduleKind, andlastRunStatus.cron(action: "list")exposes and forwards the samecompactparameter from the agent tool.compactstill receive full job objects plus delivery previews.Fixes #93366.
Real behavior proof
Behavior addressed:
cron.list/cron(action: "list")can list many jobs with a lightweight summary payload when callers passcompact: true, avoiding full payload, delivery, session target, and schedule detail unless the caller asks for full list output.Real environment tested: local OpenClaw source checkout on macOS/Darwin with Node v25.9.0; gateway cron handler, protocol validators, and agent cron tool tests executed through the repository
scripts/run-vitest.mjsrunner. Core TypeScript was checked withscripts/run-tsgo.mjs.Exact steps or command run after this patch:
node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental false node scripts/run-vitest.mjs packages/gateway-protocol/src/cron-validators.test.ts src/cron/service.list-page-sort-guards.test.ts src/gateway/server-methods/cron.validation.test.ts src/agents/tools/cron-tool.test.ts src/agents/tools/cron-tool.schema.test.ts git diff --checkEvidence after fix: the gateway handler test exercises a full CronJob returned by the cron service and verifies the
compact: trueRPC response contains only the six compact fields and omits delivery previews. The agent tool test verifiescron(action: "list", compact: true)forwardscompact: truetocron.list. The protocol validator test verifiescompactis accepted byCronListParamsSchema.Observed result after fix: targeted Vitest run passed 5 shards: protocol validators, gateway cron validation, cron list paging guards, cron tool behavior, and cron tool schema.
tsgocompleted successfully fortsconfig.core.json.git diff --checkpassed.What was not tested: a live Gateway process with 30+ real cron jobs and WebSocket transport truncation; native CLI
openclaw cron listoutput because this PR adds an RPC/tool parameter, not a CLI flag.Verification
node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental falsenode scripts/run-vitest.mjs packages/gateway-protocol/src/cron-validators.test.ts src/cron/service.list-page-sort-guards.test.ts src/gateway/server-methods/cron.validation.test.ts src/agents/tools/cron-tool.test.ts src/agents/tools/cron-tool.schema.test.tsgit diff --checkRisk
Low compatibility risk. The new parameter is opt-in, and the non-compact path still returns the existing full page shape with
deliveryPreviews.