Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0/go.mod h1:ZPpqegjbE99EPKsu3iUWV22A04wzGPcAY/ziSIQEEgs=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0/go.mod h1:cSgYe11MCNYunTnRXrKiR/tHc0eoKjICUuWpNZoVCOo=
github.com/GrayCodeAI/eyrie v0.1.0/go.mod h1:Iznws0IS267Cp9Zb5VsjCaHLewJEGR61Bv9F3hwJujY=
github.com/GrayCodeAI/eyrie v0.1.0/go.mod h1:g/hyB7+YCSYSkw5zJfZrWxLJyCoy2psR8QOsXN4ZzsI=
github.com/GrayCodeAI/hawk v0.1.0/go.mod h1:JIiKVFiFJL52OKNW/ndHRtjzVbVy6CX3HBydPpDHkwA=
github.com/GrayCodeAI/inspect v0.1.0/go.mod h1:IOH0pwvJ5TmNFSRDkLH3nbWbawE/PPaZojV2Lj5BSnU=
github.com/GrayCodeAI/sight v0.1.0/go.mod h1:Nmq6CEf3fXhrrJzPhGRRldEnKtqWHvuWMG+OHjRv2wo=
github.com/GrayCodeAI/tok v0.1.0/go.mod h1:JLV+xe2sbHfQjqX66u4tOMTNXqHW0OhkMQqY8wIm1aI=
github.com/GrayCodeAI/inspect v0.1.0/go.mod h1:DDhIU8Ikg2kjIXsiBupbTbLhmf4Jn8Ut7SV70spF0Qs=
github.com/GrayCodeAI/sight v0.1.0/go.mod h1:hcEdCWt07/igu5HeCxB052OkQ5WOQ/f/WkEO1z1fcOM=
github.com/GrayCodeAI/tok v0.1.0/go.mod h1:oqA7HXbXuyrZ3+uJC+TKJWmYYPlyShaXGDQpftEJ9OE=
github.com/GrayCodeAI/trace v0.1.0/go.mod h1:sPBHmg0kctNnRJ/bRIq9rmPFKje31BEnWdBbrNc4tRM=
github.com/GrayCodeAI/yaad v0.1.0/go.mod h1:uKu+u22cVALLopdMBIzt0a4VMiPx+WOdjqkgtoUbzjY=
github.com/GrayCodeAI/yaad v0.1.0/go.mod h1:fwJ+AwEqvnoGiDA51iQ1NO696xI9j7WkkYg4UuwrmQM=
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE=
github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
Expand Down
10 changes: 10 additions & 0 deletions internal/engine/git/git_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ func setupTestRepo(t *testing.T) (string, func()) {
"GIT_AUTHOR_EMAIL=alice@example.com",
"GIT_COMMITTER_NAME=Alice",
"GIT_COMMITTER_EMAIL=alice@example.com",
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
out, err := cmd.CombinedOutput()
if err != nil {
Expand All @@ -46,6 +51,11 @@ func setupTestRepo(t *testing.T) (string, func()) {
"GIT_AUTHOR_EMAIL="+email,
"GIT_COMMITTER_NAME="+author,
"GIT_COMMITTER_EMAIL="+email,
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
out, err := cmd.CombinedOutput()
if err != nil {
Expand Down
8 changes: 8 additions & 0 deletions internal/intelligence/repomap/changeset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ func runGit(t *testing.T, dir string, args ...string) {
t.Helper()
cmd := exec.CommandContext(context.Background(), "git", args...)
cmd.Dir = dir
cmd.Env = append(
os.Environ(),
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("git %v failed: %v\n%s", args, err, out)
Expand Down
8 changes: 8 additions & 0 deletions internal/intelligence/repomap/file_grouper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,14 @@ func runGrouperGit(t *testing.T, dir string, args ...string) {
t.Helper()
cmd := exec.CommandContext(context.Background(), "git", args...)
cmd.Dir = dir
cmd.Env = append(
os.Environ(),
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("git %v failed: %v\n%s", args, err, out)
Expand Down
8 changes: 8 additions & 0 deletions internal/intelligence/repomap/ownership_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,14 @@ type gitTestCmd struct {
func (g *gitTestCmd) CombinedOutput() ([]byte, error) {
cmd := exec.CommandContext(context.Background(), "git", g.args...)
cmd.Dir = g.dir
cmd.Env = append(
os.Environ(),
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
return cmd.CombinedOutput()
}

Expand Down
22 changes: 22 additions & 0 deletions internal/multiagent/parallel/parallel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ func initTestRepo(t *testing.T) string {
t.Helper()
cmd := exec.CommandContext(context.Background(), args[0], args[1:]...)
cmd.Dir = dir
cmd.Env = append(
os.Environ(),
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("command %v failed: %s: %v", args, out, err)
Expand All @@ -35,6 +43,8 @@ func initTestRepo(t *testing.T) string {
run("git", "init", "-b", "main")
run("git", "config", "user.email", "test@hawk.dev")
run("git", "config", "user.name", "Hawk Test")
run("git", "config", "commit.gpgsign", "false")
run("git", "config", "tag.gpgsign", "false")

// Create an initial commit so branches can be made.
readme := filepath.Join(dir, "README.md")
Expand Down Expand Up @@ -335,6 +345,18 @@ func TestMergeWorktree(t *testing.T) {
t.Helper()
cmd := exec.CommandContext(context.Background(), "git", args...)
cmd.Dir = dir
cmd.Env = append(
os.Environ(),
"GIT_AUTHOR_NAME=Hawk Test",
"GIT_AUTHOR_EMAIL=test@hawk.dev",
"GIT_COMMITTER_NAME=Hawk Test",
"GIT_COMMITTER_EMAIL=test@hawk.dev",
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("git %v in %s: %s: %v", args, dir, out, err)
Expand Down
22 changes: 22 additions & 0 deletions internal/multiagent/parallel/worktree_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ func initManagerTestRepo(t *testing.T) string {
t.Helper()
cmd := exec.CommandContext(context.Background(), args[0], args[1:]...)
cmd.Dir = dir
cmd.Env = append(
os.Environ(),
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("command %v failed: %s: %v", args, out, err)
Expand All @@ -32,6 +40,8 @@ func initManagerTestRepo(t *testing.T) string {
run("git", "init", "-b", "main")
run("git", "config", "user.email", "test@hawk.dev")
run("git", "config", "user.name", "Hawk Test")
run("git", "config", "commit.gpgsign", "false")
run("git", "config", "tag.gpgsign", "false")

readme := filepath.Join(dir, "README.md")
if err := os.WriteFile(readme, []byte("# worktree manager test\n"), 0o644); err != nil {
Expand Down Expand Up @@ -545,6 +555,18 @@ func runGitIn(t *testing.T, dir string, args ...string) {
t.Helper()
cmd := exec.CommandContext(context.Background(), "git", args...)
cmd.Dir = dir
cmd.Env = append(
os.Environ(),
"GIT_AUTHOR_NAME=Hawk Test",
"GIT_AUTHOR_EMAIL=test@hawk.dev",
"GIT_COMMITTER_NAME=Hawk Test",
"GIT_COMMITTER_EMAIL=test@hawk.dev",
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("git %v in %s: %s: %v", args, dir, out, err)
Expand Down
6 changes: 6 additions & 0 deletions internal/snapshot/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ func (t *Tracker) Init() error {
if err := t.gitWork("config", "user.name", "hawk-snapshot"); err != nil {
return fmt.Errorf("config name: %w", err)
}
if err := t.gitWork("config", "commit.gpgsign", "false"); err != nil {
return fmt.Errorf("config commit signing: %w", err)
}
if err := t.gitWork("config", "tag.gpgsign", "false"); err != nil {
return fmt.Errorf("config tag signing: %w", err)
}
return nil
}

Expand Down
10 changes: 10 additions & 0 deletions internal/snapshot/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ func setupTestProject(t *testing.T) string {
run(t, dir, "git", "init")
run(t, dir, "git", "config", "user.email", "test@test.com")
run(t, dir, "git", "config", "user.name", "Test")
run(t, dir, "git", "config", "commit.gpgsign", "false")
run(t, dir, "git", "config", "tag.gpgsign", "false")
os.WriteFile(filepath.Join(dir, "main.go"), []byte("package main\n"), 0o644)
run(t, dir, "git", "add", ".")
run(t, dir, "git", "commit", "-m", "initial")
Expand All @@ -24,6 +26,14 @@ func run(t *testing.T, dir, name string, args ...string) {
t.Helper()
cmd := exec.CommandContext(context.Background(), name, args...)
cmd.Dir = dir
cmd.Env = append(
os.Environ(),
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
if out, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("%s %v failed: %s: %v", name, args, out, err)
}
Expand Down
16 changes: 16 additions & 0 deletions internal/snapshot/workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ func setupWorkspaceProject(t *testing.T) string {
runCmd(t, dir, "git", "init")
runCmd(t, dir, "git", "config", "user.email", "test@test.com")
runCmd(t, dir, "git", "config", "user.name", "Test")
runCmd(t, dir, "git", "config", "commit.gpgsign", "false")
runCmd(t, dir, "git", "config", "tag.gpgsign", "false")

// Create project files
os.MkdirAll(filepath.Join(dir, "pkg"), 0o755)
Expand All @@ -37,6 +39,14 @@ func runCmd(t *testing.T, dir, name string, args ...string) {
t.Helper()
cmd := exec.CommandContext(context.Background(), name, args...)
cmd.Dir = dir
cmd.Env = append(
os.Environ(),
"GIT_CONFIG_COUNT=2",
"GIT_CONFIG_KEY_0=commit.gpgsign",
"GIT_CONFIG_VALUE_0=false",
"GIT_CONFIG_KEY_1=tag.gpgsign",
"GIT_CONFIG_VALUE_1=false",
)
if out, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("%s %v failed: %s: %v", name, args, out, err)
}
Expand Down Expand Up @@ -365,6 +375,8 @@ func TestEmptyProject(t *testing.T) {
runCmd(t, dir, "git", "init")
runCmd(t, dir, "git", "config", "user.email", "test@test.com")
runCmd(t, dir, "git", "config", "user.name", "Test")
runCmd(t, dir, "git", "config", "commit.gpgsign", "false")
runCmd(t, dir, "git", "config", "tag.gpgsign", "false")

storeDir := filepath.Join(t.TempDir(), "snapshots")
store := NewSnapshotStore(storeDir)
Expand All @@ -387,6 +399,8 @@ func TestLargeFile_Handling(t *testing.T) {
runCmd(t, dir, "git", "init")
runCmd(t, dir, "git", "config", "user.email", "test@test.com")
runCmd(t, dir, "git", "config", "user.name", "Test")
runCmd(t, dir, "git", "config", "commit.gpgsign", "false")
runCmd(t, dir, "git", "config", "tag.gpgsign", "false")

// Create a 1MB file
largeContent := make([]byte, 1024*1024)
Expand Down Expand Up @@ -600,6 +614,8 @@ func TestCapture_FileMode(t *testing.T) {
runCmd(t, dir, "git", "init")
runCmd(t, dir, "git", "config", "user.email", "test@test.com")
runCmd(t, dir, "git", "config", "user.name", "Test")
runCmd(t, dir, "git", "config", "commit.gpgsign", "false")
runCmd(t, dir, "git", "config", "tag.gpgsign", "false")

// Create file with specific mode
os.WriteFile(filepath.Join(dir, "script.sh"), []byte("#!/bin/bash\necho hello\n"), 0o755)
Expand Down
Loading