From 43342629bc63f7875f415c3173de81dc93ea807d Mon Sep 17 00:00:00 2001 From: Felicity Matthews <116486687+FelicityMatt@users.noreply.github.com> Date: Fri, 28 Aug 2026 10:51:10 +1000 Subject: [PATCH 1/2] Add devbox setup for local development Bootstraps devbox with pinned go and golangci-lint versions matching .tool-versions, plus devbox run check/verify scripts mirroring CI. Co-Authored-By: Claude Sonnet 5 --- .envrc | 9 +++++ .gitignore | 3 ++ README.md | 12 ++++++ devbox.json | 19 ++++++++++ devbox.lock | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 148 insertions(+) create mode 100644 .envrc create mode 100644 devbox.json create mode 100644 devbox.lock diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..581b8184 --- /dev/null +++ b/.envrc @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Automatically sets up your devbox environment whenever you cd into this +# directory via our direnv integration: + +eval "$(devbox generate direnv --print-envrc)" + +# check out https://www.jetify.com/docs/devbox/ide_configuration/direnv/ +# for more details diff --git a/.gitignore b/.gitignore index 7a0ffed3..722872e3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ /dist **/.claude/*.local.json **/CLAUDE.local.md + +# devbox +.devbox/ diff --git a/README.md b/README.md index b4bd4af5..cf14e65a 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,18 @@ docker run --env HELLO=local $image env # HELLO=local ``` +## Local development + +Ensure devbox is setup as per [Local Dev Environments (LDEs) - Getting Started](https://cultureamp.atlassian.net/wiki/spaces/DE/pages/3342434338/Devbox+setup). + +Run linting: + + devbox run check + +Run the full test suite (also lints and checks `go.mod`/`go.sum` are tidy): + + devbox run verify + [aws-env]: https://github.com/Droplr/aws-env [chamber]: https://github.com/segmentio/chamber [godotenv]: https://github.com/joho/godotenv diff --git a/devbox.json b/devbox.json new file mode 100644 index 00000000..a578adc0 --- /dev/null +++ b/devbox.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.18.0/.schema/devbox.schema.json", + "packages": [ + "go@1.26.4", + "golangci-lint@2.12.2" + ], + "shell": { + "scripts": { + "check": [ + "golangci-lint run --timeout=2m" + ], + "verify": [ + "make ensure-deps", + "golangci-lint run --timeout=2m", + "make test" + ] + } + } +} diff --git a/devbox.lock b/devbox.lock new file mode 100644 index 00000000..f0eada8f --- /dev/null +++ b/devbox.lock @@ -0,0 +1,105 @@ +{ + "lockfile_version": "1", + "packages": { + "github:NixOS/nixpkgs/nixpkgs-unstable": { + "last_modified": "2026-08-22T10:28:36Z", + "resolved": "github:NixOS/nixpkgs/c8f90650c15282fa8656a041bfbbd2403997a9a7?lastModified=1787394516" + }, + "go@1.26.4": { + "last_modified": "2026-07-08T21:13:06Z", + "resolved": "github:NixOS/nixpkgs/389ed85304b281ca7f306cf8a1eb4378651ca44e#go", + "source": "devbox-search", + "version": "1.26.4", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/38idfbqyw3p8xaslv6bnrig62pj7qy6i-go-1.26.4", + "default": true + } + ], + "store_path": "/nix/store/38idfbqyw3p8xaslv6bnrig62pj7qy6i-go-1.26.4" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/z8b7c0h6g8dnv6vlxh7fha1d66krvgn9-go-1.26.4", + "default": true + } + ], + "store_path": "/nix/store/z8b7c0h6g8dnv6vlxh7fha1d66krvgn9-go-1.26.4" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/h0z6ghmi3cihlbm163d72xs9p9nn04a1-go-1.26.4", + "default": true + } + ], + "store_path": "/nix/store/h0z6ghmi3cihlbm163d72xs9p9nn04a1-go-1.26.4" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/1xklj6dmgcpgz60c9w2ynaq7ynzfsrrq-go-1.26.4", + "default": true + } + ], + "store_path": "/nix/store/1xklj6dmgcpgz60c9w2ynaq7ynzfsrrq-go-1.26.4" + } + } + }, + "golangci-lint@2.12.2": { + "last_modified": "2026-08-12T11:28:58Z", + "resolved": "github:NixOS/nixpkgs/044bfe75bfe4c7bbe043dc17b5e42ea823b84a09#golangci-lint", + "source": "devbox-search", + "version": "2.12.2", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/cqawpcdr4iif6g81i9flza941zxzgac5-golangci-lint-2.12.2", + "default": true + } + ], + "store_path": "/nix/store/cqawpcdr4iif6g81i9flza941zxzgac5-golangci-lint-2.12.2" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/dyiky0qyz8p8z3c54rz5z2qdwbrf05c7-golangci-lint-2.12.2", + "default": true + } + ], + "store_path": "/nix/store/dyiky0qyz8p8z3c54rz5z2qdwbrf05c7-golangci-lint-2.12.2" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/w8c3i6vmxnnj0xixvjsa9lva3rcd2rvs-golangci-lint-2.12.2", + "default": true + } + ], + "store_path": "/nix/store/w8c3i6vmxnnj0xixvjsa9lva3rcd2rvs-golangci-lint-2.12.2" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/yl3hlickshlf7smf4iql5lalmhi6hhqg-golangci-lint-2.12.2", + "default": true + } + ], + "store_path": "/nix/store/yl3hlickshlf7smf4iql5lalmhi6hhqg-golangci-lint-2.12.2" + } + } + } + } +} From ca0cff8fcd0b41b2697d5e76bd814505edd94d30 Mon Sep 17 00:00:00 2001 From: Felicity Matthews <116486687+FelicityMatt@users.noreply.github.com> Date: Fri, 28 Aug 2026 13:45:13 +1000 Subject: [PATCH 2/2] Align devbox setup with dev-env-devbox-setup-2 skill Scope this down to basic setup only: drop check/verify scripts and the README section (both out of scope for that skill), stop gitignoring .devbox/ (devbox already ignores it), and set CGO_ENABLED=0 explicitly since this is a pure Go CLI with no cgo usage. Co-Authored-By: Claude Sonnet 5 --- .gitignore | 3 --- README.md | 12 ------------ devbox.json | 13 ++----------- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 722872e3..7a0ffed3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,3 @@ /dist **/.claude/*.local.json **/CLAUDE.local.md - -# devbox -.devbox/ diff --git a/README.md b/README.md index cf14e65a..b4bd4af5 100644 --- a/README.md +++ b/README.md @@ -89,18 +89,6 @@ docker run --env HELLO=local $image env # HELLO=local ``` -## Local development - -Ensure devbox is setup as per [Local Dev Environments (LDEs) - Getting Started](https://cultureamp.atlassian.net/wiki/spaces/DE/pages/3342434338/Devbox+setup). - -Run linting: - - devbox run check - -Run the full test suite (also lints and checks `go.mod`/`go.sum` are tidy): - - devbox run verify - [aws-env]: https://github.com/Droplr/aws-env [chamber]: https://github.com/segmentio/chamber [godotenv]: https://github.com/joho/godotenv diff --git a/devbox.json b/devbox.json index a578adc0..ada03c70 100644 --- a/devbox.json +++ b/devbox.json @@ -4,16 +4,7 @@ "go@1.26.4", "golangci-lint@2.12.2" ], - "shell": { - "scripts": { - "check": [ - "golangci-lint run --timeout=2m" - ], - "verify": [ - "make ensure-deps", - "golangci-lint run --timeout=2m", - "make test" - ] - } + "env": { + "CGO_ENABLED": "0" } }