MCPcopy Create free account
hub / github.com/compozy/agh / cloneTaskRun

Function cloneTaskRun

internal/task/manager_test.go:9783–9799  ·  view source on GitHub ↗
(record Run)

Source from the content-addressed store, hash-verified

9781}
9782
9783func cloneTaskRun(record Run) Run {
9784 cloned := record
9785 if record.ClaimedBy != nil {
9786 claimedBy := *record.ClaimedBy
9787 cloned.ClaimedBy = &claimedBy
9788 }
9789 cloned.Metadata = cloneRawJSON(record.Metadata)
9790 cloned.Result = cloneRawJSON(record.Result)
9791 if record.Review != nil {
9792 review := *record.Review
9793 review.MissingWork = cloneRawJSON(record.Review.MissingWork)
9794 cloned.Review = &review
9795 }
9796 cloned.RequiredCapabilities = append([]string(nil), record.RequiredCapabilities...)
9797 cloned.PreferredCapabilities = append([]string(nil), record.PreferredCapabilities...)
9798 return cloned
9799}
9800
9801func inMemoryTaskLatestActivity(summary *Summary, runs map[string]Run, events []Event) time.Time {
9802 taskRuns := make([]Run, 0)

Callers 15

RecordRunReviewMethod · 0.85
runsForTaskMethod · 0.85
snapshotMethod · 0.85
CreateTaskRunMethod · 0.85
UpdateTaskRunMethod · 0.85
GetTaskRunMethod · 0.85
ListTaskRunsMethod · 0.85
ListTaskRunsByStatusMethod · 0.85
ClaimNextRunMethod · 0.85
HeartbeatRunLeaseMethod · 0.85
ReleaseRunLeaseMethod · 0.85

Calls 2

appendFunction · 0.85
cloneRawJSONFunction · 0.70

Tested by

no test coverage detected