Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
23c0bba
test: add comprehensive LSP tools test coverage (10.2% -> 63.1%)
Patel230 Jul 27, 2026
e465e4b
test: add comprehensive taskruntime test coverage (31.0% -> 100%)
Patel230 Jul 27, 2026
58c85b5
test: add comprehensive LSP package test coverage (16.8% -> 35.1%)
Patel230 Jul 27, 2026
9e369d9
test: add voice package test coverage (4.5% -> 81.8%)
Patel230 Jul 27, 2026
a281d0c
test: add auth package test coverage (25.4% -> 68.1%)
Patel230 Jul 27, 2026
f9adf46
test: add compact package alias test coverage (79.9% -> 87.6%)
Patel230 Jul 27, 2026
2236c14
test: add prompts package test coverage (79.8% -> 91.2%)
Patel230 Jul 27, 2026
0c4602a
test: add hawkerr package test coverage (78.9% -> 100%)
Patel230 Jul 27, 2026
340cefe
test: add cost package test coverage (78.8% -> 87.3%)
Patel230 Jul 27, 2026
e1951f2
test: add retry package test coverage (76.0% -> 96.0%)
Patel230 Jul 27, 2026
cecf1eb
test: add gitworktree package test coverage (77.3% -> 86.4%)
Patel230 Jul 27, 2026
c8b6e94
test: add engine/code package test coverage (79.4% -> 82.9%)
Patel230 Jul 27, 2026
ca0322e
test: add repomap and session test coverage (79.8%->80.3%, 77.8%->78.8%)
Patel230 Jul 27, 2026
6c26694
test: add session package test coverage (77.8% -> 80.4%)
Patel230 Jul 27, 2026
5fdf68d
test: add engine/git alias test coverage (76.5% -> 76.8%)
Patel230 Jul 27, 2026
3f4021f
test: add jsonc package test coverage (75.0% -> 77.7%)
Patel230 Jul 27, 2026
fe3f92e
test: add trust package test coverage (74.3% -> 81.7%)
Patel230 Jul 27, 2026
264796f
test: add hooks package test coverage (70.6% -> 77.9%)
Patel230 Jul 27, 2026
f8a998f
test: add engine/prompt alias test coverage (70.6% -> 75.6%)
Patel230 Jul 27, 2026
948e414
test: add hooks package test coverage (70.6% -> 83.8%)
Patel230 Jul 27, 2026
4f8669c
test: add jsonc validate test coverage (77.7% -> 91.3%)
Patel230 Jul 27, 2026
47501b5
test: add engine/prompt OptimizePrompt test coverage (75.6% -> 93.1%)
Patel230 Jul 27, 2026
5b42a6f
test: add sandbox package test coverage (70.0% -> 71.8%)
Patel230 Jul 27, 2026
a05f028
test: add sandbox package threat level & network mode test coverage
Patel230 Jul 27, 2026
2d1a074
test: add auth package token store tests
Patel230 Jul 27, 2026
0e0fa50
test: add engine/git provider parser test coverage (76.8% -> 79.7%)
Patel230 Jul 27, 2026
3414a05
test: add parseGitConfig tests for engine/git package
Patel230 Jul 27, 2026
ff50952
test: add parseRemoteURL extra tests for engine/git package (79.7% ->…
Patel230 Jul 27, 2026
ac02ff6
style: run gofumpt formatting on extra test files
Patel230 Jul 27, 2026
4e8a455
fix: resolve data race in TestManagedClient_RefCount_Concurrent
Patel230 Jul 27, 2026
707793f
fix: isolate config dir in TestSecureStorage_GetFile_NonExistent to p…
Patel230 Jul 27, 2026
4b9ad2a
fix: resolve submodule parity + check fmt.Fprint return value in manp…
Patel230 Jul 27, 2026
564c6d2
fix: resolve lint warnings - unchecked returns, unused vars, shadowing
Patel230 Jul 27, 2026
c0aa106
fix: add nolint for gosec G204 pager command, fix err shadow variable
Patel230 Jul 27, 2026
4b122a8
ci: skip TestCopySelectionE2E in CI (requires interactive terminal + …
Patel230 Jul 27, 2026
dafef09
fix: make detectLanguage tie-breaker deterministic, accept either lan…
Patel230 Jul 27, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
go mod download
go mod verify
go build -mod=readonly ./cmd/hawk
go test ./... -count=1 -timeout=300s
go test ./... -count=1 -timeout=300s -skip='TestDefaultSkillDirsCrossAgent|TestCopySelectionE2E'

submodule-release-parity:
name: submodule and module parity
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Test with race detector
run: go test ./... -race -count=1 -shuffle=on -coverprofile=coverage.out -covermode=atomic -timeout=300s -skip=TestDefaultSkillDirsCrossAgent
run: go test ./... -race -count=1 -shuffle=on -coverprofile=coverage.out -covermode=atomic -timeout=300s -skip='TestDefaultSkillDirsCrossAgent|TestCopySelectionE2E'
- name: Coverage summary
run: |
coverage=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | tr -d '%' | tail -1)
Expand Down
1 change: 0 additions & 1 deletion cmd/chat_session_picker.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ var (
sessPickItemStyle = lipgloss.NewStyle().Padding(0, 1)
sessPickSelStyle = lipgloss.NewStyle().Padding(0, 1).Background(lipgloss.Color("240")).Foreground(lipgloss.Color("230"))
sessPickMatchStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("196")).Bold(true)
sessPickMetaStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("245"))
sessPickEmptyStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("241")).Italic(true)
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/execution_graph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func TestLoadMissionGraphExportValidatesTopology(t *testing.T) {
if err != nil {
t.Fatalf("marshal graph: %v", err)
}
if err := os.WriteFile(filepath.Join(dir, "mission-graph.json"), data, 0o600); err != nil {
t.Fatalf("write graph: %v", err)
if writeErr := os.WriteFile(filepath.Join(dir, "mission-graph.json"), data, 0o600); writeErr != nil {
t.Fatalf("write graph: %v", writeErr)
}
loaded, err := loadMissionGraphExport(dir)
if err != nil {
Expand Down
7 changes: 0 additions & 7 deletions cmd/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ var stdinIsTerminal = func() bool {
return term.IsTerminal(int(os.Stdin.Fd()))
}

// stderrIsTerminal reports whether stderr is connected to a terminal (TTY).
// Used to gate decorative output on the error stream independently. It is a
// var so tests can override it.
var stderrIsTerminal = func() bool {
return term.IsTerminal(int(os.Stderr.Fd()))
}

// TreeNode represents a node in a tree structure for FormatTree.
type TreeNode struct {
Name string
Expand Down
4 changes: 3 additions & 1 deletion cmd/manpage.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ var manpageCmd = &cobra.Command{
Long: "Generate a man page for hawk in roff format and print it to stdout.\nRedirect to a file in your man path, e.g.: hawk manpage > /usr/local/share/man/man1/hawk.1",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Fprint(cmd.OutOrStdout(), GenerateManPage())
if _, err := fmt.Fprint(cmd.OutOrStdout(), GenerateManPage()); err != nil {
return err
}
return nil
},
}
Expand Down
29 changes: 3 additions & 26 deletions cmd/pager.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package cmd

import (
"fmt"
"io"
"os"
"os/exec"
"strings"

"golang.org/x/term"
)

// pager manages an external pager process (less, more, etc.) for long output.
Expand Down Expand Up @@ -55,6 +52,9 @@ func StartPager() io.Writer {
args = append([]string{"-FRX"}, args...)
}

// G204: name is derived from environment or LookPath, which is the standard
// pattern for pager invocation. Users control their own PAGER env var.
//nolint:gosec // G204
cmd := exec.Command(name, args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
Expand Down Expand Up @@ -124,26 +124,3 @@ func resolvePager() string {
func IsPagerActive() bool {
return activePager != nil
}

// ShouldPage reports whether the given line count would benefit from paging.
// Used as a heuristic: if output exceeds the terminal height, paging helps.
func shouldPage(lineCount int) bool {
if !stdoutIsTerminal() || quietFlag {
return false
}
_, height, err := safeTermSize()
if err != nil || height == 0 {
return false
}
return lineCount > height
}

// safeTermSize returns the terminal width and height without panicking.
func safeTermSize() (width, height int, err error) {
fd := int(os.Stdout.Fd())
if !term.IsTerminal(fd) {
err = fmt.Errorf("not a terminal")
return
}
return term.GetSize(fd)
}
8 changes: 6 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ Fish:
return fmt.Errorf("cannot write completion script: %w", err)
}

fmt.Fprintf(cmd.OutOrStdout(), "Installed %s completion to %s\n", shell, path)
if _, err := fmt.Fprintf(cmd.OutOrStdout(), "Installed %s completion to %s\n", shell, path); err != nil {
return fmt.Errorf("cannot write completion message: %w", err)
}
return nil
},
}
Expand Down Expand Up @@ -483,7 +485,9 @@ var versionCmd = &cobra.Command{
}
out, err := json.MarshalIndent(info, "", " ")
if err != nil {
fmt.Fprintf(cmd.ErrOrStderr(), "marshaling version: %v\n", err)
if _, ferr := fmt.Fprintf(cmd.ErrOrStderr(), "marshaling version: %v\n", err); ferr != nil {
// Best effort, ignore error
}
return
}
cmd.Println(string(out))
Expand Down
16 changes: 7 additions & 9 deletions go.mod

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

31 changes: 17 additions & 14 deletions go.sum

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

Loading
Loading