Skip to content

Sync stale submodule snapshot: restore test helpers + gofumpt#21

Merged
Patel230 merged 7 commits into
mainfrom
fix/hawk-external-sight-20260708
Jul 8, 2026
Merged

Sync stale submodule snapshot: restore test helpers + gofumpt#21
Patel230 merged 7 commits into
mainfrom
fix/hawk-external-sight-20260708

Conversation

@Patel230

@Patel230 Patel230 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

This branch fixes real breakage found while triaging hawk's CI `build-and-push` job (which fetches this submodule by exact commit SHA):

  • The prior "clean up submodule files, remove stale tests and docs" commit deleted sight_test.go entirely, but it defined mockProvider and testDiff which describe_test.go, autofix_test.go, and improve_test.go still reference. This compiled fine (go build doesn't compile _test.go files) but broke go vet / go test outright. Restored the maintained sight_test.go from the standalone GrayCodeAI/sight repo, which never dropped it.
  • Applied gofumpt formatting to 10 files flagged by CI's format check.
  • Also carries 2 previously-unpushed local commits (VERSION sync, gosec hardening) that were sitting on this submodule's local main but never reached any remote ref.

Patel230 added 7 commits July 6, 2026 11:36
…dit tools

- Add Specialist framework (internal/specialist/) for sub-agent permissions
- Add Eval framework (internal/eval/) with test suites and scoring
- Add Hook system (internal/hook/) for lifecycle hooks
- Update Graph package with cleaner API
- Update Audit package with 12 tests
- Update Browser tool with fixed imports
- Update Tool package with proper initialization

All tests pass: audit(12), eval(11), graph(9), hook(10), tool(9)
- Update config.go with cleaner initialization
- Update docs/architecture.md with new diagrams
- Update options.go with better defaults
- Update reviewer.go with improved logic
- Remove outdated sight_test.go (tests moved to internal packages)

This commit cleans up the external/sight submodule after porting features from Gitlawb/zero.
- Integer-overflow guards on numeric conversions
- File/dir permission tightening (0600/0750)
- Path-traversal cleaning and error-return handling
- Narrow, justified #nosec annotations where risk is not applicable

Module now scans clean with gosec (0 issues).
The refactor commit that removed stale tests/docs deleted sight_test.go
entirely, but it defined mockProvider and testDiff which describe_test.go,
autofix_test.go, and improve_test.go still depend on -- leaving the package
in a state where 'go build' succeeds (test files aren't compiled) but
'go vet'/'go test' fail outright. Restore the maintained version of
sight_test.go from the standalone sight repo (which never dropped it) and
apply gofumpt to the files flagged by CI's format check.
…eshold

- internal/specialist: parseYAML computed description/tools locally but
  never wrote them to the *SpecialistManifest target, so specialists
  loaded from disk always got empty Description/Tools regardless of file
  content. Fix it to actually populate the manifest.
- internal/specialist: LoadProjectSpecialists's multi-location fallback
  never reached its second location, because a missing directory is not
  treated as an error by loadSpecialistsFromDir, so the loop always
  returned after the first (usually absent) location. Load from every
  existing location instead of stopping at the first non-error result.
- internal/specialist: LoadUserSpecialists mutated the specialists map
  without holding Manager's mutex, unlike every other method on Manager.
- internal/graph: processFuncDecl only handled non-pointer receivers
  (*ast.Ident), so any pointer-receiver method -- the common case in
  Go -- lost its type name and was recorded as a bare function.
- Added specialist_test.go (0% covered previously) and a Build test for
  internal/graph (34.3% covered previously, now 82.1%), bringing overall
  package coverage from 69.6% to 74.4%, above CI's 74% threshold.
- internal/eval: use strings.ReplaceAll instead of strings.Replace(...,-1)
- internal/graph: use a tagged switch on depth instead of switch{cond},
  and replace a manual append loop with append(dst, src...)
- internal/hook: remove parseHookContent, an unused method superseded by
  extractCommand and never called from anywhere in the package
- reviewer.go: remove reviewGraphEnabled, an unused method -- graph-based
  review gating is handled directly via cfg.graphEnabled at the call site
@Patel230 Patel230 merged commit e5e0565 into main Jul 8, 2026
11 checks passed
@Patel230 Patel230 deleted the fix/hawk-external-sight-20260708 branch July 8, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant