fix(cron): write delivered cron output into main session transcript#53501
fix(cron): write delivered cron output into main session transcript#53501sparkyrider wants to merge 4 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes a long-standing gap where isolated cron job deliveries were never written back into the main agent's session transcript, making the agent unable to recall what it had already sent. The fix adds a best-effort "awareness mirror" step: after a successful direct delivery, The implementation is clean and the refactor is well-scoped:
Key notes:
Confidence Score: 5/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/cron/isolated-agent/delivery-dispatch.ts
Line: 242-243
Comment:
**Idempotency key version bump may cause transient double-delivery on rolling deploy**
The key scheme was changed from `v1` (keyed on `runSessionId`) to `v2` (keyed on `jobId + runStartedAt`). Because `COMPLETED_DIRECT_CRON_DELIVERIES` is an in-memory module-level map, any v1 entries cached by old-binary instances will be invisible to new-binary instances after a zero-downtime rolling deploy. If a new instance picks up a retry or re-fire of a job that was already delivered by an old instance, it will not find the cache entry and will re-deliver.
The window is bounded by the time it takes to drain old instances, and the cache resets on restart anyway — so this is a minor operational concern rather than a persistent data hazard. Worth noting in a deployment runbook if rolling deploys are used for this service.
How can I resolve this? If you propose a fix, please make it concise.Reviews (2): Last reviewed commit: "cron: decouple delivery dedup cache from..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddbca77326
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
deb7a1c to
359cbbd
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 359cbbdf32
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
1738e3a to
626c66e
Compare
626c66e to
15b05f5
Compare
15b05f5 to
e66495a
Compare
Draft