From 134291d27d32c38fc56f25ccfdf54f737933c65d Mon Sep 17 00:00:00 2001 From: Charles Green Date: Mon, 4 May 2026 00:13:53 +0900 Subject: [PATCH] chore: add minimal cmd/aixgate/main.go stub to keep go.mod honest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bootstrap go.mod required github.com/aixgo-dev/aixgo v0.7.4 with zero source files importing it. CI ran `go mod tidy` and rewrote go.mod to remove the unused require, then `git diff --exit-code` failed — which broke the test, lint, and govulncheck jobs. Add a minimal cmd/aixgate/main.go that: - Blank-imports github.com/aixgo-dev/aixgo/pkg/security (consumes the declared dependency so tidy doesn't strip it) - Reserves the binary entry point that the GoReleaser config and CLAUDE.md already document - Prints a version/status banner directing users to docs/PRD.md until v0.1 is ready `go mod tidy` now resolves cleanly, pulling in three indirect deps through pkg/security. All four CI jobs (Lint, Test ubuntu, Test macos, Vulnerability Scan) should pass. Co-Authored-By: Claude Opus 4.7 (1M context) --- cmd/aixgate/main.go | 27 +++++++++++++++++++++++++++ go.mod | 6 ++++++ go.sum | 9 +++++++++ 3 files changed, 42 insertions(+) create mode 100644 cmd/aixgate/main.go diff --git a/cmd/aixgate/main.go b/cmd/aixgate/main.go new file mode 100644 index 0000000..a758428 --- /dev/null +++ b/cmd/aixgate/main.go @@ -0,0 +1,27 @@ +// Package main is the entry point for the aixgate CLI. +// +// Aixgate is a deny-by-default sandbox for AI coding agents. The v0.1 +// implementation is in flight per docs/PRD.md §15; this file is a +// placeholder so go.mod stays consistent and CI has something to lint. +package main + +import ( + "fmt" + + // Reserved consumption of aixgo's public API — aixgate will use + // pkg/security helpers in v0.1 (input validation, SSRF protection). + // The blank import keeps go.mod honest until the real call sites land. + _ "github.com/aixgo-dev/aixgo/pkg/security" +) + +// Version is set at build time by GoReleaser via -ldflags. +var ( + Version = "dev" + Commit = "none" + Date = "unknown" +) + +func main() { + fmt.Printf("aixgate %s (commit %s, built %s)\n", Version, Commit, Date) + fmt.Println("Aixgate v0.1 is in active development. See https://github.com/aixgo-dev/aixgate/blob/main/docs/PRD.md") +} diff --git a/go.mod b/go.mod index 8d1d108..385cf10 100644 --- a/go.mod +++ b/go.mod @@ -3,3 +3,9 @@ module github.com/aixgo-dev/aixgate go 1.26 require github.com/aixgo-dev/aixgo v0.7.4 + +require ( + github.com/google/uuid v1.6.0 // indirect + golang.org/x/time v0.15.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum index e433f0d..c9f47a7 100644 --- a/go.sum +++ b/go.sum @@ -1 +1,10 @@ +github.com/aixgo-dev/aixgo v0.7.4 h1:m6kiYZvEnPYQYRXPnnOjeENYDS1ggpD2qhqS5Zg93cU= github.com/aixgo-dev/aixgo v0.7.4/go.mod h1:Fmufg6PkU/A2Y7ebJFa0NLAJZNlZqd9CyVmwwPF6lDo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= +golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=