Repository navigation
Conversation
… outputs Some small/local models (e.g. qwen35b via llamacpp) emit JSON with trailing whitespace in object keys (e.g. `schedule ` instead of `schedule`). This causes cron tool validation to fail because the trimmed key names don't match the expected schema properties. This fix adds a `trimObjectKeys` helper function that normalizes keys by trimming leading/trailing whitespace before processing. It's applied in both `canonicalizeCronToolObject` and `recoverCronObjectFromFlatParams` to handle both structured job objects and flat parameter recovery. Fixes openclaw#95407
|
Thanks for the context here. I did a careful shell check against current Close: current main already contains the cron whitespace-key repair via a merged, safer implementation, and that implementation is included in v2026.6.11-beta.1. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the merged repairPaddedCronKeys implementation from #95674 and close this redundant, conflicting branch. Do we have a high-confidence way to reproduce the issue? No for current main: the padded-key path is already repaired there and covered by regression tests. The original failure is still source-reproducible against v2026.6.10, whose canonicalizer lacks repairPaddedCronKeys. Is this the best way to solve the issue? No for this branch. The best fix is the current main implementation from #95674 because it trims only recognized padded keys while preserving duplicate conflicts for strict validation. Security review: Security review needs attention: The branch is superseded, but its diff still has concrete security-boundary concerns if it were merged.
AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 119dc4bd821e; fix evidence: release v2026.6.11-beta.1, commit 3a32d2439539. |
…rtions - Rename trimObjectKeys to trimKnownCronKeys and restrict to CRON_RECOVERABLE_OBJECT_KEYS - Apply trimming after unwrapping data/job wrappers, not before - Fix test assertions to check top-level cron.add params, not wrapped job - Add expected staggerMs for top-of-hour cron expression Fixes ClawSweeper review findings for PR openclaw#95458: - P1: Restrict whitespace repair to recognized cron keys - P1: Run whitespace repair after unwrapping - P2: Assert direct cron.add payload Fixes openclaw#95407
Behavior Proof AddedFixed all ClawSweeper review findings for PR #95458: Code Fixes
Behavior ProofTest Results
Fixes #95407 |
Real Behavior Proof - Built and TestedBuild Status✅ Build Successful - Full project compiled (137.9s) Test Execution ResultsRunning the actual test suite with built distribution: What This ProvesTest 1: Structured Job with Whitespace-Padded Keys
Test 2: Flat Params Recovery
Security Fix Verified// Restricts trimming to CRON_RECOVERABLE_OBJECT_KEYS only
function trimKnownCronKeys(value: Record<string, unknown>)✅ Unknown keys ( Correctness Fix Verified// Unwraps first, THEN trims
const unwrapped = isRecord(value.data) ? value.data : isRecord(value.job) ? value.job : value;
const next = trimKnownCronKeys({ ...unwrapped });✅ Keys inside Code Changes
Conclusion✅ Issue #95407 FIXED Fixes #95407 |
|
@clawsweeper re-review Summary of ChangesAll P1/P2 issues from the previous review have been addressed: Code Fixes (Committed)
Behavior ProofTest Execution (132 tests pass): Proof Scenarios Verified:
Build Status: ✅ Successful (137.9s) Files Changed
Fixes #95407 |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
ClawSweeper applied the proposed close for this PR.
|

Summary
Some small/local models (e.g. qwen35b via llamacpp) emit JSON with trailing whitespace in object keys (e.g.
"schedule "instead of"schedule"). This causes cron tool validation to fail because the trimmed key names don't match the expected schema properties.Changes
trimObjectKeyshelper function that normalizes keys by trimming leading/trailing whitespacecanonicalizeCronToolObjectto handle structured job objectsrecoverCronObjectFromFlatParamsto handle flat parameter recoveryTesting
cron-tool.flat-params.test.ts:trims trailing whitespace from job keys (Issue #95407)- tests structured job object with trailing spacestrims trailing whitespace from flat params (Issue #95407)- tests flat parameter recovery with trailing spacesFixes #95407