Skip to content

Commit f127a3a

Browse files
authored
fix: remove non-existent CLI/Docker refs, align CI tooling (#8)
- Deleted deploy/docker/docker-compose.yml (referenced a non-existent Dockerfile + binary) for this library. - docs + api/openapi.yaml: corrected to the real embeddable MCP/library surface instead of a non-existent CLI binary. - CI: pinned gofumpt v0.10.0; aligned golangci-lint version between CI and local tooling. - Fixed sgconfig.yaml reference to a non-existent tests dir; corrected stale internal/output/sarif.go path in CHANGELOG/PR template. Verified: go build/vet/test pass; gofumpt clean; golangci-lint 0 issues.
1 parent f570449 commit f127a3a

9 files changed

Lines changed: 26 additions & 31 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
## SARIF compatibility
4141

4242
<!--
43-
Did you change `sarif.go` or `internal/output/sarif.go`?
43+
Did you change `sarif.go` or `internal/output/output.go` (the SARIF formatter)?
4444
4545
- If yes: confirm the output still validates against the SARIF 2.1.0
4646
schema and call out any new fields, especially in `tool.driver`.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: git clone --depth=1 https://github.com/GrayCodeAI/hawk.git ../hawk
5656
- name: gofumpt diff
5757
run: |
58-
go install mvdan.cc/gofumpt@latest
58+
go install mvdan.cc/gofumpt@v0.10.0
5959
out=$(gofumpt -l .)
6060
if [ -n "$out" ]; then
6161
echo "::error::gofumpt would reformat the following files:"

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1818
- `sarif.go`: `Driver.Version`/`Driver.SemanticVersion``"0.1.0"`
1919
(the SARIF spec version remains `"2.1.0"` — that's a different
2020
field; it identifies the SARIF format, not the tool)
21-
- `internal/output/sarif.go`: same fix in the duplicated SARIF code
21+
- `internal/output/output.go`: same fix in the duplicated SARIF code
22+
(`FormatSARIF` driver-version site)
2223

2324
### Added
2425
- Numeric confidence scoring (0.0-1.0) on every finding

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bench: ## Run benchmarks.
6666
# Quality gates.
6767
# ---------------------------------------------------------------------------
6868
fmt: ## Format source files (gofumpt + goimports).
69-
@command -v $(GOFUMPT) >/dev/null 2>&1 || (echo "install: go install mvdan.cc/gofumpt@latest" && exit 1)
69+
@command -v $(GOFUMPT) >/dev/null 2>&1 || (echo "install: go install mvdan.cc/gofumpt@v0.10.0" && exit 1)
7070
@command -v $(GOIMPORTS) >/dev/null 2>&1 || (echo "install: go install golang.org/x/tools/cmd/goimports@latest" && exit 1)
7171
$(GOFUMPT) -w .
7272
$(GOIMPORTS) -w .
@@ -75,11 +75,11 @@ vet: ## Run go vet.
7575
go vet ./...
7676

7777
lint: ## Run golangci-lint.
78-
@command -v $(GOLANGCI) >/dev/null 2>&1 || (echo "install: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest" && exit 1)
78+
@command -v $(GOLANGCI) >/dev/null 2>&1 || (echo "install: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.0" && exit 1)
7979
$(GOLANGCI) run ./... --timeout=5m
8080

8181
lint-fix: ## Run golangci-lint with --fix.
82-
@command -v $(GOLANGCI) >/dev/null 2>&1 || (echo "install: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest" && exit 1)
82+
@command -v $(GOLANGCI) >/dev/null 2>&1 || (echo "install: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.0" && exit 1)
8383
$(GOLANGCI) run ./... --fix --timeout=5m
8484

8585
security: ## Run govulncheck.

api/openapi.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ info:
1515
contact:
1616
url: https://github.com/GrayCodeAI/sight
1717

18-
# No HTTP server by default — MCP uses stdio transport.
19-
# HTTP transport is available via: sight mcp --transport http --addr 127.0.0.1:8080
18+
# sight ships no standalone binary. The MCP server is embedded by the host
19+
# program (e.g. hawk), which injects a Provider and starts a transport:
20+
# srv := mcp.New(provider, opts...)
21+
# srv.ServeStdio() // stdio transport (default)
22+
# srv.ServeHTTP("127.0.0.1:8080") // streamable HTTP transport, served at /mcp
2023

2124
tags:
2225
- name: review
@@ -26,9 +29,10 @@ tags:
2629

2730
x-mcp-server:
2831
transport: stdio
29-
binary: sight
30-
start_command: ["sight", "mcp"]
31-
http_transport_command: ["sight", "mcp", "--transport", "http", "--addr", "127.0.0.1:8080"]
32+
package: github.com/GrayCodeAI/sight/mcp
33+
constructor: mcp.New(provider, opts...)
34+
serve_stdio: mcp.Server.ServeStdio()
35+
serve_http: mcp.Server.ServeHTTP("127.0.0.1:8080") # served at /mcp
3236

3337
x-mcp-tools:
3438
sight_review:

deploy/docker/docker-compose.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/architecture.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sight is an AI-powered code review library for Go. It parses unified diffs, enri
2424
```
2525
sight/
2626
├── api/openapi.yaml 📜 MCP tool surface reference
27-
├── cmd/sight/main.go 🖥️ CLI entry (mcp, taint subcommands)
27+
├── examples/basic/main.go 🧪 Library usage example (Review with a mock provider)
2828
├── sight.go 📤 Public API: Review(), Finding, Result, Stats
2929
├── reviewer.go 🔄 Reviewer: parallel concern orchestration
3030
├── options.go ⚙️ config, With* functions, presets
@@ -93,9 +93,13 @@ type Provider interface {
9393

9494
## 🔌 MCP Server
9595

96-
```bash
97-
sight mcp # 📡 stdio transport
98-
sight mcp --transport http --addr :8080 # 🌐 HTTP transport
96+
sight ships no standalone binary — the MCP server is an embeddable component
97+
that the host program (e.g. `hawk`) starts after injecting a `Provider`:
98+
99+
```go
100+
srv := mcp.New(myProvider, sight.Thorough)
101+
srv.ServeStdio() // 📡 stdio transport
102+
srv.ServeHTTP("127.0.0.1:8080") // 🌐 streamable HTTP transport, served at /mcp
99103
```
100104

101105
**Tools:** `sight_review` · `sight_describe` · `sight_improve` · `sight_taint`
@@ -121,4 +125,4 @@ sight mcp --transport http --addr :8080 # 🌐 HTTP transport
121125

122126
**30+ built-in rules** run without LLM overhead — hardcoded secret patterns, SQL injection sinks, unsafe deserialization, etc. Fused with LLM results.
123127

124-
**Taint analysis** (`sight taint --path .`) uses SSA-based cross-function tracking to detect source→sink data flows. Sources, sinks, and sanitizers are configurable.
128+
**Taint analysis** (exposed via the `sight_taint` MCP tool and the taint-analysis API) uses SSA-based cross-function tracking to detect source→sink data flows. Sources, sinks, and sanitizers are configurable.

lefthook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pre-commit:
2323
glob: "*.go"
2424
run: |
2525
if ! command -v gofumpt >/dev/null 2>&1; then
26-
echo "lefthook: gofumpt not installed (go install mvdan.cc/gofumpt@latest)"; exit 1
26+
echo "lefthook: gofumpt not installed (go install mvdan.cc/gofumpt@v0.10.0)"; exit 1
2727
fi
2828
gofumpt -w {staged_files}
2929
stage_fixed: true

sgconfig.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
ruleDirs:
22
- rules
3-
testDirs:
4-
- tests

0 commit comments

Comments
 (0)