other

JAM-32: workspace auto-commit cron routing fix

2026-04-09

JAM-32: workspace auto-commit cron routing fix

Date: 2026-04-08 21:45 PDT Owner: David Status: ready for review

Findings summary

Root cause

1. Duplicate cron jobs were running the same backup script

Live jobs before fix:

This meant the same script was being executed twice every 30 minutes.

2. Success spam was caused by the isolated agent cron, not the silent system-event cron

The david cron used an agent turn with a Discord channel target. Even though its delivery config was marked silent, the agent still produced a normal reply into the bound channel. That is why openclaw-infra was getting routine messages like:

The main systemEvent job did not do that. Its state already showed lastDeliveryStatus: not-requested.

3. The half-hour auth failure was in model auth, not in the backup script

Evidence:

So the half-hour failure was coming from the agent/model auth layer for the isolated agent cron path. It was not caused by Git, the shell script, or Discord channel routing.

The same noisy job later drifted into a different failure mode, rate_limit, which further supports that the broken component was the agent/model execution path itself.

4. Auto-commit noise was real, and mostly low-value runtime churn

Recent .openclaw git history showed repeated auto commits of:

Examples from recent commit subjects:

So even with routing fixed, the backup path still needed a narrow exclude pass for runtime noise.

Fix shipped

A. Disabled the noisy duplicate job

Disabled:

This removes the agent/model path that was responsible for both:

B. Kept the deterministic system-event cron and made it explicit auto mode

Retained:

Changed payload to:

bash
bash /Users/vinny/.openclaw/workspace/scripts/workspace-commit.sh --auto

C. Added failure-only alerting to openclaw-infra

Added failureAlert to the surviving system-event job:

Result:

D. Tightened auto-commit exclusions in workspace-commit.sh

Added --auto mode to /Users/vinny/.openclaw/workspace/scripts/workspace-commit.sh.

In --auto mode, it now unstages runtime noise before commit:

Manual runs without --auto keep previous behavior.

E. Auto mode now fails hard on push failure

In --auto mode only, a failed git push now exits non-zero.

That matters because it lets the cron's failureAlert surface a real backup failure instead of silently accepting a local-only commit.

Manual runs still keep the prior best-effort push behavior.

Validation

Live cron validation

openclaw cron status after fix:

openclaw cron list after fix:

Direct job state after fix:

Script validation

Validated workspace-commit.sh with temporary local git repos using OPENCLAW_REPO_ROOT override.

Test 1, excluded-only changes

Changed only:

Result:

Test 2, real tracked change plus excluded noise

Changed:

Result:

Test 3, push failure in auto mode

Simulated a repo with no valid upstream push target.

Result:

This confirms the cron will now emit a real failure signal on backup delivery failure.

Deferred work

Low risk, not required for JAM-32 completion:

  1. Consider deleting the disabled duplicate cron job after a day or two of clean runs. I left it disabled, not deleted, to keep history and make rollback easy.
  2. If Pete wants a dedicated low-signal cron-status channel instead of openclaw-infra, that is a product/ops decision, not required for this fix.
  3. Existing noisy commits already in git history are left untouched. This fix stops new ones from the cron path.

Files changed

Ready for review

Yes.

Artifact URL

Not derivable from current local config. Local path:

/Users/vinny/.openclaw/workspace/artifacts/jam-32-auto-commit-cron-routing-fix-2026-04-08.md