From 88b01d2879cb07f696d5b8a41d3e7b6b3d4f2aa6 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Wed, 29 Jul 2026 04:53:48 +0530 Subject: [PATCH 1/7] chore: update external/hawk-core-contracts submodule pointer to 60c9bd5 --- external/hawk-core-contracts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/hawk-core-contracts b/external/hawk-core-contracts index ee09466e..60c9bd56 160000 --- a/external/hawk-core-contracts +++ b/external/hawk-core-contracts @@ -1 +1 @@ -Subproject commit ee09466e706410430230cc2a0774cd7fcd108416 +Subproject commit 60c9bd56a11f74938ff403491b4c66dfae9ec5d6 From 8e6182d06d170df4b758be643ac6a51d71f66c69 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Wed, 29 Jul 2026 05:12:26 +0530 Subject: [PATCH 2/7] chore: release hawk-core-contracts v0.1.10 for harness parity --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 81add1f6..ad506938 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( charm.land/bubbletea/v2 v2.0.7 charm.land/lipgloss/v2 v2.0.3 github.com/GrayCodeAI/eyrie v0.1.4-0.20260727034005-5b332a4d6be5 - github.com/GrayCodeAI/hawk-core-contracts v0.1.9 + github.com/GrayCodeAI/hawk-core-contracts v0.1.10 github.com/GrayCodeAI/inspect v0.0.0-20260726091806-08f3151d5738 github.com/GrayCodeAI/sight v0.0.0-20260726091804-84c96edfc589 github.com/GrayCodeAI/tok v0.1.5-0.20260727034347-2afc7f549e35 diff --git a/go.sum b/go.sum index fd5519bc..4c6f1431 100644 --- a/go.sum +++ b/go.sum @@ -20,6 +20,8 @@ github.com/GrayCodeAI/eyrie v0.1.4-0.20260727034005-5b332a4d6be5 h1:EpZ2JmtzR6gD github.com/GrayCodeAI/eyrie v0.1.4-0.20260727034005-5b332a4d6be5/go.mod h1:rnouStzgv5q8hSvLdsVQazBkLBuYbm+WGCwRcAc5zXE= github.com/GrayCodeAI/hawk-core-contracts v0.1.9 h1:uXX/gtNM+3kxSEzu+rZkHykzcEaAbASn1lmPyOGMXvc= github.com/GrayCodeAI/hawk-core-contracts v0.1.9/go.mod h1:BXbh68YrCf+s9HVqND5F8DAvl2MnE5NcOwZZZB56HGA= +github.com/GrayCodeAI/hawk-core-contracts v0.1.10 h1:mvp6d2clwjHiBZpde8G9y8o/5jf/Qx69xXytTdPtVks= +github.com/GrayCodeAI/hawk-core-contracts v0.1.10/go.mod h1:BXbh68YrCf+s9HVqND5F8DAvl2MnE5NcOwZZZB56HGA= github.com/GrayCodeAI/hawk-mcpkit v0.1.5-0.20260725110526-3e80e92bf6cd h1:ACnGttHskvqwhL3nWbIi1ALpkpqQyZsyI3GhB3ZmKwg= github.com/GrayCodeAI/hawk-mcpkit v0.1.5-0.20260725110526-3e80e92bf6cd/go.mod h1:C32HPDRqiDETbVbMIbOTvguek6KImpLCffJjet7sqck= github.com/GrayCodeAI/inspect v0.0.0-20260726091806-08f3151d5738 h1:T9mQS75wTtTq6xqX1KGsQJyhnRFnd5YmoaGnHe9jppI= From ed00a92f99923ebb76b03b6a9a0082ae32c710c8 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Wed, 29 Jul 2026 05:15:25 +0530 Subject: [PATCH 3/7] chore: sync go.sum via go work sync --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index 4c6f1431..9028e0d4 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,6 @@ github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/GrayCodeAI/eyrie v0.1.4-0.20260727034005-5b332a4d6be5 h1:EpZ2JmtzR6gD8perOTr0tCLqK0Rxc50DIQZEC+zdej0= github.com/GrayCodeAI/eyrie v0.1.4-0.20260727034005-5b332a4d6be5/go.mod h1:rnouStzgv5q8hSvLdsVQazBkLBuYbm+WGCwRcAc5zXE= -github.com/GrayCodeAI/hawk-core-contracts v0.1.9 h1:uXX/gtNM+3kxSEzu+rZkHykzcEaAbASn1lmPyOGMXvc= -github.com/GrayCodeAI/hawk-core-contracts v0.1.9/go.mod h1:BXbh68YrCf+s9HVqND5F8DAvl2MnE5NcOwZZZB56HGA= github.com/GrayCodeAI/hawk-core-contracts v0.1.10 h1:mvp6d2clwjHiBZpde8G9y8o/5jf/Qx69xXytTdPtVks= github.com/GrayCodeAI/hawk-core-contracts v0.1.10/go.mod h1:BXbh68YrCf+s9HVqND5F8DAvl2MnE5NcOwZZZB56HGA= github.com/GrayCodeAI/hawk-mcpkit v0.1.5-0.20260725110526-3e80e92bf6cd h1:ACnGttHskvqwhL3nWbIi1ALpkpqQyZsyI3GhB3ZmKwg= From 2cf4eb23a4eeac4ee4b7662e9e10984c286c528e Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Wed, 29 Jul 2026 05:20:31 +0530 Subject: [PATCH 4/7] ci: rerun checks for v0.1.10 release parity From d39900132a2467f4663ea2467cfc7f515dc4f28b Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Wed, 29 Jul 2026 06:02:47 +0530 Subject: [PATCH 5/7] fix: remove emoji characters from harness output to pass emoji audit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace emoji characters with text alternatives to comply with the TestNoEmojiInCmd and TestNoEmojiInInternalExceptIcons tests which require all emojis to go through internal/ui/icons package. - cmd/harness.go: Replace 🔧 with [FIX], ✓ with +, 🦅 with [HAWK] - internal/harness/render.go: Remove all emoji characters from markdown/HTML output --- cmd/harness.go | 6 +++--- internal/harness/render.go | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/harness.go b/cmd/harness.go index f5474dc4..ff53aa25 100644 --- a/cmd/harness.go +++ b/cmd/harness.go @@ -50,9 +50,9 @@ Use --fix to automatically repair missing AGENTS.md, skills, or spec directories if err != nil { return fmt.Errorf("harness auto-fix failed: %w", err) } - fmt.Printf("🔧 Hawk Harness Auto-Repair Results:\n") + fmt.Printf("[FIX] Hawk Harness Auto-Repair Results:\n") for _, repair := range fixResult.RepairsPerformed { - fmt.Printf(" ✓ %s\n", repair) + fmt.Printf(" + %s\n", repair) } // Re-evaluate workspace after fix report, _ = harness.EvaluateWorkspace(ctx, targetDir, opts) @@ -94,7 +94,7 @@ Use --fix to automatically repair missing AGENTS.md, skills, or spec directories // Journal quality observation to Hawk execution graph _ = harness.JournalHarnessReport(report, "") - fmt.Printf("🦅 Hawk Harness Evaluation Complete\n") + fmt.Printf("[HAWK] Hawk Harness Evaluation Complete\n") fmt.Printf(" Overall Score : %d/100 (%s)\n", report.OverallScore, report.OverallStatus) fmt.Printf(" Findings : %d prioritized issues\n", len(report.Findings)) fmt.Printf(" HTML Report : %s\n", htmlPath) diff --git a/internal/harness/render.go b/internal/harness/render.go index ec7ca825..3ada0bdf 100644 --- a/internal/harness/render.go +++ b/internal/harness/render.go @@ -16,7 +16,7 @@ func RenderJSON(report *HarnessReport) ([]byte, error) { func RenderMarkdown(report *HarnessReport) string { var sb strings.Builder - sb.WriteString("# 🦅 Hawk Agent Harness Review Report\n\n") + sb.WriteString("# Hawk Agent Harness Review Report\n\n") sb.WriteString(fmt.Sprintf("**Target Workspace:** `%s` \n", report.TargetPath)) sb.WriteString(fmt.Sprintf("**Generated At:** %s \n", report.GeneratedAt.Format(time.RFC1123))) sb.WriteString(fmt.Sprintf("**Overall Harness Health Score:** **%d / 100** (%s)\n\n", report.OverallScore, report.OverallStatus)) @@ -24,7 +24,7 @@ func RenderMarkdown(report *HarnessReport) string { sb.WriteString("## Executive Summary\n\n") sb.WriteString(report.Summary + "\n\n") - sb.WriteString("## 📊 Agent Work Loop Dimensions\n\n") + sb.WriteString("## Agent Work Loop Dimensions\n\n") sb.WriteString("| Dimension | Score | Status | Summary |\n") sb.WriteString("| :--- | :---: | :---: | :--- |\n") @@ -43,7 +43,7 @@ func RenderMarkdown(report *HarnessReport) string { } sb.WriteString("\n") - sb.WriteString("## 🔍 Detected Harness Assets\n\n") + sb.WriteString("## Detected Harness Assets\n\n") sb.WriteString(fmt.Sprintf("- **AGENTS.md**: %v\n", report.Assets.AgentsMD)) if report.Assets.AgentsMDPath != "" { sb.WriteString(fmt.Sprintf(" - *Path*: `%s`\n", report.Assets.AgentsMDPath)) @@ -55,9 +55,9 @@ func RenderMarkdown(report *HarnessReport) string { sb.WriteString(fmt.Sprintf("- **Hooks**: %s\n", strings.Join(report.Assets.Hooks, ", "))) sb.WriteString(fmt.Sprintf("- **Autonomy Policy**: `%s` tier (Sandbox: `%s`)\n\n", report.Assets.AutonomyTier, report.Assets.SandboxPolicy)) - sb.WriteString("## ⚠️ Prioritized Findings & Repair Recommendations\n\n") + sb.WriteString("## Prioritized Findings & Repair Recommendations\n\n") if len(report.Findings) == 0 { - sb.WriteString("✨ **No critical harness findings detected!** Your project is well-configured for AI agent workflows.\n") + sb.WriteString("**No critical harness findings detected!** Your project is well-configured for AI agent workflows.\n") } else { for i, f := range report.Findings { sb.WriteString(fmt.Sprintf("### %d. [%s] %s (%s)\n\n", i+1, f.Severity, f.Title, f.Dimension)) @@ -208,7 +208,7 @@ func RenderHTML(report *HarnessReport) string {
-

🦅 Hawk Agent Harness Review

+

Hawk Agent Harness Review

Workspace: ` + report.TargetPath + ` | Generated: ` + report.GeneratedAt.Format(time.RFC1123) + `
@@ -264,7 +264,7 @@ func RenderHTML(report *HarnessReport) string {

Prioritized Findings & Repair Plans

`) if len(report.Findings) == 0 { - sb.WriteString(`

No critical findings! Workspace harness is well-configured.

`) + sb.WriteString(`

No critical findings! Workspace harness is well-configured.

`) } else { for _, f := range report.Findings { sb.WriteString(fmt.Sprintf(` From f6522ca1ca7ffd2154ad96b3a2945ff7c16d6ae1 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Wed, 29 Jul 2026 06:11:46 +0530 Subject: [PATCH 6/7] fix: resolve govet shadow warnings to make CI green Fix shadow variable declarations in cmd/harness.go and internal/harness/harness_test.go that were causing golangci-lint to fail with govet shadow errors. --- cmd/harness.go | 4 ++-- internal/harness/harness_test.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/harness.go b/cmd/harness.go index ff53aa25..06a56901 100644 --- a/cmd/harness.go +++ b/cmd/harness.go @@ -77,8 +77,8 @@ Use --fix to automatically repair missing AGENTS.md, skills, or spec directories // Write HTML report htmlPath := filepath.Join(outDir, "report.html") htmlContent := harness.RenderHTML(report) - if err := os.WriteFile(htmlPath, []byte(htmlContent), 0o644); err != nil { - return fmt.Errorf("failed to write report.html: %w", err) + if writeErr := os.WriteFile(htmlPath, []byte(htmlContent), 0o644); writeErr != nil { + return fmt.Errorf("failed to write report.html: %w", writeErr) } // Write JSON report diff --git a/internal/harness/harness_test.go b/internal/harness/harness_test.go index 849f9eaa..eced0526 100644 --- a/internal/harness/harness_test.go +++ b/internal/harness/harness_test.go @@ -39,8 +39,8 @@ func TestEvaluateWorkspace(t *testing.T) { - Build with make - Run tests before opening PR ` - if err := os.WriteFile(agentsPath, []byte(agentsContent), 0o644); err != nil { - t.Fatalf("Failed to write AGENTS.md: %v", err) + if writeErr := os.WriteFile(agentsPath, []byte(agentsContent), 0o644); writeErr != nil { + t.Fatalf("Failed to write AGENTS.md: %v", writeErr) } makefileContent := `test: @@ -48,12 +48,12 @@ func TestEvaluateWorkspace(t *testing.T) { lint: golangci-lint run ` - if err := os.WriteFile(filepath.Join(tmpDir, "Makefile"), []byte(makefileContent), 0o644); err != nil { - t.Fatalf("Failed to write Makefile: %v", err) + if writeErr := os.WriteFile(filepath.Join(tmpDir, "Makefile"), []byte(makefileContent), 0o644); writeErr != nil { + t.Fatalf("Failed to write Makefile: %v", writeErr) } - if err := os.WriteFile(filepath.Join(tmpDir, ".golangci.yml"), []byte("linters:\n enable:\n - errcheck\n"), 0o644); err != nil { - t.Fatalf("Failed to write .golangci.yml: %v", err) + if writeErr := os.WriteFile(filepath.Join(tmpDir, ".golangci.yml"), []byte("linters:\n enable:\n - errcheck\n"), 0o644); writeErr != nil { + t.Fatalf("Failed to write .golangci.yml: %v", writeErr) } // 3. Re-evaluate with assets present From 22029751ae6a2cea2e7bf8d5b4e4921a67bd0d76 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Wed, 29 Jul 2026 06:19:28 +0530 Subject: [PATCH 7/7] fix: resolve all remaining govet shadow warnings in cmd/harness.go --- cmd/harness.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/harness.go b/cmd/harness.go index 06a56901..91596c7b 100644 --- a/cmd/harness.go +++ b/cmd/harness.go @@ -46,9 +46,9 @@ Use --fix to automatically repair missing AGENTS.md, skills, or spec directories } if harnessFix || (len(args) > 0 && args[0] == "fix") { - fixResult, err := harness.FixWorkspaceHarness(ctx, targetDir, report) - if err != nil { - return fmt.Errorf("harness auto-fix failed: %w", err) + fixResult, fixErr := harness.FixWorkspaceHarness(ctx, targetDir, report) + if fixErr != nil { + return fmt.Errorf("harness auto-fix failed: %w", fixErr) } fmt.Printf("[FIX] Hawk Harness Auto-Repair Results:\n") for _, repair := range fixResult.RepairsPerformed { @@ -63,15 +63,15 @@ Use --fix to automatically repair missing AGENTS.md, skills, or spec directories outDir = filepath.Join(targetDir, ".hawk", "harness") } - if err := os.MkdirAll(outDir, 0o755); err != nil { - return fmt.Errorf("failed to create harness output directory: %w", err) + if mkdirErr := os.MkdirAll(outDir, 0o755); mkdirErr != nil { + return fmt.Errorf("failed to create harness output directory: %w", mkdirErr) } // Write Markdown report mdPath := filepath.Join(outDir, "report.md") mdContent := harness.RenderMarkdown(report) - if err := os.WriteFile(mdPath, []byte(mdContent), 0o644); err != nil { - return fmt.Errorf("failed to write report.md: %w", err) + if writeErr := os.WriteFile(mdPath, []byte(mdContent), 0o644); writeErr != nil { + return fmt.Errorf("failed to write report.md: %w", writeErr) } // Write HTML report @@ -83,12 +83,12 @@ Use --fix to automatically repair missing AGENTS.md, skills, or spec directories // Write JSON report jsonPath := filepath.Join(outDir, "findings.json") - jsonContent, err := harness.RenderJSON(report) - if err != nil { - return fmt.Errorf("failed to serialize findings.json: %w", err) + jsonContent, renderErr := harness.RenderJSON(report) + if renderErr != nil { + return fmt.Errorf("failed to serialize findings.json: %w", renderErr) } - if err := os.WriteFile(jsonPath, jsonContent, 0o644); err != nil { - return fmt.Errorf("failed to write findings.json: %w", err) + if writeErr := os.WriteFile(jsonPath, jsonContent, 0o644); writeErr != nil { + return fmt.Errorf("failed to write findings.json: %w", writeErr) } // Journal quality observation to Hawk execution graph