Handling heartbeat timeouts and state recovery in client asset workflows

I am currently architecting a workflow pipeline in Temporal to manage automated download orchestration and state synchronization for an external client launcher environment. While reviewing the distribution and client-handling approach outlined in this resource, I ran into challenges regarding how to gracefully handle prolonged network drops during long-running artifact pulls without desynchronizing the parent workflow state.

Right now, when an activity encounters a connection timeout, the child workflow continues waiting for a heartbeat signal that fails to materialize. I attempted adjusting the activity retry policies and setting up custom timers, but managing state rollback cleanly when a client disconnects unexpectedly has proven tricky. I would appreciate any advice or recommended design patterns from the community on how to best structure cancellation scopes and cleanup routines for these types of unreliable client interactions.

Hi, whats your Temporal SDK used?

Right now, when an activity encounters a connection timeout, the child workflow continues waiting for a heartbeat signal that fails to materialize.

Not sure what this means? If activity heartbeats from its code, it sends those heartbeats to server, not a workflow. Just trying to understand, as sounds like your activity not heartbeating - do you set heartbeat timeout? Can show your code a bit?

I ran into challenges regarding how to gracefully handle prolonged network drops during long-running artifact pulls without desynchronizing the parent workflow state.

What does desync mean in your context here?