feat(t208): close candidate decision feedback loop

This commit is contained in:
QiuSW
2026-07-28 11:57:25 +08:00
parent 2a5ded42b5
commit e7f4c3e114
35 changed files with 2854 additions and 203 deletions
@@ -183,6 +183,15 @@ func (s *Store) StoreExecutionCandidates(
if err != nil {
return false, repositoryFailure(err)
}
if err := storeCandidateDecisionDataset(
ctx,
tx,
write,
candidate,
expired,
); err != nil {
return false, err
}
if err := insertExecutionResultRequest(ctx, tx, write, nil); err != nil {
return false, err
}
@@ -825,6 +834,15 @@ func getExecutionReport(
} else if !errors.Is(err, sql.ErrNoRows) {
return nil, repositoryFailure(err)
}
report.DecisionDataset, err = getCandidateDecisionDataset(
ctx,
queryer,
taskID,
executionID,
)
if err != nil {
return nil, err
}
var outcome domain.ExecutionOutcome
var mode, hash, result, reason, selected, evidenceIDs, code, message, step sql.NullString
var retryable sql.NullBool