Repository navigation
fix(cron): preserve scheduled accounts and restart retry deadlines - #180677
Conversation
Keep the existing recurring backoff in persisted restart retry times without increasing the failure streak. Cover restart delivery, one-shot timing, cancellation, and repeated recovery.
Reuse cron model precedence for inference capture and migrate internal callers to a model-only selector input. Prove selected-account persistence and real embedded-runner requests after defaults change.
|
🦞👀 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. What this changesThis PR captures accounts using scheduled-model precedence and includes recurring restart backoff in saved retry deadlines. Example: The interactive model selects openai:platform, while subagents.model selects openai/gpt-4o@openai:subscription.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses two current cron defects with focused changes. No definite introduced bug was found, but current-head CI failures remain unattributed. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway cron admission captures model-account ownership into SQLite; scheduled execution consumes that binding, while the scheduler persists and enforces retry deadlines. flowchart TD
A[Gateway cron request] --> B[Scheduled model selector]
B --> C[Credential authorization owner]
C --> D[Cron SQLite store]
D --> E[Scheduler and restart recovery]
E --> F[Agent execution]
F --> G[Provider request]
Technical reviewBest possible solution: Retain the shared scheduled-model selector and existing scheduler backoff owner, then settle current-head CI attribution before landing. Do we have a high-confidence way to reproduce the issue? Current main uses interactive model selection during account capture and publishes a restart retry earlier than recurring admission permits; the added regressions target both paths, but no target code was executed during this read-only review. Is this the best way to solve the issue? The patch fixes both producer-side inconsistencies using existing owners, migrates selector callers together, and adds no parallel policy or persistent state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3cd9bddb36d9. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +19, Tests +106, Docs +6. Total +131 across 15 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 22, 2026, 10:20 AM ET / 14:20 UTC. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…penclaw#180677) * fix(cron): align restart retry deadlines with admission Keep the existing recurring backoff in persisted restart retry times without increasing the failure streak. Cover restart delivery, one-shot timing, cancellation, and repeated recovery. * fix(cron): capture scheduled model account selection Reuse cron model precedence for inference capture and migrate internal callers to a model-only selector input. Prove selected-account persistence and real embedded-runner requests after defaults change. * fix(cron): preserve scheduled inference and restart cadence * fix(tooling): preserve explicit donor probes in Git hooks * fix(cron): align target-session capture and fixture owners Co-authored-by: Vincent Koc <[email protected]>
…og owner Since #180677, cron.add captures its inference binding through the published model catalog owner. A booted Gateway publishes that owner at startup; the in-process mutation fixture has no Gateway lifecycle, so its first cron.add cold-built a read-only model runtime before reaching validation and hit the 10s in-process request timeout on hosted Node. Supply the published owner the Gateway would serve so the cases measure caller closure, not catalog warmup. (cherry picked from commit 5e495de)
…og owner (#191904) Since #180677, cron.add captures its inference binding through the published model catalog owner. A booted Gateway publishes that owner at startup; the in-process mutation fixture has no Gateway lifecycle, so its first cron.add cold-built a read-only model runtime before reaching validation and hit the 10s in-process request timeout on hosted Node. Supply the published owner the Gateway would serve so the cases measure caller closure, not catalog warmup.
…og owner (openclaw#191904) Since openclaw#180677, cron.add captures its inference binding through the published model catalog owner. A booted Gateway publishes that owner at startup; the in-process mutation fixture has no Gateway lifecycle, so its first cron.add cold-built a read-only model runtime before reaching validation and hit the 10s in-process request timeout on hosted Node. Supply the published owner the Gateway would serve so the cases measure caller closure, not catalog warmup.
What Problem This Solves
Cron inference capture could bind a scheduled job to the creator's interactive account even when scheduled execution selected a different configured model or account. Recurring jobs interrupted by a Gateway restart could also record a retry deadline earlier than their enforced error backoff, then shift an
everyschedule after the retry succeeded.User Impact
Scheduled jobs retain the account selected by their scheduled model policy, including Gmail hook and explicitly bound execution-session selection. Restarted recurring jobs expose the deadline the scheduler can actually honor and resume their authored interval afterward. One-shot retries, cancellation semantics, failure limits, and explicit model overrides remain unchanged. No new configuration or automatic repair of existing stored account bindings is introduced.
Why This Change Was Made
Inference capture now uses the scheduled-model owner, including model overrides from a persistent execution target; creator auth inheritance remains separate. Restart scheduling reuses the canonical failure backoff and interval-anchor calculation. A real failed retry normalizes malformed persisted failure counts before incrementing them; interrupted or cancelled attempts do not count as new failures.
The native tooling dependency resolver also keeps repository-local hook Git variables out of explicit donor metadata probes, without changing the commit environment or qualification guards. The prepared-runtime test fixture includes its required catalog and uses the canonical runtime directory resolver. Existing fixture setup lives in coherent sibling test-support modules to satisfy required line caps without removing assertions.
Evidence
38a58056ecef1f06cba2d5787d7a575bfbddb792has exactly the reviewed tree; required hooks, staged line-cap ratchet and whitespace checks passed.