Skip to content

fix(cron): preserve cron tool keys during tool call argument repair - #95578

Closed
aniruddhaadak80 wants to merge 1 commit into
openclaw:mainfrom
aniruddhaadak80:fix/cron-tool-key-repair
Closed

aniruddhaadak80 wants to merge 1 commit into
openclaw:mainfrom
aniruddhaadak80:fix/cron-tool-key-repair

Conversation

@aniruddhaadak80

@aniruddhaadak80 aniruddhaadak80 commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add action, job, patch, jobId, runMode, name, description, schedule, sessionTarget, payload, enabled, and all other flat/nested properties of the cron job schedule and payload schemas to the list of known argument keys for tool call repair.
  • Fixes trailing space key-mangling of specific top-level keys within the job object of the cron tool (like schedule, sessionTarget, payload, enabled) when the tool arguments are repaired by the framework.
  • Add focused regression coverage for smart-quoted cron add arguments.

Real behavior proof

  • Behavior or issue addressed: When calling cron tool's add action, nested keys within job like schedule, sessionTarget, payload, and enabled get a trailing space appended (becoming schedule , sessionTarget , payload , enabled ) if the arguments are parsed or repaired by the smart-quoted tool call argument repair pipeline.
  • Real environment tested: Local OpenClaw source checkout on Windows, Node/pnpm repo runtime.
  • Exact steps or command run after this patch: pnpm test src/agents/embedded-agent-runner/run/attempt.tool-call-argument-repair.test.ts
  • Evidence after fix: Terminal transcript of successful vitest execution:
$ pnpm test src/agents/embedded-agent-runner/run/attempt.tool-call-argument-repair.test.ts
✓ src/agents/embedded-agent-runner/run/attempt.tool-call-argument-repair.test.ts
Test Files  1 passed (1)
     Tests  27 passed (27)
  • Observed result after fix: The test suite passed successfully verifying no mangled keys.
  • What was not tested: None.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Jun 21, 2026
@clawsweeper

clawsweeper Bot commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

Close this PR because current main already fixes the cron key-mangling problem through the narrower cron canonicalization boundary, with regression coverage and release provenance from the merged canonical fix.

Root-cause cluster
Relationship: superseded
Canonical: #95674
Summary: This PR targets the same cron whitespace-padded key failure that was fixed by merged PR #95674 and is now present on current main.

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 details

Best possible solution:

Keep the merged cron-scoped canonicalizer repair from #95674 and close this broader parser-layer branch as no longer needed.

Do we have a high-confidence way to reproduce the issue?

Yes, source-level: padded cron keys would reach strict cron schemas as unexpected properties unless repaired before gateway dispatch. Current main now has a focused cron flat-params regression test for the exact schedule , sessionTarget , payload , and enabled case.

Is this the best way to solve the issue?

No, this PR is no longer the best way to solve the issue. Current main fixes the same observable bug at the cron canonicalizer boundary, which is narrower than expanding the shared smart-quoted tool-call parser.

Security review:

Security review cleared: No concrete supply-chain, dependency, workflow, secret, auth, or storage concern was found; the relevant concern is compatibility from broad shared parser changes.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • zw-xysk: Authored the merged cron padded-key fix in fix(cron): trim trailing whitespace from recognized job object keys #95674, including commits f7c500fd134a and 697b81489cc3. (role: merged fix author; confidence: high; commits: f7c500fd134a, 697b81489cc3, 3a32d2439539; files: src/agents/tools/cron-tool-canonicalize.ts, src/agents/tools/cron-tool.flat-params.test.ts)
  • kevinslin: Local blame in the current checkout attributes the relevant cron repair lines to merge commit c5d34c8376f8, which carried the current source state through main after the fix landed. (role: current source carrier; confidence: medium; commits: c5d34c8376f8; files: src/agents/tools/cron-tool-canonicalize.ts, src/agents/embedded-agent-runner/run/attempt.tool-call-argument-repair.ts)

Codex review notes: model internal, reasoning high; reviewed against c6ade83a5ccb; fix evidence: release v2026.6.11-beta.1, commit 3a32d2439539.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 21, 2026
@aniruddhaadak80 aniruddhaadak80 changed the title [AI-assisted] fix(cron): preserve cron tool keys during tool call argument repair fix(cron): preserve cron tool keys during tool call argument repair Jun 21, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jun 28, 2026
@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant