You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: cancelled jobs can be recreated during worker drain handoff #4000
A draining worker can enqueue a new successor even when its original job has already been cancelled or completed. The handoff added in #3985 ignores the result of boss.complete and always calls boss.send.
At merged source c6fdc26fb4e97d15fcdbbfac63b308f37a6f1ac8, runner.ts:61–67 is byte-identical to reviewed head 5c17689489b1ce761f020216e511d00b89c1b955 (SHA256 bec8260d7c265bb8388f198b959c48e6d417732ce2666237fca1feca3e686b46). The pinned pg-boss completion SQL updates only active rows; cancellation or previous completion legitimately returns affected: 0. The handoff still sends and commits. If no same-key successor remains, retired work can be recreated.
Independent local controls import the real worker callback, with inert queue/transaction boundaries. Both zero-result cases still send on this source. Retained real-Postgres controls separately establish the SDK's cancellation/completed result shape. The completed-claim replay was explicit; no transport redelivery, stale active lease, or production incident was reproduced. Full source review and proof limits are retained.
Expected: send only after confirmed affected: 1; stand down on zero and abort on unconfirmed/malformed completion. Keep the corrected key, priority, delay and single-transaction ordering. Add cancelled-original and already-completed-original regressions. The same result-validation boundary should allow null send only under the supported short/stately coalescence contract, refusing unexplained null otherwise; those null probes are synthetic defensive controls, not a separate observed production root cause.
Real strict hosted CI passed 1,217 checks across206 lanes, including five happy-path drain checks, but does not exercise these completion-result controls. #3985 merged before the follow-up was resolved. TALE-389 / existing agent3 owns the correction; do not start a duplicate agent or broaden the wider #3977 capacity scope. This issue tracks the single remaining drain result-validation defect. All reproduction work stays local with synthetic/inert effects.
Activity