Repository navigation
Conversation
gaoanze888
left a comment
There was a problem hiding this comment.
The heartbeat change itself addresses the same already-open issue as #109079 (Fix cron heartbeat starvation during long deliveries). #109079 predates this PR and changes the same heartbeat_fire_claim() path, preserving the fire fence except when this process proves it already owns it. Please coordinate/close one implementation so there is a single review thread and the earlier author's credit is preserved.
There is also substantial unrelated scope in commit 0f14a616: Electron/Vitest upgrades and an Express 4→5 major upgrade across root/desktop/TUI/web/WhatsApp lockfiles. That is not needed for the cron deadlock fix, makes the concurrency change much harder to review, and introduces independent runtime/packaging compatibility risk. Please split the dependency remediation into its own PR (or drop it here).
For the cron fix, I would also prefer retaining cross-process fire-fence semantics when no same-process holder is known (as #109079 does), rather than bypassing _under_fire_fence unconditionally. The owner CAS under _jobs_lock protects the current claim field, but the fire fence is documented as serializing owner mutations and external side effects across processes. A focused regression should cover both cases: same-process worker + heartbeat does not deadlock, while an unrelated process that does not hold the fire fence cannot use this helper to bypass that fence.
Duplicate of #109310 (merged 2026-09-12): |
Summary
Verification
scripts/run_tests.sh tests/cron/test_claim_job_for_fire.py(18 passed)Known baseline
main; reproduced before this branch.