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

Method loadRunWithTask

internal/task/manager.go:3303–3318  ·  view source on GitHub ↗
(ctx context.Context, runID string)

Source from the content-addressed store, hash-verified

3301}
3302
3303func (m *Service) loadRunWithTask(ctx context.Context, runID string) (Run, Task, error) {
3304 trimmedRunID := strings.TrimSpace(runID)
3305 if trimmedRunID == "" {
3306 return Run{}, Task{}, fmt.Errorf("%w: task run id is required", ErrValidation)
3307 }
3308
3309 run, err := m.store.GetTaskRun(ctx, trimmedRunID)
3310 if err != nil {
3311 return Run{}, Task{}, err
3312 }
3313 taskRecord, err := m.store.GetTask(ctx, run.TaskID)
3314 if err != nil {
3315 return Run{}, Task{}, err
3316 }
3317 return run, taskRecord, nil
3318}
3319
3320func (m *Service) ensureTaskExecutable(ctx context.Context, record Task) error {
3321 dependencies, err := m.store.ListDependencies(ctx, record.ID)

Callers 14

InspectRunMethod · 0.95
ForceReleaseRunMethod · 0.95
ForceFailRunMethod · 0.95
RetryRunMethod · 0.95
RecoverRunMethod · 0.95
ClaimRunMethod · 0.95
StartRunMethod · 0.95
AttachRunSessionMethod · 0.95
CompleteRunMethod · 0.95
FailRunMethod · 0.95
CancelRunMethod · 0.95
RecoverRunOnBootMethod · 0.95

Calls 2

GetTaskRunMethod · 0.65
GetTaskMethod · 0.65

Tested by

no test coverage detected