feat(deps): add core dependencies #128

Merged
fuzzy merged 1 commit from feat/add-core-dependencies into main 2026-08-02 07:37:34 +00:00
Owner

What

Add the core dependency set for thwap-pagesd and wire each into its skeleton package so the module builds and vendoring is complete:

  • code.gitea.io/sdk/gitea v0.25.1 — Forgejo/Gitea client, wired into internal/forgejo (NewClient(baseURL, token))
  • k8s.io/client-go v0.36.3 — Kubernetes clientset, wired into internal/kubernetes (NewClient() with in-cluster/kubeconfig fallback)
  • github.com/gin-gonic/gin v1.12.0 — HTTP server, wired into internal/httpapi (NewRouter())
  • github.com/spf13/viper v1.21.0 — configuration, wired into internal/config (New())
  • go.uber.org/zap v1.28.0 — logging, wired into logging (New(level))
  • cmd/thwap-pagesd/main.go wires logger, config, and router at startup

All dependencies vendored per THWAP policy (go mod vendor, 79MB / ~5300 files). Bump CI GO_VERSION to 1.26 (required by gitea SDK v0.25.1 and client-go v0.36.3; go.mod directive is now go 1.26.0).

Why

Phase 1 task #13 — the core dependency set that later roadmap phases (Forgejo integration, Kubernetes integration, HTTP API, config system, logging) build on.

Testing

  • go mod tidy — all 5 direct deps retained (each genuinely imported)
  • go mod vendor
  • go vet ./...
  • go test -race ./...
  • go build ./cmd/thwap-pagesd
  • gofmt -l ./cmd ./internal clean
  • golangci-lint run — 0 issues
  • pre-commit hooks all pass

Breaking Changes

None.

Notes

  • go 1.25 directive bumped to go 1.26.0 — satisfies roadmap issue #2 ("Go 1.24 or later").
  • Issues #8–#13 were closed via the Forgejo API as part of this task per the workflow.

Closes #8
Closes #9
Closes #10
Closes #11
Closes #12
Closes #13

## What Add the core dependency set for `thwap-pagesd` and wire each into its skeleton package so the module builds and vendoring is complete: - `code.gitea.io/sdk/gitea` v0.25.1 — Forgejo/Gitea client, wired into `internal/forgejo` (`NewClient(baseURL, token)`) - `k8s.io/client-go` v0.36.3 — Kubernetes clientset, wired into `internal/kubernetes` (`NewClient()` with in-cluster/kubeconfig fallback) - `github.com/gin-gonic/gin` v1.12.0 — HTTP server, wired into `internal/httpapi` (`NewRouter()`) - `github.com/spf13/viper` v1.21.0 — configuration, wired into `internal/config` (`New()`) - `go.uber.org/zap` v1.28.0 — logging, wired into `logging` (`New(level)`) - `cmd/thwap-pagesd/main.go` wires logger, config, and router at startup All dependencies vendored per THWAP policy (`go mod vendor`, 79MB / ~5300 files). Bump CI `GO_VERSION` to 1.26 (required by gitea SDK v0.25.1 and client-go v0.36.3; go.mod directive is now `go 1.26.0`). ## Why Phase 1 task #13 — the core dependency set that later roadmap phases (Forgejo integration, Kubernetes integration, HTTP API, config system, logging) build on. ## Testing - [x] `go mod tidy` — all 5 direct deps retained (each genuinely imported) - [x] `go mod vendor` - [x] `go vet ./...` - [x] `go test -race ./...` - [x] `go build ./cmd/thwap-pagesd` - [x] `gofmt -l ./cmd ./internal` clean - [x] `golangci-lint run` — 0 issues - [x] pre-commit hooks all pass ## Breaking Changes None. ## Notes - `go 1.25` directive bumped to `go 1.26.0` — satisfies roadmap issue #2 ("Go 1.24 or later"). - Issues #8–#13 were closed via the Forgejo API as part of this task per the workflow. Closes #8 Closes #9 Closes #10 Closes #11 Closes #12 Closes #13
feat(deps): add core dependencies
All checks were successful
Test and Release / lint (pull_request) Successful in 24s
Test and Release / test (pull_request) Successful in 57s
e4e68749fe
Add the core dependency set for thwap-pagesd and wire each into its
skeleton package so the module builds and vendoring is complete:

