Skip to content

taskgate -common, a stale latest refused, versions -by - #141

Merged
aledbf merged 3 commits into
mainfrom
task/gate
Nov 23, 2026
Merged

aledbf merged 3 commits into
mainfrom
task/gate

Conversation

@aledbf

@aledbf aledbf commented Nov 23, 2026

Copy link
Copy Markdown
Member

Why

#135's goal is that the tasks every repository has are written once in go-tools, and that a gate holds them there: a repository that drifts fails its own lint. Items 1 and 4 shipped (#136-#138), and seven repositories took the include. This PR is item 3, the gate, plus two fixes from the rollout reports.

What

  1. taskgate -common (internal/taskgate/common.go, graph.go, cmd/taskgate). It reads the repository's files and runs nothing, so it still answers when Task refuses to load the Taskfile. It is asked of a repository whose go.mod takes go tool task, or that has a versions.yaml, or whose Taskfile includes the tasks. It fails when:

    • go.mod's go-tools is older than v0.20261122.4.
    • The include is missing, is not the root's, is not flattened, or has excludes.
    • A Taskfile of the repository's defines a common name. That includes a name reached through a namespace, such as workflows in a file included as lint.
    • A step runs a bare task, or uses go-task/setup-task, in a repository that takes go tool task.
    • RELEASE is not stated, or is not true of the workflows: a proof or jobs that is not there, an elsewhere file that is not there, or a releasing workflow under none.
    • No task a workflow runs reaches lint:workflows.
    • A runner label is not one actionlint knows.

    go-tools' own lint runs it with -common-include internal/tasks/tasks.yml.

  2. toolcache (rollout report 8). For a minute or two after a release, /releases/latest can still answer with the release before. When the answer is older than the caller's own release, toolcache asks again after 2, 4 and 8 s. If the answer is still older, it returns an error and runs nothing.

  3. versions -by <command> (reports 10 and 11). An entry whose bump: names the command that runs versions bump or versions refresh is moved by that command. This means spin-machine, devcontainer-cli and spin can mark entries their own commands shell out for. check no longer suggests go tool task bump when every row that is behind names a command of its own.

The site's taskgate, tasks and versions reference pages say what changed.

This PR does not decide one name for "what CI runs". The gate asks only that the task CI runs reaches lint:workflows.

Verification

  • task lint, task test and task mutate BASE=origin/main all pass locally. Mutation: 142 refused, 0 survived. The 9 mutants in cmd/taskgate had no test before this change either.
  • Against shallow clones of each repository's main:
    • brand, ship-it, website and devcontainer-cli pass.
    • spin has one finding, common:lint:workflows. Its CI reaches lint through ci:lane and hack/lanes, which the gate cannot follow, so spin will need an exemption with its reason.
    • spin-machine, spin-ami and the blog have only their existing -command step findings.

Refs #135. The rollout to the repositories is still left.

🤖 Generated with Claude Code

aledbf and others added 3 commits November 23, 2026 14:19
… then refused

For a minute or two after a release is published, GitHub's /releases/latest still redirects
some requests to the release before (#135, rollout report 8: brand ran v20261122.05's tasks
under a go tool task built from .06). latestTag recorded and ran that answer. Now an answer
before since is asked again after 2, 4 and 8 seconds, and when it stays it is an error that
says the command's own release is not visible yet: nothing from before the command runs, and
nothing is recorded, so the next run asks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… that names it moves

An entry's bump: field refuses versions bump and versions refresh, which is what it is for, and
also refuses the command it names when that command shells out to them (#135, rollout reports
10 and 11): spin-machine-dev bump and refresh, devcontainer-cli's refresh node, spin's
machine:propose. So none of those repositories could mark an entry. -by says who is running
the command, in the entry's words, and the entry moves; a person and the common bump pass
nothing and are refused as before, and a -by that names another command is refused with both
names.

check's last line no longer offers go tool task bump when every row behind names a command of
its own, which is the only one that moves those rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Item 3 of #135: a repository that drifts from the common tasks fails its own lint. -common reads
the repository's files, and runs nothing, Task least of all, since a second task of a common
name is a Taskfile Task refuses to load: go.mod's go-tools sets GO_TOOLS_TASKS; the root
Taskfile includes the tasks once, flattened and without excludes; no Taskfile of the
repository's, a namespace's included, defines a common name; no step runs a bare task or
setup-task where go.mod takes go tool task; RELEASE is stated and true of the workflows (a
proof and jobs that exist, an elsewhere file that exists, no releasing workflow under none);
lint:workflows is reached from what a workflow runs; every runner label is one actionlint knows.

It is asked of a repository that takes go tool task, pins in versions.yaml, or includes the
tasks. go-tools' own lint runs it, with -common-include naming the tree's tasks.yml.

The name of the task CI runs is not decided here: the gate asks only that it reaches
lint:workflows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit 817ee7b into main Nov 23, 2026
3 checks passed
@aledbf
aledbf deleted the task/gate branch November 23, 2026 17:27
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.

1 participant