Cron: fix manual isolated run deadlock#41532
Conversation
Greptile SummaryThis PR fixes a silent deadlock in manual cron job execution by routing Key changes:
Confidence Score: 4/5
Last reviewed commit: 35669a6 |
d1ba93a to
3da7835
Compare
|
For the duplicate message issue, this is likely related to how messages are broadcast. Check if broadcast and nodeSendToSession are both being called. |
This PR only changes cron manual dispatch laneing and does not touch the chat delivery paths that use broadcast / nodeSendToSession. The duplicate-message hypothesis appears unrelated to #41507. |
3da7835 to
d4b8a00
Compare
03c6f9f to
f273b57
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f273b5787e
ℹ️ 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".
f273b57 to
1baf480
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1baf480521
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bc02aef04
ℹ️ 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".
d7897e7 to
4edc393
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4edc393b2e
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd9ccd1194
ℹ️ 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".
af572f1 to
2ae6857
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4025ce618a
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3be236b71f
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb68156143
ℹ️ 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".
9a78fc5 to
d585251
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5852516e1
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9fd7e04f2b
ℹ️ 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".
9fd7e04 to
98b301a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6da2467687
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 039dc60f3b
ℹ️ 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".
039dc60 to
fd47ae1
Compare
|
Scope/status update for this PR (
Baseline evidence (same failures are already present on
So current red checks here are baseline/mainline test instability, not regressions introduced by this cron change set. Targeted PR-scope validation reruns (local) are green:
Plan from here: keep this PR scope-locked and rebase/re-run full CI once |
fd47ae1 to
0adb365
Compare
0adb365 to
139c796
Compare
Summary
Describe the problem and fix in 2-5 bullets:
Runbutton returnedok: true/enqueued: true, but isolated cron sessions were never spawned, so the job silently never executed.cron.rundispatch was enqueuing onto the same globalcronlane later re-entered by isolated cron agent turns, which created a self-deadlock.cron-dispatchlane for manual background dispatch while keeping actual cron job execution on the existingcronlane.src/cron/service.issue-regressions.test.tsto prove manual isolated runs no longer deadlock when the isolated executor re-enters thecronlane.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Users manually running cron jobs from the dashboard or the
cron.runAPI/tool path will now get a real isolated execution instead of a silent enqueue-without-execution no-op.Security Impact (required)
Yes, explain risk + mitigation: N/ARepro + Verification
Environment
sessionTarget: "isolated"andpayload.kind: "agentTurn"Steps
Runbutton orcron run --jobId <id> --runMode force.Expected
Actual
cronlane, so no isolated session spawned and no run history was recorded.Evidence
Attach at least one:
(Note: Added a regression test that simulates the isolated executor re-entering the
cronlane and confirms the manual run completes instead of stalling.)Human Verification (required)
What you personally verified (not just CI), and how:
pnpm exec vitest run --config vitest.config.ts src/cron/service.issue-regressions.test.tsandpnpm exec vitest run --config vitest.config.ts src/gateway/server.cron.test.tsafter the fix.cronlane without deadlocking.Runbutton or exercise a live cron job on a running gateway instance.Review Conversations
Compatibility / Migration
YesFailure Recovery (if this breaks)
Risks and Mitigations
cron-dispatchlane is explicitly initialized and reloaded withcfg.cron?.maxConcurrentRuns ?? 1, and regression coverage exercises the deadlock case directly.