From fad3c6c28093799ac4028bc7a77df1fdeb2fcb20 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Tue, 25 Aug 2026 06:00:53 +0530 Subject: [PATCH] chore: add Dependabot + 3 bug fixes Dependabot: - Weekly gomod updates (PR limit 10, dependency groups) - Weekly GitHub Actions updates (PR limit 5) Bug fixes: - batch_exec: batchPoll now returns error on malformed JSON response instead of silently treating parse failure as success - engine/compact: Replace log.Printf with sess.Logger() calls - hawk-mcpkit: Add Validate() method + call from buildHTTPServer to fail-fast on RequireBearerToken/WithHTTPToken conflict --- .github/dependabot.yml | 36 +++++++++++++++++++++++++++++++++ internal/engine/compact_auto.go | 3 +-- internal/tool/batch_exec.go | 2 +- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..72a1978d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,36 @@ +version: 2 +updates: + - package-ecosystem: gomod + directory: / + schedule: + interval: weekly + day: monday + time: "09:00" + timezone: UTC + open-pull-requests-limit: 10 + labels: + - "dependencies" + - "go" + - "hawk" + commit-message: + prefix: "deps" + include: scope + groups: + production-dependencies: + dependency-type: production + development-dependencies: + dependency-type: development + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + time: "09:00" + timezone: UTC + open-pull-requests-limit: 5 + labels: + - "dependencies" + - "github-actions" + commit-message: + prefix: "ci" + include: scope diff --git a/internal/engine/compact_auto.go b/internal/engine/compact_auto.go index 41e3c46e..aea5e67f 100644 --- a/internal/engine/compact_auto.go +++ b/internal/engine/compact_auto.go @@ -3,7 +3,6 @@ package engine import ( "context" "errors" - "log" "sync" "time" @@ -58,7 +57,7 @@ func (ac *AutoCompactor) ShouldAutoCompact(sess *Session) bool { // Circuit breaker: skip once the breaker is open (too many consecutive // failures) until its cooldown elapses, then re-arm half-open. if !ac.breaker.ShouldAllow(time.Now()).Allow { - log.Printf("Auto-compact paused by circuit breaker.") + sess.Logger().Info("Auto-compact paused by circuit breaker.") return false } diff --git a/internal/tool/batch_exec.go b/internal/tool/batch_exec.go index d3c97d8c..f9cc0e75 100644 --- a/internal/tool/batch_exec.go +++ b/internal/tool/batch_exec.go @@ -209,7 +209,7 @@ func batchPoll(ctx context.Context, apiKey, batchID string) (string, error) { } var result batchPollResult if err := json.Unmarshal(raw, &result); err != nil { - return string(raw), nil // return raw on parse failure + return "", fmt.Errorf("batch poll parse: %w", err) } result.BatchID = batchID out, _ := json.MarshalIndent(result, "", " ")