fix: Address golangci-lint errors (errcheck, gosec) (#76)

Apply PR #76 from dannomayernotabot:

- Add golangci exclusions for internal package false positives
- Tighten file permissions (0644 -> 0600) for sensitive files
- Add ReadHeaderTimeout to HTTP server (slowloris prevention)
- Explicit error ignoring with _ = for intentional cases
- Add //nolint comments with justifications
- Spelling: cancelled -> canceled (US locale)

Co-Authored-By: dannomayernotabot <noreply@github.com>

🤖 Generated with Claude Code
This commit is contained in:
max
2026-01-03 16:11:40 -08:00
committed by Steve Yegge
parent 62848065e3
commit 1b69576573
82 changed files with 325 additions and 355 deletions
+7 -7
View File
@@ -51,10 +51,10 @@ func (h *DefaultRefineryHandler) SetOutput(w io.Writer) {
// 2. Adds it to the merge queue
// 3. Acknowledges receipt
func (h *DefaultRefineryHandler) HandleMergeReady(payload *MergeReadyPayload) error {
fmt.Fprintf(h.Output, "[Refinery] MERGE_READY received for polecat %s\n", payload.Polecat)
fmt.Fprintf(h.Output, " Branch: %s\n", payload.Branch)
fmt.Fprintf(h.Output, " Issue: %s\n", payload.Issue)
fmt.Fprintf(h.Output, " Verified: %s\n", payload.Verified)
_, _ = fmt.Fprintf(h.Output, "[Refinery] MERGE_READY received for polecat %s\n", payload.Polecat)
_, _ = fmt.Fprintf(h.Output, " Branch: %s\n", payload.Branch)
_, _ = fmt.Fprintf(h.Output, " Issue: %s\n", payload.Issue)
_, _ = fmt.Fprintf(h.Output, " Verified: %s\n", payload.Verified)
// Validate required fields
if payload.Branch == "" {
@@ -77,12 +77,12 @@ func (h *DefaultRefineryHandler) HandleMergeReady(payload *MergeReadyPayload) er
// Add to queue
if err := h.Queue.Submit(mr); err != nil {
fmt.Fprintf(h.Output, "[Refinery] Error adding to queue: %v\n", err)
_, _ = fmt.Fprintf(h.Output, "[Refinery] Error adding to queue: %v\n", err)
return fmt.Errorf("failed to add merge request to queue: %w", err)
}
fmt.Fprintf(h.Output, "[Refinery] ✓ Added to merge queue: %s\n", mr.ID)
fmt.Fprintf(h.Output, " Queue length: %d\n", h.Queue.Count())
_, _ = fmt.Fprintf(h.Output, "[Refinery] ✓ Added to merge queue: %s\n", mr.ID)
_, _ = fmt.Fprintf(h.Output, " Queue length: %d\n", h.Queue.Count())
return nil
}