Repository navigation
fix: harden cron and Workboard scheduling under load - #114564
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 27, 2026, 9:25 AM ET / 13:25 UTC. ClawSweeper reviewWhat this changesThe branch adds bounded cron-job pagination and payload-preserving cron edits, serializes Workboard dispatch across an owner’s boards while excluding archived or reclaimable work, prevents stale sidebar catalogs after reconnect, and changes two OpenGrep workflows to checksum-verify a pinned Linux binary. Merge readinessThis is an active, proof-backed bug-fix PR with no discrete correctness defect established from the provided final-head evidence. It should remain open for human review because it combines scheduler changes with a security-sensitive CI executable-installation change and carries protected Priority: P1 Review scores
Verification
How this fits togetherCron tools send scheduler requests through the gateway, while the bundled Workboard plugin selects and starts queued cards for agent owners and the Control UI renders their current state. This PR changes those scheduling decisions and the CI workflows that scan the repository before merge. flowchart LR
A[Cron tool or CLI] --> B[Gateway scheduler]
C[Workboard cards] --> D[Owner-wide dispatch decision]
D --> E[Agent worker start]
E --> F[Workboard store and UI]
G[Archived or expired state] --> D
H[OpenGrep CI workflow] --> I[Checksum-verified scanner]
I --> J[Merge security signal]
Decision needed
Why: The patch deliberately changes which upstream artifact CI executes. Automated tests can prove checksum enforcement but cannot choose the repository’s long-term upstream release-asset trust policy. Before merge
Agent review detailsSecurityNone. PR surfaceSource +118, Tests +1036, Config +6. Total +1160 across 29 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the checksum-verified OpenGrep installation and the owner-wide Workboard dispatch design, then land this exact reviewed head only after the responsible security/CI reviewer explicitly accepts the release-asset trust root and the merge gate remains green. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the linked report gives a concrete expired-claim, same-owner, cross-board path, and this PR adds boundary and contention regressions for it. The supplied final-head real-behavior workflow further reports the corresponding runtime scenario. Is this the best way to solve the issue? Yes for the scheduler defects: preserving existing cron payload kinds, using one owner-wide dispatch queue, and treating archived cards as inactive at automation and active-UI boundaries are narrower than adding new configuration or parallel scheduling paths. The only unresolved question is the separate CI trust-root policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3d03c415d19d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Maintainer closeout and final-head behavior evidence (
Thanks again to @FatosLocos for reporting #113252 and @shaoohh for identifying the focused cross-board reclaim rule in #113325. |
|
Merged via squash.
|
* fix: harden cron and Workboard scheduling under load * test: refresh cron pagination prompt snapshots * test: verify Workboard stress and generated cron snapshots * fix(workboard): reclaim expired cross-board worker capacity safely * fix(workboard): keep reclaim interval private to lifecycle owner * fix(ci): pin and verify reliable OpenGrep security scanner * test: guard checksum-verified OpenGrep installation
Closes #113252
Related: #113325
What Problem This Solves
Fixes issues where cron agents could not page past the first 200 jobs, editing job tools could silently change an existing command or script into a different job type, zero-duration failure alerts were rejected, and Workboard could run archived cards, show them as active, starve workers behind expired claims, start the same worker concurrently on multiple boards, or incorrectly fail a worker after it had already started. It also fixes stale board catalogs after a disconnect and makes dashboard browser coverage exercise the supported bottom-dock resize and persisted active tab.
Why This Change Was Made
Preserve canonical job payloads and bounded gateway pagination; apply one owner-wide dispatch queue per existing Workboard store; evaluate claims against the dispatch clock; persist a successful worker before treating optional worker logging as best effort; and filter archived cards only at the automation and active-UI boundaries. Existing SQLite schemas, public gateway protocol, archive/history, restore operations, permissions, and configuration remain unchanged. The required OpenGrep PR and full-scan workflows now verify the official pinned Linux binary SHA-256 instead of failing on the upstream installer's rate-limited unauthenticated releases API.
User Impact
Cron operators can inspect every scheduled job, safely edit permissions and timeouts without changing execution behavior, and use immediate failure alerts. Workboard operators get one live worker per owner even under 25 concurrent board dispatches; expired cross-board running claims release capacity only after the existing five-minute heartbeat grace; started work survives log/persistence failures; archived work remains safely preserved but inactive; and board/session views remain accurate across reconnects.
Thanks to @FatosLocos for reporting the expired-claim starvation in #113252 and @shaoohh for the focused related investigation in #113325.
Evidence
.agents/skills/autoreview/scripts/autoreview --mode uncommitted; TruffleHog clean; no accepted/actionable findings.tbx_01kyhp7fy1vpcmm7z2h33nvymb: focused cron agent/schema/CLI, Workboard store/dispatcher, and UI widget/session/sidebar regressions.OPENCLAW_UI_E2E_RECORD=1.pnpm prompt:snapshots:check; 530 focused cron/Workboard/UI regressions; exact CIdeadcode:dependenciesanddeadcode:exports; all 9 recorded real-Chromium Workboard/session-dashboard E2E scenarios; and Workboard owner-suite oxlint. Full hosted CI and changed-surface gate run on the same final commit.codex-rs/protocol/src/dynamic_tools.rs,codex-rs/core/src/tools/handlers/dynamic.rs,codex-rs/core/src/tools/spec_plan.rs, andcodex-rs/core/tests/suite/search_tool.rs.a62abee4271a2b3a1eedd5444ef8937bd6cfd880.Inspectable final-head proof
Exact reviewed head:
13c0c59124cbad11a01c01aa001ee11561d4b0c5.pnpm test test/scripts/ci-workflow-guards.test.ts test/scripts/run-opengrep.test.ts→ 2 files, 93 tests, all passing. The guard verifies the pinned release, exact upstream SHA-256, bounded retried download, temporary-file cleanup, and checksum verification before execution in both security workflows.opengrep_manylinux_x86withsha256:9ac4aebb47ba3f7b0d8fc641ac8749cb6c2f253f616131a67d9631e00d4bea33; both workflows require that exact digest before installing. Retain the fail-closed pinned official asset; do not restore the upstream installer's unreliable unauthenticated GitHub releases API.maincommits advanced.