fix(cron): allow null model and fallbacks in cron update patch payload#100720
fix(cron): allow null model and fallbacks in cron update patch payload#100720sunlit-deng wants to merge 3 commits into
Conversation
b2c2ca1 to
e06976c
Compare
e06976c to
d12b6fa
Compare
|
Thanks for the context here. I did a careful shell check against current Current main already fixes the reported cron update null-clear path through the merged cron tool-schema change, while this branch targets broader config schemas and should not remain a landing candidate. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the narrow current-main cron tool-schema fix from #100801 and treat any nullable config fallback contract as a separate maintainer-approved proposal. Do we have a high-confidence way to reproduce the issue? Yes for the original shipped bug by source and issue evidence, but no current-main failure remains: Is this the best way to solve the issue? No. This branch changes broader Zod config schemas, while the best and already-merged fix is the narrow cron tool TypeBox patch payload schema change. Security review: Security review cleared: The diff only changes local Zod schemas and tests; it adds no dependencies, code execution paths, permissions, secrets handling, or supply-chain surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against a98a64649ec0; fix evidence: commit a98a64649ec0, main fix timestamp 2026-07-06T06:48:00-07:00. |
12139de to
271fb26
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
271fb26 to
28741d2
Compare
AgentModelSchema and AgentToolModelSchema used z.array(z.string()).optional() which accepts undefined but not null. Adding .nullable() lets null clears reach the Gateway service layer, which already deletes stored override keys on null input. Fixes openclaw#100707
28741d2 to
21ae196
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
ClawSweeper applied the proposed close for this PR.
|
What Problem This Solves
Fixes an issue where users would see
must be arraywhen clearing cron per-job overrides withcron update --patch '{"payload":{"fallbacks":null}}'.Fixes #100707
Why This Change Was Made
AgentModelSchemaandAgentToolModelSchemausedz.array(z.string()).optional()— optional but not nullable. Adding.nullable()lets null clears reach the Gateway service layer, which already deletes stored override keys on null input.User Impact
Users can clear per-job fallback overrides via
cron update --patchwithnullvalues to restore global agent defaults.Evidence
pnpm test -- --run -t "nullable fallback" src/config/zod-schema.models.test.ts: 6 passed, 0 failed, Duration 1.11sFocused tests cover null acceptance (both schemas), array acceptance, and negative control (non-array non-null rejected).
AI-assisted: built with Codex