| 846 | } |
| 847 | |
| 848 | func (rt *AgentTaskRuntime) findInaccessibleTaskIDs(taskIDs []string, scopeID string) []string { |
| 849 | rt.mu.Lock() |
| 850 | defer rt.mu.Unlock() |
| 851 | var inaccessible []string |
| 852 | for _, taskID := range taskIDs { |
| 853 | if _, ok := rt.records[taskID]; ok { |
| 854 | continue |
| 855 | } |
| 856 | if parent, ok := rt.taskParentScopes[taskID]; ok && parent != scopeID { |
| 857 | inaccessible = append(inaccessible, taskID) |
| 858 | continue |
| 859 | } |
| 860 | if parent, ok := rt.expiredTaskParentScopes[taskID]; ok && parent != scopeID { |
| 861 | inaccessible = append(inaccessible, taskID) |
| 862 | } |
| 863 | } |
| 864 | return inaccessible |
| 865 | } |
| 866 | |
| 867 | func (rt *AgentTaskRuntime) findExpiredTaskIDs(taskIDs []string, scopeID string) []string { |
| 868 | rt.mu.Lock() |