feat: wire coverage support notifications

This commit is contained in:
姚章浩
2026-07-22 12:48:30 +08:00
parent 86593df57c
commit 774ccd9454
10 changed files with 639 additions and 8 deletions
+8
View File
@@ -25,6 +25,14 @@ func NewService(repo Repository) (*Service, error) {
}, nil
}
// ObserveSucceededTurn adapts Service to the QA succeeded-turn observer.
// The decision is persisted durably before QA returns; callers decide how to
// report the error without changing the successful QA result.
func (s *Service) ObserveSucceededTurn(ctx context.Context, turn core.Turn) error {
_, err := s.EvaluateAndPersist(ctx, turn)
return err
}
// EvaluateAndPersist evaluates a turn and persists the resulting decision.
// For uncovered verdicts the Repository atomically creates a pending
// support case. The operation is idempotent — replaying the same