- code.gitea.io/sdk/gitea v0.25.1 (Forgejo/Gitea client)
- k8s.io/client-go v0.36.3 (Kubernetes clientset)
- github.com/gin-gonic/gin v1.12.0 (HTTP server)
- github.com/spf13/viper v1.21.0 (configuration)
- go.uber.org/zap v1.28.0 (logging)

Vendor all dependencies per THWAP policy (go mod vendor). Bump CI
GO_VERSION to 1.26, required by the gitea SDK and client-go. Mark
task done in ROADMAP.md.

closes #8
closes #9
closes #10
closes #11
closes #12
closes #13
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-08-02 07:34:39 +00:00
the.auditor left a comment

Review Summary

Verified locally on the PR head (e4e6874): go build ./..., go vet ./..., go test -race ./..., go mod verify, gofmt and golangci-lint run all pass clean. Also cross-compiled the full release matrix (linux/freebsd/openbsd × amd64/arm64, CGO_ENABLED=0) — all six targets build.

Dependencies are all genuinely imported and wired into their skeleton packages. go 1.26.0 directive matches the bumped CI GO_VERSION: '1.26'. Error paths propagate correctly. The in-cluster/kubeconfig fallback in internal/kubernetes and the viper/gin/zap wiring are all standard patterns.

No blocking issues.

Non-blocking observations (not blocking this merge):

  1. internal/forgejo/forgejo.go:20 and internal/kubernetes/kubernetes.go:21 return raw errors — consider wrapping with context (fmt.Errorf("new forgejo client: %w", err)) per the centralized error convention as these grow.
  2. cmd/thwap-pagesd/main.go:17 uses stdlib log.Fatalf — fine for fatal init errors at the entrypoint, but note os.Exit skips the deferred logger.Sync(). Acceptable here.
  3. internal/httpapi/server.go uses gin's Logger() middleware, which writes to stdout rather than the logging package — revisit when the config system lands.
  4. The "info" level in main.go is hardcoded — naturally belongs in config (later task).

Approving.

## Review Summary Verified locally on the PR head (`e4e6874`): `go build ./...`, `go vet ./...`, `go test -race ./...`, `go mod verify`, `gofmt` and `golangci-lint run` all pass clean. Also cross-compiled the full release matrix (`linux`/`freebsd`/`openbsd` × `amd64`/`arm64`, `CGO_ENABLED=0`) — all six targets build. Dependencies are all genuinely imported and wired into their skeleton packages. `go 1.26.0` directive matches the bumped CI `GO_VERSION: '1.26'`. Error paths propagate correctly. The in-cluster/kubeconfig fallback in `internal/kubernetes` and the viper/gin/zap wiring are all standard patterns. **No blocking issues.** Non-blocking observations (not blocking this merge): 1. `internal/forgejo/forgejo.go:20` and `internal/kubernetes/kubernetes.go:21` return raw errors — consider wrapping with context (`fmt.Errorf("new forgejo client: %w", err)`) per the centralized error convention as these grow. 2. `cmd/thwap-pagesd/main.go:17` uses stdlib `log.Fatalf` — fine for fatal init errors at the entrypoint, but note `os.Exit` skips the deferred `logger.Sync()`. Acceptable here. 3. `internal/httpapi/server.go` uses gin's `Logger()` middleware, which writes to stdout rather than the `logging` package — revisit when the config system lands. 4. The `"info"` level in `main.go` is hardcoded — naturally belongs in config (later task). Approving.
fuzzy merged commit e4e68749fe into main 2026-08-02 07:37:34 +00:00
fuzzy deleted branch feat/add-core-dependencies 2026-08-02 07:37:36 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/thwap-pagesd!128
No description provided.