Ensure cancelled jobs release active tasks, managed resources, and the host lock before the worker accepts new work.
Late cleanup_job messages are handled idempotently so cancellation races do not leave the worker unavailable or tear down a later job session.