From 23d1f16f54d5cc573d52261d0c0dba085b822610 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Mon, 1 Jun 2026 15:24:30 +0200 Subject: [PATCH 1/2] refactor: replace Nix flake with mise Drop the Nix devshell/flake in favor of mise for toolchain management. Tasks stay in the Makefile, which now calls treefmt/gofumpt directly instead of `nix fmt` / `nix flake check`. - Add mise.toml (+ mise.lock) provisioning Go, gopls, golangci-lint, gofumpt, treefmt, actionlint, zizmor, mdformat (uv) and mdsh (cargo). - Add treefmt.toml replacing the treefmt config previously inlined in flake.nix (gofmt, mdsh, mdformat, actionlint, zizmor; nixfmt dropped). - Makefile: `fmt` -> treefmt, `check` -> treefmt --fail-on-change. - CI: swap the Nix setup/cache steps for jdx/mise-action. - Remove the nix dependabot ecosystem; update AGENTS.md/RELEASING.md. - Delete flake.nix and flake.lock. Change-Id: I4b371372980065cfe309e23d2c9366df76d4717f Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Thomas Kosiewski --- .github/dependabot.yaml | 14 -- .github/workflows/ci.yaml | 23 +--- .gitignore | 6 +- AGENTS.md | 7 +- Makefile | 17 +-- RELEASING.md | 7 +- flake.lock | 82 ------------ flake.nix | 68 ---------- mise.lock | 261 ++++++++++++++++++++++++++++++++++++++ mise.toml | 31 +++++ treefmt.toml | 29 +++++ 11 files changed, 344 insertions(+), 201 deletions(-) delete mode 100644 flake.lock delete mode 100644 flake.nix create mode 100644 mise.lock create mode 100644 mise.toml create mode 100644 treefmt.toml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index e2b3f82..039e3e0 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -34,17 +34,3 @@ updates: - dependency-name: "*" update-types: - version-update:semver-patch - - - package-ecosystem: nix - directory: "/" - schedule: - interval: "weekly" - time: "06:00" - timezone: "America/Chicago" - labels: [] - commit-message: - prefix: "chore" - groups: - nix: - patterns: - - "*" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8a29321..e8c4ab8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,25 +31,14 @@ jobs: fetch-tags: true persist-credentials: false - - name: Setup Nix - uses: nixbuild/nix-quick-install-action@2c9db80fb984ceb1bcaa77cdda3fdf8cfba92035 # v34 - - - name: Cache Nix store - uses: nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7.0.2 + - name: Setup mise + uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1 with: - primary-key: nix-acp-go-sdk-${{ runner.os }}-${{ hashFiles('**/*.nix', 'flake.lock') }} - restore-prefixes-first-match: nix-acp-go-sdk-${{ runner.os }}- - gc-max-store-size-linux: 2G - purge: true - purge-prefixes: nix-acp-go-sdk-${{ runner.os }}- - purge-created: 0 - purge-primary-key: never + install: true + cache: true - name: Check formatting (treefmt) - run: nix develop .# --command treefmt --fail-on-change + run: mise exec -- make check - name: Make tests - run: nix develop .# --command make test - - - name: Nix flake checks - run: nix flake check + run: mise exec -- make test diff --git a/.gitignore b/.gitignore index 0382546..cb8a0e0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,6 @@ .gocache .gopath -# Nix files -.envrc -.direnv +# mise +mise.local.toml +.mise.local.toml diff --git a/AGENTS.md b/AGENTS.md index b554443..6aa9c3c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,12 +9,13 @@ Core SDK code lives at the repo root (`agent.go`, `client.go`, `connection.go`, - `go test ./...` exercises unit tests across packages. - `go run ./example/agent` and `go run ./example/client` provide quick manual validation of agent/client behavior. - `make test` runs `go test` and ensures all examples still build. -- `make fmt` delegates to `nix fmt` so Go, Nix, and Markdown stay formatted consistently. -- `nix flake check` validates the flake definition and linting hooks used in CI. +- `make fmt` runs `treefmt` so Go and Markdown stay formatted consistently. +- `make check` runs `treefmt --fail-on-change` plus the README guard used in CI. +- `mise install` provisions the toolchain (Go, gopls, golangci-lint, treefmt, etc.); run it once after cloning. ## Coding Style & Naming Conventions -Target Go 1.21 idioms: tabs for indentation, short receiver names, and CamelCase for exported symbols (`AgentLoader`), lowerCamelCase for unexported helpers. Prefer table-driven tests and keep files focused on a single protocol concern. Run `nix fmt` or `gofumpt -w .` to normalize spacing, imports, and composite literals before sending a change. +Target Go 1.21 idioms: tabs for indentation, short receiver names, and CamelCase for exported symbols (`AgentLoader`), lowerCamelCase for unexported helpers. Prefer table-driven tests and keep files focused on a single protocol concern. Run `make fmt` or `gofumpt -w .` to normalize spacing, imports, and composite literals before sending a change. ## Testing Guidelines diff --git a/Makefile b/Makefile index 9a11951..55cdc5d 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ MDSH ?= mdsh version: README.md schema/meta.json schema/schema.json schema/meta.unstable.json schema/schema.unstable.json cd cmd/generate && env -u GOPATH -u GOMODCACHE go run . - env -u GOPATH -u GOMODCACHE go run mvdan.cc/gofumpt@latest -w . + gofumpt -w . touch $@ echo $(ACP_VERSION) > $@ @@ -49,21 +49,18 @@ schema/schema.unstable.json: schema/version fi README.md: schema/version - @command -v $(MDSH) >/dev/null || { echo "mdsh not found; run 'nix develop' or install it." 1>&2; exit 1; } + @command -v $(MDSH) >/dev/null || { echo "mdsh not found; run 'mise install' or install it." 1>&2; exit 1; } $(MDSH) --input README.md -.PHONY: guard-readme -guard-readme: - @command -v $(MDSH) >/dev/null || { echo "mdsh not found; run 'nix develop' or install it." 1>&2; exit 1; } - $(MDSH) --frozen --input README.md - .PHONY: fmt fmt: - nix fmt + treefmt +# treefmt runs mdsh + mdformat over the markdown, so --fail-on-change also +# verifies README.md is regenerated and in sync (replacing the old mdsh guard). .PHONY: check -check: guard-readme - nix flake check +check: + treefmt --fail-on-change .PHONY: test test: $(GO_FILES) diff --git a/RELEASING.md b/RELEASING.md index 9b2a67b..088a7d1 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -7,11 +7,10 @@ code, helper APIs, and library version remain in sync. ## Prerequisites -- Go 1.21 or newer. - `make`, `curl`, and `git` in your `PATH`. -- Nix is required for `make fmt` and `make check` (they invoke `nix fmt` and - `nix flake check`). Use `nix develop` or an equivalent environment before - running these targets. +- [mise](https://mise.jdx.dev) for the toolchain. Run `mise install` once to + provision Go, `treefmt`, and the formatters/linters that `make fmt` and + `make check` invoke. - The repository must have an Actions secret named `ANTHROPIC_API_KEY` so the release-notes workflow can update GitHub Release bodies after publication. diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 794cdd6..0000000 --- a/flake.lock +++ /dev/null @@ -1,82 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1778430510, - "narHash": "sha256-Ti+ZBvW6yrWWAg2szExVTwCd4qOJ3KlVr1tFHfyfi8Q=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "8fd9daa3db09ced9700431c5b7ad0e8ba199b575", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "treefmt-nix": "treefmt-nix" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1775636079, - "narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 5e5ed08..0000000 --- a/flake.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - description = "Devshell for ACP Go SDK"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; - flake-utils.url = "github:numtide/flake-utils"; - treefmt-nix = { - url = "github:numtide/treefmt-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = - { - self, - nixpkgs, - flake-utils, - treefmt-nix, - }: - flake-utils.lib.eachDefaultSystem ( - system: - let - pkgs = import nixpkgs { - inherit system; - }; - - treefmtEval = treefmt-nix.lib.evalModule pkgs { - projectRootFile = "flake.nix"; - programs = { - actionlint.enable = true; - gofmt.enable = true; - mdformat.enable = true; - mdsh.enable = true; - nixfmt.enable = true; - zizmor.enable = true; - }; - }; - formatter = treefmtEval.config.build.wrapper; - in - { - inherit formatter; - - checks = { - formatting = treefmtEval.config.build.check self; - }; - - devShells.default = pkgs.mkShell { - packages = with pkgs; [ - # Go toolchain and editor helpers - go_1_24 - gopls - golangci-lint - - # Build and release tooling - git - gnumake - curl - - # Misc developer conveniences - mdsh - - # Tree-wide formatter wrapper (treefmt) - formatter - ]; - }; - } - ); -} diff --git a/mise.lock b/mise.lock new file mode 100644 index 0000000..61e51d6 --- /dev/null +++ b/mise.lock @@ -0,0 +1,261 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html + +[[tools.actionlint]] +version = "1.7.12" +backend = "aqua:rhysd/actionlint" + +[tools.actionlint."platforms.linux-arm64"] +checksum = "sha256:325e971b6ba9bfa504672e29be93c24981eeb1c07576d730e9f7c8805afff0c6" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_arm64.tar.gz" +provenance = "github-attestations" + +[tools.actionlint."platforms.linux-arm64-musl"] +checksum = "sha256:325e971b6ba9bfa504672e29be93c24981eeb1c07576d730e9f7c8805afff0c6" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_arm64.tar.gz" +provenance = "github-attestations" + +[tools.actionlint."platforms.linux-x64"] +checksum = "sha256:8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz" +provenance = "github-attestations" + +[tools.actionlint."platforms.linux-x64-musl"] +checksum = "sha256:8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz" +provenance = "github-attestations" + +[tools.actionlint."platforms.macos-arm64"] +checksum = "sha256:aba9ced2dee8d27fecca3dc7feb1a7f9a52caefa1eb46f3271ea66b6e0e6953f" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_darwin_arm64.tar.gz" +provenance = "github-attestations" + +[tools.actionlint."platforms.macos-x64"] +checksum = "sha256:5b44c3bc2255115c9b69e30efc0fecdf498fdb63c5d58e17084fd5f16324c644" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_darwin_amd64.tar.gz" +provenance = "github-attestations" + +[tools.actionlint."platforms.windows-x64"] +checksum = "sha256:6e7241b51e6817ea6a047693d8e6fed13b31819c9a0dd6c5a726e1592d22f6e9" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_windows_amd64.zip" +provenance = "github-attestations" + +[[tools."aqua:numtide/treefmt"]] +version = "2.5.0" +backend = "aqua:numtide/treefmt" + +[tools."aqua:numtide/treefmt"."platforms.linux-arm64"] +checksum = "sha256:fce47c6fc8cb6a87461b1309fc6d3102eade64b6fe0c9b86678b4eed9eb00e57" +url = "https://github.com/numtide/treefmt/releases/download/v2.5.0/treefmt_2.5.0_linux_arm64.tar.gz" + +[tools."aqua:numtide/treefmt"."platforms.linux-arm64-musl"] +checksum = "sha256:fce47c6fc8cb6a87461b1309fc6d3102eade64b6fe0c9b86678b4eed9eb00e57" +url = "https://github.com/numtide/treefmt/releases/download/v2.5.0/treefmt_2.5.0_linux_arm64.tar.gz" + +[tools."aqua:numtide/treefmt"."platforms.linux-x64"] +checksum = "sha256:95f707bf9666d08b50888b116768fd77f042ad5af92aa3b795f063160e72758f" +url = "https://github.com/numtide/treefmt/releases/download/v2.5.0/treefmt_2.5.0_linux_amd64.tar.gz" + +[tools."aqua:numtide/treefmt"."platforms.linux-x64-musl"] +checksum = "sha256:95f707bf9666d08b50888b116768fd77f042ad5af92aa3b795f063160e72758f" +url = "https://github.com/numtide/treefmt/releases/download/v2.5.0/treefmt_2.5.0_linux_amd64.tar.gz" + +[tools."aqua:numtide/treefmt"."platforms.macos-arm64"] +checksum = "sha256:a3cdfa8e92eb7c302bb851f73800187e75d5789f2a75835b403b158d77b2c376" +url = "https://github.com/numtide/treefmt/releases/download/v2.5.0/treefmt_2.5.0_darwin_arm64.tar.gz" + +[tools."aqua:numtide/treefmt"."platforms.macos-x64"] +checksum = "sha256:21388b1f7d6c2f572e1ce9231f7dfc08f80a062438908791ab078c1d76b10a49" +url = "https://github.com/numtide/treefmt/releases/download/v2.5.0/treefmt_2.5.0_darwin_amd64.tar.gz" + +[[tools."cargo:mdsh"]] +version = "0.7.0" +backend = "cargo:mdsh" + +[[tools.go]] +version = "1.26.3" +backend = "core:go" + +[tools.go."platforms.linux-arm64"] +checksum = "sha256:9d89a3ea57d141c2b22d70083f2c8459ba3890f2d9e818e7e933b75614936565" +url = "https://dl.google.com/go/go1.26.3.linux-arm64.tar.gz" + +[tools.go."platforms.linux-arm64-musl"] +checksum = "sha256:9d89a3ea57d141c2b22d70083f2c8459ba3890f2d9e818e7e933b75614936565" +url = "https://dl.google.com/go/go1.26.3.linux-arm64.tar.gz" + +[tools.go."platforms.linux-x64"] +checksum = "sha256:2b2cfc7148493da5e73981bffbf3353af381d5f93e789c82c79aff64962eb556" +url = "https://dl.google.com/go/go1.26.3.linux-amd64.tar.gz" + +[tools.go."platforms.linux-x64-musl"] +checksum = "sha256:2b2cfc7148493da5e73981bffbf3353af381d5f93e789c82c79aff64962eb556" +url = "https://dl.google.com/go/go1.26.3.linux-amd64.tar.gz" + +[tools.go."platforms.macos-arm64"] +checksum = "sha256:875cf54a15311eee2c99b9dd67c68c4a49351d489ab622bf2cfd28c8f2078d3c" +url = "https://dl.google.com/go/go1.26.3.darwin-arm64.tar.gz" + +[tools.go."platforms.macos-x64"] +checksum = "sha256:278d580b32e299fe4a9c990fcf2d02acfe538c7e551a6ee18f9c7164573d2c63" +url = "https://dl.google.com/go/go1.26.3.darwin-amd64.tar.gz" + +[tools.go."platforms.windows-x64"] +checksum = "sha256:20d2ceafb4ed41b96b879010927b28bc92a5be57a7c1801ce365a9ca51d3224a" +url = "https://dl.google.com/go/go1.26.3.windows-amd64.zip" + +[[tools."go:golang.org/x/tools/gopls"]] +version = "0.22.0" +backend = "go:golang.org/x/tools/gopls" + +[[tools.gofumpt]] +version = "0.10.0" +backend = "aqua:mvdan/gofumpt" + +[tools.gofumpt."platforms.linux-arm64"] +checksum = "sha256:5d239f93b1ed2dfe74d39b25112bb770a04f6581f986d4b4f5d380521e12ca61" +url = "https://github.com/mvdan/gofumpt/releases/download/v0.10.0/gofumpt_v0.10.0_linux_arm64" + +[tools.gofumpt."platforms.linux-arm64-musl"] +checksum = "sha256:5d239f93b1ed2dfe74d39b25112bb770a04f6581f986d4b4f5d380521e12ca61" +url = "https://github.com/mvdan/gofumpt/releases/download/v0.10.0/gofumpt_v0.10.0_linux_arm64" + +[tools.gofumpt."platforms.linux-x64"] +checksum = "sha256:48ee398ec72afdaca6accb70f5ed741349d5dcccb52c5bb4c4469d698980b186" +url = "https://github.com/mvdan/gofumpt/releases/download/v0.10.0/gofumpt_v0.10.0_linux_amd64" + +[tools.gofumpt."platforms.linux-x64-musl"] +checksum = "sha256:48ee398ec72afdaca6accb70f5ed741349d5dcccb52c5bb4c4469d698980b186" +url = "https://github.com/mvdan/gofumpt/releases/download/v0.10.0/gofumpt_v0.10.0_linux_amd64" + +[tools.gofumpt."platforms.macos-arm64"] +checksum = "sha256:ba4b348e729cba915d5c7dc515774e2f2c7cc5c5ad011de20d34be10e5a2f906" +url = "https://github.com/mvdan/gofumpt/releases/download/v0.10.0/gofumpt_v0.10.0_darwin_arm64" + +[tools.gofumpt."platforms.macos-x64"] +checksum = "sha256:30e5b914a824c3b6bd0480e4f493517012167d380de74643879c50f4aa0c834e" +url = "https://github.com/mvdan/gofumpt/releases/download/v0.10.0/gofumpt_v0.10.0_darwin_amd64" + +[tools.gofumpt."platforms.windows-x64"] +checksum = "sha256:20872b464435512b74678b1155b75bd75220de5737ad8c075b9151c846543697" +url = "https://github.com/mvdan/gofumpt/releases/download/v0.10.0/gofumpt_v0.10.0_windows_amd64.exe" + +[[tools.golangci-lint]] +version = "2.12.2" +backend = "aqua:golangci/golangci-lint" + +[tools.golangci-lint."platforms.linux-arm64"] +checksum = "sha256:44cd40a8c76c86755375adfeea52cfd3533cb43d7bd647771e0ae065e166df3a" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.12.2/golangci-lint-2.12.2-linux-arm64.tar.gz" +provenance = "github-attestations" + +[tools.golangci-lint."platforms.linux-arm64-musl"] +checksum = "sha256:44cd40a8c76c86755375adfeea52cfd3533cb43d7bd647771e0ae065e166df3a" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.12.2/golangci-lint-2.12.2-linux-arm64.tar.gz" +provenance = "github-attestations" + +[tools.golangci-lint."platforms.linux-x64"] +checksum = "sha256:8df580d2670fed8fa984aac0507099af8df275e665215f5c7a2ae3943893a553" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.12.2/golangci-lint-2.12.2-linux-amd64.tar.gz" +provenance = "github-attestations" + +[tools.golangci-lint."platforms.linux-x64-musl"] +checksum = "sha256:8df580d2670fed8fa984aac0507099af8df275e665215f5c7a2ae3943893a553" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.12.2/golangci-lint-2.12.2-linux-amd64.tar.gz" +provenance = "github-attestations" + +[tools.golangci-lint."platforms.macos-arm64"] +checksum = "sha256:a9c54498731b3128f79e090be6110f3e5fffccc617b08142ed244d4126c73f29" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.12.2/golangci-lint-2.12.2-darwin-arm64.tar.gz" +provenance = "github-attestations" + +[tools.golangci-lint."platforms.macos-x64"] +checksum = "sha256:f6f06d94b6241521c53d15450c5209b028270bf966f842afb11c030c79f5bc16" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.12.2/golangci-lint-2.12.2-darwin-amd64.tar.gz" +provenance = "github-attestations" + +[tools.golangci-lint."platforms.windows-x64"] +checksum = "sha256:bd42e3ebc8cb4ececb86941983baaf1dc221bbb04d838e94ce63b49cc91e02bb" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.12.2/golangci-lint-2.12.2-windows-amd64.zip" +provenance = "github-attestations" + +[[tools."pipx:mdformat"]] +version = "1.0.0" +backend = "pipx:mdformat" + +[[tools.rust]] +version = "1.96.0" +backend = "core:rust" + +[[tools.uv]] +version = "0.11.17" +backend = "aqua:astral-sh/uv" + +[tools.uv."platforms.linux-arm64"] +checksum = "sha256:9e5eaf16ffad968fc689f18c2733ace914ed417d4e5572e92d807fd51a90228c" +url = "https://github.com/astral-sh/uv/releases/download/0.11.17/uv-aarch64-unknown-linux-musl.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.linux-arm64-musl"] +checksum = "sha256:9e5eaf16ffad968fc689f18c2733ace914ed417d4e5572e92d807fd51a90228c" +url = "https://github.com/astral-sh/uv/releases/download/0.11.17/uv-aarch64-unknown-linux-musl.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.linux-x64"] +checksum = "sha256:4231a429d4e0f7c1937d8916658c08a7706cd7872afebeb87203a18c2e0dc28e" +url = "https://github.com/astral-sh/uv/releases/download/0.11.17/uv-x86_64-unknown-linux-musl.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.linux-x64-musl"] +checksum = "sha256:4231a429d4e0f7c1937d8916658c08a7706cd7872afebeb87203a18c2e0dc28e" +url = "https://github.com/astral-sh/uv/releases/download/0.11.17/uv-x86_64-unknown-linux-musl.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.macos-arm64"] +checksum = "sha256:2a162f6b90ff3691a2f9cae1622e066a3ce592e110f66670cdcc841324b28226" +url = "https://github.com/astral-sh/uv/releases/download/0.11.17/uv-aarch64-apple-darwin.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.macos-x64"] +checksum = "sha256:6c66e41eaf4d15abeda58d3f268161b6e3f742d98390341b174a7cfc1b48841d" +url = "https://github.com/astral-sh/uv/releases/download/0.11.17/uv-x86_64-apple-darwin.tar.gz" +provenance = "github-attestations" + +[tools.uv."platforms.windows-x64"] +checksum = "sha256:35fc29e03e62f3cda769bc12773f3cb70ce305d0d36c0d8bd0c117dd0b3fcd14" +url = "https://github.com/astral-sh/uv/releases/download/0.11.17/uv-x86_64-pc-windows-msvc.zip" +provenance = "github-attestations" + +[[tools.zizmor]] +version = "1.25.2" +backend = "aqua:zizmorcore/zizmor" + +[tools.zizmor."platforms.linux-arm64"] +checksum = "sha256:4b4b9491112c2a09b318101c0d3349b73af1c4f532e097dd6d0164f2abda760d" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.25.2/zizmor-aarch64-unknown-linux-gnu.tar.gz" +provenance = "github-attestations" + +[tools.zizmor."platforms.linux-arm64-musl"] +provenance = "github-attestations" + +[tools.zizmor."platforms.linux-x64"] +checksum = "sha256:aa1facd105f0d83fe5c55b1adcd9d7417de5d83aa27471f91dc0b66cf3803577" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.25.2/zizmor-x86_64-unknown-linux-gnu.tar.gz" +provenance = "github-attestations" + +[tools.zizmor."platforms.linux-x64-musl"] +provenance = "github-attestations" + +[tools.zizmor."platforms.macos-arm64"] +checksum = "sha256:624ef0e09521aecd862126be0f6d7754669af2646750d68ac48a114be33c3146" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.25.2/zizmor-aarch64-apple-darwin.tar.gz" +provenance = "github-attestations" + +[tools.zizmor."platforms.macos-x64"] +checksum = "sha256:353271b9ec301dd4ba158af481323c831c6e9b494d5ac3f5aa58cf4b207699cc" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.25.2/zizmor-x86_64-apple-darwin.tar.gz" +provenance = "github-attestations" + +[tools.zizmor."platforms.windows-x64"] +checksum = "sha256:65d46a8144f701200621b580f632076d80d082d60856de9f88793a95fb5882d7" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.25.2/zizmor-x86_64-pc-windows-msvc.zip" +provenance = "github-attestations" diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..6eb3173 --- /dev/null +++ b/mise.toml @@ -0,0 +1,31 @@ +#:schema https://mise.jdx.dev/schema/mise.json + +# Toolchain for the ACP Go SDK. Replaces the former Nix devshell/flake. +# `mise install` provisions everything below; tasks still live in the Makefile. +[tools] +# Go toolchain and editor helpers +go = "1.26.3" +"go:golang.org/x/tools/gopls" = "0.22.0" +golangci-lint = "2.12.2" +gofumpt = "0.10.0" + +# Tree-wide formatter and its linters/formatters +"aqua:numtide/treefmt" = "2.5.0" +actionlint = "1.7.12" +zizmor = "1.25.2" + +# Markdown tooling. +# mdformat is pure Python — installed through uv (via the pipx backend). +# mdsh ships only to crates.io, so it is built with the cargo backend. +uv = "0.11.17" +"pipx:mdformat" = "1.0.0" +rust = "1.96.0" +"cargo:mdsh" = "0.7.0" + +[settings] +# Use uv to back pipx installs, so no separate pipx binary is required. +pipx.uvx = true + +[env] +# Keep the Go build cache inside the repo, matching the old Makefile default. +GOCACHE = "{{ config_root }}/.gocache" diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 0000000..5cab979 --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,29 @@ +# Tree-wide formatter config. Previously generated by treefmt-nix inside flake.nix. +# Run with `make fmt` (writes) or `make check` (treefmt --fail-on-change). + +[formatter.gofmt] +command = "gofmt" +options = ["-w"] +includes = ["*.go"] + +# mdsh expands embedded shell blocks; mdformat then normalizes the result. +# mdsh must run first (lower priority) so mdformat has the final say on layout. +[formatter.mdsh] +command = "mdsh" +options = ["--inputs"] +includes = ["*.md", "*.markdown"] +priority = 1 + +[formatter.mdformat] +command = "mdformat" +includes = ["*.md", "*.markdown"] +priority = 2 + +[formatter.actionlint] +command = "actionlint" +includes = [".github/workflows/*.yml", ".github/workflows/*.yaml"] + +[formatter.zizmor] +command = "zizmor" +options = ["--no-online-audits", "--quiet"] +includes = [".github/workflows/*.yml", ".github/workflows/*.yaml"] From 201a3870231d9df0edce84e22863d338fad84a57 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 13:38:07 +0000 Subject: [PATCH 2/2] fix(ci): make 'make check' tolerant of mdsh/mdformat blank-line churn treefmt runs both mdsh and mdformat over README.md. The cargo-built mdsh 0.7.0 strips the blank line after an mdsh directive comment, while mdformat re-adds it. Each rewrites the file, so the net content is unchanged (README is a fixpoint of the pair) but treefmt's --fail-on-change trips on the intermediate churn, failing CI. Format in place with treefmt and let 'git diff --exit-code' verify there is no net drift, which still catches genuine formatting/sync regressions while tolerating the harmless oscillation. --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 55cdc5d..b33ca31 100644 --- a/Makefile +++ b/Makefile @@ -56,11 +56,16 @@ README.md: schema/version fmt: treefmt -# treefmt runs mdsh + mdformat over the markdown, so --fail-on-change also -# verifies README.md is regenerated and in sync (replacing the old mdsh guard). +# treefmt runs mdsh + mdformat over the markdown, which keeps README.md +# regenerated and in sync (replacing the old mdsh guard). mdsh and mdformat +# disagree on the blank line after an mdsh directive: mdsh strips it, mdformat +# re-adds it. The net result is a no-op (README is a fixpoint of the pair), but +# that intermediate churn trips treefmt's own --fail-on-change. So we format in +# place and let git confirm there's no net drift instead. .PHONY: check check: - treefmt --fail-on-change + treefmt + git diff --exit-code .PHONY: test test: $(GO_FILES)