openclaw - ✅(Solved) Fix tasks audit reports false-positive `inconsistent_timestamps` (startedAt < createdAt by 1ms) on succeeded cron tasks [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70203Fetched 2026-04-23 07:27:48
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

openclaw tasks audit --json reports warnings with code inconsistent_timestamps and detail startedAt is earlier than createdAt. Observed delta is typically 1ms, tasks are succeeded, and openclaw tasks maintenance --apply --json does not change anything.

Root Cause

openclaw tasks audit --json reports warnings with code inconsistent_timestamps and detail startedAt is earlier than createdAt. Observed delta is typically 1ms, tasks are succeeded, and openclaw tasks maintenance --apply --json does not change anything.

Fix Action

Fixed

PR fix notes

PR #70216: fix(tasks): tolerate tiny audit timestamp jitter

Description (problem / solution / changelog)

Fixes #70203

Summary

  • tolerate up to 10ms of timestamp jitter before flagging task audit inconsistencies
  • keep warning on larger startedAt/endedAt ordering errors
  • add focused audit coverage for tolerated jitter and real inversions

Changed files

  • src/tasks/task-registry.audit.test.ts (modified, +40/-0)
  • src/tasks/task-registry.audit.ts (modified, +10/-2)

Code Example

openclaw tasks audit --json
openclaw tasks maintenance --apply --json
openclaw tasks audit --json
RAW_BUFFERClick to expand / collapse

Summary

openclaw tasks audit --json reports warnings with code inconsistent_timestamps and detail startedAt is earlier than createdAt. Observed delta is typically 1ms, tasks are succeeded, and openclaw tasks maintenance --apply --json does not change anything.

Environment

  • OpenClaw: 2026.4.21 (f788c88)
  • Channel: stable
  • Install: pnpm
  • Host TZ: Europe/Paris

Reproduction

openclaw tasks audit --json
openclaw tasks maintenance --apply --json
openclaw tasks audit --json

Actual result

  • Warnings remain (example: 23 warnings, 0 errors)
  • All warnings are inconsistent_timestamps
  • Example: createdAt=1776304800007, startedAt=1776304800006 (delta=1ms), status=succeeded

Expected result

Either tolerate small jitter (e.g. <=5-10ms), or avoid warning for tiny deltas on succeeded tasks, or normalize timestamp write order.

Impact

Noise in audit output can hide real problems (lost, stale_running, etc.).

extent analysis

TL;DR

The issue can be mitigated by adjusting the tolerance for timestamp inconsistencies in the openclaw tasks audit command to ignore small deltas, such as those less than or equal to 5-10ms, especially for tasks with a succeeded status.

Guidance

  • Investigate the possibility of implementing a tolerance threshold for timestamp inconsistencies, allowing small deltas (e.g., <=5-10ms) to be ignored, particularly for tasks that have succeeded.
  • Consider modifying the openclaw tasks audit command to include an option for specifying this tolerance threshold, enabling users to adjust the sensitivity of the audit warnings based on their specific requirements.
  • Review the current behavior of openclaw tasks maintenance --apply to understand why it does not correct or mitigate the inconsistent_timestamps warnings, and assess whether an update or modification to this command could help resolve the issue.
  • Evaluate the impact of the host's timezone (Europe/Paris) on the timestamp inconsistencies, although the 1ms delta suggests this might not be the primary cause.

Example

No specific code snippet can be provided without further details on the internal workings of OpenClaw. However, the solution might involve introducing a configuration option or command-line flag to openclaw tasks audit that allows users to set a tolerance for timestamp discrepancies.

Notes

The provided information does not specify how OpenClaw handles timestamp storage or comparison internally. Thus, any solution would need to consider these internal mechanisms to effectively address the issue. Additionally, the fact that openclaw tasks maintenance --apply does not resolve the warnings suggests that the issue might be more related to how audits are performed rather than data inconsistency that can be corrected by maintenance tasks.

Recommendation

Apply a workaround by implementing a tolerance for small timestamp deltas in the audit warnings, as this seems to be the most direct approach to mitigating the noise in the audit output without waiting for a potential update to OpenClaw that might address this issue more fundamentally. This approach allows for a practical reduction in unnecessary warnings while preserving the audit's ability to highlight more significant inconsistencies.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix tasks audit reports false-positive `inconsistent_timestamps` (startedAt < createdAt by 1ms) on succeeded cron tasks [1 pull requests, 1 participants]