Skip to content

Tools as released binaries: go tool task runs the pinned Task with go-tools on its PATH - #100

Merged
aledbf merged 4 commits into
mainfrom
tool-binaries
Nov 9, 2026
Merged

aledbf merged 4 commits into
mainfrom
tool-binaries

Conversation

@aledbf

@aledbf aledbf commented Nov 9, 2026

Copy link
Copy Markdown
Member

Closes #99

Repositories will stop compiling Task and go-tools' commands: they get the released binaries, pinned by sha256 in versions.yaml.

What's in it

  • versions.yaml, additive.
    • A download entry can say {os} and {arch} in its source and have pins:, a sha256 per os/arch, in place of pin.
    • Entry.For is one platform's view of the entry; fetch and Pinned use this machine's.
    • A bump hashes every platform's file and rewrites each pin in place. A release missing one platform's file is refused.
    • github-release <repo> <prefix> reads releases named <prefix><version>.
  • cmd/task. A repository's go.mod takes it as go tool task.
    • It finds versions.yaml (cwd upwards) and puts its task and go-tools in the user's cache, verified by sha256 and unpacked once per pin (internal/toolcache, safe when two processes race).
    • It prepends the tools' directory to PATH (replacing it, not duplicating it) and execs Task.
    • It links only versions and internal/fetch.
    • Against the real Task 3.54.0 release: 1.5 s the first time, 36 ms after.
  • versions/gate. With cmd/task in go.mod, it counts task and go-tools as read, and requires go-tools' version to be the time in go.mod's go-tools pseudo-version: one commit for the packages and the commands.
  • Releases. A release job in ci.yml, after the Gate, only on pushes to main.
    • task release:build builds every command except task for linux/amd64, linux/arm64, darwin/amd64 and darwin/arm64, reproducibly: two builds give the same sha256.
    • actions/attest-build-provenance attests the archives.
    • task release:publish publishes bin-<commit's UTC time>; a retried run doesn't publish twice.
  • proven. An artifact uploaded with archive: false, like a run's trace.json, is read as its one file. proven flakes used to fail on it with "the artifact is not a zip".
  • Docs. The versions.yaml reference, getting started, and the README.

Why

From go-tools#99: Task as a tool is ~375 modules and go-tools' tools ~70; brand goes from 451 to 5 modules without them. shipset's go tool task test spent 94 s on downloads and compiling before the first test.

Checked

  • task lint, task test and task site pass.
  • go run ./cmd/mutate -base origin/main -max 600: 182 mutations, 0 survived.
  • release:build ran locally: 18 commands, about 40–44 MB per platform.

The first release appears when this merges, and each repository moves to it in its own PR.

🤖 Generated with Claude Code

aledbf and others added 4 commits November 9, 2026 18:07
A download's source may say {os} and {arch}, with pins: a sha256 per
os/arch in place of pin. For is the entry as one platform has it, which
is what fetch and Pinned read; a bump hashes every platform's file and
rewrites each pin in place. github-release takes a tag prefix:
github-release <repo> bin- reads bin-20261109.193146 as 20261109.193146.

Refs #99

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sitory compiles

cmd/task is what a go.mod takes as `go tool task`: it puts versions.yaml's
task and go-tools for this platform in the user cache, held to their
sha256 and unpacked once (internal/toolcache), and execs Task with the
tools first on its PATH. versions/gate counts both entries as read by it,
and holds go-tools to the commit go.mod requires: one commit for the
packages and the commands.

ci.yml's release job builds every command but task for four platforms,
reproducibly, attests them and publishes bin-<commit UTC time>.

proven reads an artifact uploaded unarchived as its one file: a run's
trace.json made flakes fail with "the artifact is not a zip".

Closes #99

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hat nothing refused

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…here

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tools as released binaries: no Task or go-tools compile in a repository's CI

1 participant