MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / discardTerminalRecordLocked

Method discardTerminalRecordLocked

agent/task_runtime.go:907–931  ·  view source on GitHub ↗
(taskID string)

Source from the content-addressed store, hash-verified

905}
906
907func (rt *AgentTaskRuntime) discardTerminalRecordLocked(taskID string) bool {
908 record := rt.records[taskID]
909 if record == nil {
910 delete(rt.recordCleanupCancels, taskID)
911 rt.forgetTaskIdentityLocked(taskID)
912 return true
913 }
914 if _, terminal := terminalTaskStatuses[record.Status]; !terminal {
915 delete(rt.recordCleanupCancels, taskID)
916 return true
917 }
918 if rt.childCounts[taskID] > 0 {
919 return false
920 }
921 delete(rt.workers, taskID)
922 delete(rt.workerSpecs, taskID)
923 rt.cancelIdleTTLLocked(taskID)
924 rt.unregisterRecordLocked(taskID)
925 delete(rt.recordCleanupCancels, taskID)
926 rt.forgetTaskIdentityLocked(taskID)
927 if taskID != "main" {
928 delete(rt.scopes, taskID)
929 }
930 return true
931}
932
933func (rt *AgentTaskRuntime) cancelRecordCleanupLocked(taskID string) {
934 if cancel := rt.recordCleanupCancels[taskID]; cancel != nil {

Calls 3

cancelIdleTTLLockedMethod · 0.95

Tested by

no test coverage detected