@@ -104,9 +104,9 @@ func pollActivityExecutionWaitAnyStateChange(
104104 req * activitypb.PollActivityExecutionRequest ,
105105) (* activitypb.PollActivityExecutionResponse , []byte , error ) {
106106
107- // TODO(dan): it is not guaranteed that the response data will differ from that received on a
108- // previous call. However, this is confusing API behavior: we don't want the server to say
109- // "there's been a change" while returning data in which the change is not apparent.
107+ // TODO(dan): do we want to guarantee that response data will differ from that received when the
108+ // token was obtained? It's potentially confusing for the server to say "there's been a change"
109+ // while returning data in which the change is not apparent.
110110
111111 refBytesFromToken := req .GetFrontendRequest ().
112112 GetWaitPolicy ().(* workflowservice.PollActivityExecutionRequest_WaitAnyStateChange ).
@@ -161,17 +161,14 @@ func pollActivityExecutionWaitAnyStateChange(
161161 // The runID from the token doesn't match this shard's state. We return immediately,
162162 // on the basis that this constitutes a state change. If the runID from the token is
163163 // ahead of this shard's state then this will be detected by shard ownership or
164- // staleness checks and the caller will receive an error. Therefore we can assume
165- // that the runID from the token is behind the shard state and that it's appropriate
166- // to report a state change to the caller.
164+ // staleness checks and the caller will receive an error.
167165 response , err := a .buildPollActivityExecutionResponse (ctx , req )
168166 if err != nil {
169167 return nil , true , err
170168 }
171169 return response , true , nil
172170 }
173171
174- // TODO(dan): is this leaking too much detail about VTs?
175172 refComparison , err := chasm .CompareComponentRefs (& lastSeenRef , & currentRef )
176173 if err != nil {
177174 return nil , false , err
@@ -204,7 +201,7 @@ func pollActivityExecutionWaitCompletion(
204201 ctx context.Context ,
205202 req * activitypb.PollActivityExecutionRequest ,
206203) (* activitypb.PollActivityExecutionResponse , []byte , error ) {
207- // TODO(dan): untested
204+ // TODO(dan): implement functional test when RecordActivityTaskCompleted is implemented
208205 return chasm .PollComponent (
209206 ctx ,
210207 chasm.NewComponentRef [* Activity ](chasm.EntityKey {
0 commit comments