Skip to content

Release binaries are stamped +dirty: dist/ is not gitignored #1266

Closed

Description

@scttfrdmn

Problem

The release binaries GoReleaser builds for spawn are stamped as dirty. On the darwin-arm64 binary from the latest release, go version -m shows:

mod    github.com/spore-host/spawn    v0.139.1+dirty
build  vcs.modified=true

Binaries for truffle v0.62.1 and lagotto v0.64.1, built by the same kind of workflow, show vcs.modified=false. spore-host-mcp v0.41.0 is also +dirty, so this is not new.

Cause (reproduced)

GoReleaser writes its output into dist/, inside the checkout, and this repo's .gitignore does not ignore dist/. Every build after the first therefore sees an untracked dist/, and Go's VCS stamping counts untracked files as modifications. truffle, lagotto and calque all ignore dist/ and come out clean.

Reproduced on a clean clone of the release tag with GOTOOLCHAIN=go1.26.10:

State of the checkout vcs.modified
clean clone false
plus an untracked dist/artifacts.json true, and the version reads +dirty
same, with dist/ excluded false

The before: hook's Lambda build output (lambda/ttl-reaper/build/, ttl-reaper_lambda_linux_arm64.zip) is already ignored. I checked that it alone leaves vcs.modified=false; dist/ is what flips it.

Fix

  1. Add dist/ to .gitignore.
  2. Add a gate so this can't come back silently. For example, a CI step that creates dist/probe, then fails if git status --porcelain --untracked-files=all is non-empty. Check that the gate fails against the current .gitignore before relying on it.

Do this together with the Go 1.27.3 CI pin move, in the next release cycle (owner decision, 2026-10-21; tracked in spore-host/spore-host#609). It is cosmetic for installs: the Homebrew and Scoop checksums and --version are all correct. But +dirty in the embedded module version misrepresents what was built to anything that reads build info, such as SBOM and provenance tooling.

Activity

  1. added this to the v0.145.0 milestone on Oct 25, 2026
  2. added 2 commits that reference this issue on Oct 26, 2026
    faa0113
    f09594b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions