From efae15d72d9bc0592e34dbee031bf11a806812d8 Mon Sep 17 00:00:00 2001 From: DBT Date: Tue, 24 Feb 2026 03:34:26 +0000 Subject: [PATCH] track autonomy action-level counts in trigger stats --- pkg/autonomy/engine.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/autonomy/engine.go b/pkg/autonomy/engine.go index 1dc105e..4b0bc47 100644 --- a/pkg/autonomy/engine.go +++ b/pkg/autonomy/engine.go @@ -448,6 +448,10 @@ func (e *Engine) writeTriggerAudit(action string, st *taskState, errText string) } } stats.Counts["autonomy"]++ + act := strings.ToLower(strings.TrimSpace(action)) + if act != "" { + stats.Counts["autonomy:"+act]++ + } stats.UpdatedAt = time.Now().UTC().Format(time.RFC3339) if raw, mErr := json.MarshalIndent(stats, "", " "); mErr == nil { _ = os.WriteFile(statsPath, raw, 0644)