MCPcopy
hub / github.com/coder/mux / isWorkflowRunDescendant

Method isWorkflowRunDescendant

src/node/services/taskService.ts:6310–6324  ·  view source on GitHub ↗
(
    index: AgentTaskIndex,
    taskId: string,
    workflowRunId: string
  )

Source from the content-addressed store, hash-verified

6308 }
6309
6310 private isWorkflowRunDescendant(
6311 index: AgentTaskIndex,
6312 taskId: string,
6313 workflowRunId: string
6314 ): boolean {
6315 let current: string | undefined = taskId;
6316 for (let i = 0; current != null && i < 32; i++) {
6317 const entry = index.byId.get(current);
6318 if (entry?.workflowTask?.runId === workflowRunId) {
6319 return true;
6320 }
6321 current = index.parentById.get(current);
6322 }
6323 return false;
6324 }
6325
6326 private listCompletedDescendantAgentTaskIds(
6327 index: AgentTaskIndex,

Callers 1

Calls 1

getMethod · 0.65

Tested by

no test coverage detected