Skip to content

task: the second batch of rollout fixes: release cannot be forced, check counts what it could not read, bump never goes back - #138

Merged
aledbf merged 7 commits into
mainfrom
task/rollout-fixes-2
Nov 22, 2026
Merged

aledbf merged 7 commits into
mainfrom
task/rollout-fixes-2

Conversation

@aledbf

@aledbf aledbf commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Why

The maintenance tasks every spin-stack repository has should mean the same thing everywhere, so nobody has to think about how a given repository does it. go-tools ships them once (#135), seven repositories have taken them or have a PR open, and their field reports (4 to 7 on #135) found defects that make the shared tasks wrong in some repository. The worst one could publish a wrong release.

  • release could be made to publish an empty release marked latest. It refused only because two vars were absent, and a var on the command line reaches an included task. spin-machine and spin-ami both have a ci.yml with a job named Gate, the values the pages showed, and both release another way.
  • versions check did not count a row it could not read. Without a token, website's private upstream was a 404 and the summary said 1 behind where there were 2. spin-machine's qemu, pinned at 11.2.0-rc0, was a parse error and no count.
  • The versions task set no token, while release did.
  • bump moved a pin backwards and exited 0, and nothing but prose stopped it on entries that a repository's own command moves.
  • The pages were wrong or silent about what each of the seven repositories had to find out.

What changed

One commit per fix.

  1. release is cut only where the include states how. RELEASE is one var of the include, a map:
    vars:
      RELEASE:
        map: {proof: ci.yml, jobs: Gate, files: _output/*.tar.gz}   # this task cuts the releases
        # map: {elsewhere: release.yml}    releases, but not with this task
        # map: {none: "why"}               does not release
    The command line and the environment hold strings, and no string is a map. Where the include states the map it wins over both, and the task reads it through task-level vars, which Task reads last. A repository that states nothing, elsewhere or none is refused with that reason whatever is typed. elsewhere and none are keys so that the gate of task: the tasks every repository has are written once, here, and a gate holds them #135 item 3 can read them. GATE_WORKFLOW, GATE_JOBS and RELEASE_FILES are gone, with no compatibility name.
  2. versions check counts an unread row and exits 2 for it, where a row behind exits 1. upstream.Status has Unread. The versions task keeps the worst status of its files. A pin with a -suffix after its numbers (11.2.0-rc0) is ordered by the tags track: 11.2.0 is newer than it, 11.1.2 is not.
  3. versions and bump take gh's token when neither GITHUB_TOKEN nor GH_TOKEN is set, and run without one where gh is logged out.
  4. bump never moves a pin backwards unless told (versions bump -back, BACK=1, upstream.BumpBackwards). A version is ordered by its numbers. A git entry of a GitHub repository whose versions say neither way is ordered by asking GitHub's compare whether the pinned commit already holds the new one, which is website's rule. refresh leaves an entry pinned past its upstream's newest where it is.
  5. An entry names the command that moves it: a new field of versions.yaml, bump: <command>. versions bump and versions refresh refuse the entry and name the command, and versions check shows it in the row. upstream.Bump, which those commands are built on, does not read it.
  6. Docs: versions exits 201 through Task; versions check -task names go tool task bump NAME=<name>; the include is shown bare, and with RELEASE only under "A repository that releases with this task"; quoting; lint:workflows in the task CI runs, its actionlint pin, .github/actionlint.yaml for spin-stack's runners; a repository's own task with a common name is renamed and excludes is not a way out; release publishes at once and its tag starts push: tags workflows; and the rule from report 5.
  7. Tests for what the series put in the mutation gate's reach: main's failure path, Entry.equal, one validate branch.

Scope

  • Not built: the gate of task: the tasks every repository has are written once, here, and a gate holds them #135 item 3, a draft or tag-only release, a stronger proof than a push's run.
  • Not changed: how cmd/task chooses its release (latest, floored at its own).
  • bump: is a schema addition the user has not decided. It is one optional field, used by no repository yet, and reverting commit 5 removes it with nothing else. It may be reversed.
  • "Backwards" is only what the tool can order. A version that starts with no number (a date, a word) and a git entry of a host other than GitHub move as asked. Branches that parted are not called backwards.
  • A kernel whose series is over is still a row that was read, not one that fails the check.

Tradeoffs

  • A map and not two plain vars or a root var. Run under Task 3.54.0: an include's var beats the command line and the environment, a var nobody states is whatever they say, and a task-level var beats all of them. Two string vars cannot be made safe for a repository that states nothing. A map is the one value a command line cannot spell. The cost is one more level of YAML.
  • elsewhere and none are two keys. A later gate can check that elsewhere names a workflow that exists, and that a repository with a tag-triggered release workflow says elsewhere. One free-text key would not allow that.
  • Exit 2 for unread wins over exit 1 for behind. A file with both exits 2, and the message carries both counts. Through Task both are 201, so the last line is what tells them apart.
  • The commit rule fails closed. If GitHub's compare cannot be asked, the bump is refused and names -back. It costs one API call on a bump of a branch-tracked GitHub entry.
  • refresh treats "newest is older than the pin" as "at its newest", not as a failure, so a pin on a release candidate does not fail a schedule every week.

Blast Radius

Merging releases this within minutes. Every repository that runs go tool task gets the new binaries and tasks.yml at its next run, with no commit of its own.

Reaches every repository that runs go tool task, included tasks or not (spin, ship-it, spin-machine, spin-ami, devcontainer-cli, website, brand, the blog once its PR merges):

  • versions check exits 2, not 0 or 1, when a row could not be read, and prints N not read, and M behind of the K that were. The one caller that reads the status is spin-machine-dev (through go tool versions, so from its next go.mod bump): it treats 1 as something to act on and any other status as "could not", which is what 2 means. No workflow or Taskfile in the eight repositories tests the status for 1 (grepped at each origin/main).
  • versions bump <name> <older> is refused. So is a bump with no version where the upstream's newest is older than the pin.
  • versions refresh (spin-machine's and devcontainer-cli's workflows call it) no longer moves an entry back, and a bump of a branch-tracked GitHub git entry asks GitHub's compare with the run's token. A token that cannot read that repository now refuses that entry.
  • Libraries (versions, versions/upstream) change only when a repository moves go.mod. The API is additive: Status.Unread, ErrBackwards, BumpBackwards, Entry.Bump. upstream.Bump keeps its signature and gains the backwards rule, so website's tools/sources and spin-ami's spin-os upgrade have it from their next go-tools bump. upstream.Check no longer sets Behind on a commit-tracked download whose file could not be read; it sets Unread.

Repositories with the include on main today:

repository what changes at once broken until it changes something?
go-tools its own include states RELEASE in this PR, and release.yml runs the tree's task no
brand release refuses: states no RELEASE. versions and bump as above release only, and it refuses rather than misbehaves. Avoidable: see the order below

brand, so that nothing breaks: before this merges, brand's include states both spellings. The released tasks.yml ignores a var it does not read, and this one ignores GATE_* (both run under Task 3.54.0 with stubbed commands, transcript in Verification):

    vars: {GATE_WORKFLOW: pages.yml, GATE_JOBS: Gate, RELEASE: {map: {proof: pages.yml, jobs: Gate}}}

After the release it drops the GATE_* pair. If brand does not go first, its release refuses until that line lands. brand releases by hand, so the window matters only to a person cutting a release that day.

Open PRs that add the include (none is on main, so none breaks; each should state RELEASE before it merges, and its prose that quotes missing required variables: GATE_WORKFLOW, GATE_JOBS is stale):

PR line to add under the include's vars
spin-stack/machine#529 RELEASE: {map: {elsewhere: release.yml}}
spin-machine only: spin-machine-dev bump shells out to go tool versions bump, so an entry marked bump: spin-machine-dev bump ... would be refused by its own command. It marks entries only once that verb calls upstream.Bump
spin-stack/ami#212 RELEASE: {map: {elsewhere: <the workflow that publishes>}}, or none with why: the repository's call
spin-stack/devcontainer-cli#85 RELEASE: {map: {elsewhere: <its release workflow>}}, replacing the comment
spin-stack/ship-it#42 RELEASE: {map: {none: "<why>"}}
spin-stack/website#140 RELEASE: {map: {none: "<why>"}}; bump: go tool task sources:bump on the entries sources:bump moves, in the commit that moves go.mod to this release
spin-stack/blog#7 RELEASE: {map: {none: "<why>"}}

Without the line each of them still refuses to release, with states no RELEASE. The line is what a later gate will read.

The failure report 5 describes, for this PR: the only file read by both a task and a test that changes meaning is versions.yaml, and only when a repository adds bump:. An older versions refuses the field, and go tool task reads versions.yaml with go.mod's. So bump: goes in the commit that moves go.mod to this release, never before. No repository has to add it the same day.

Verification

  • go tool task test: exit 0, coverage 86.35% of what CI runs. go tool task lint: exit 0. go tool task mutate BASE=origin/main: 175 refused, 0 survived, 25 did not build. Twenty survivors of the first run were answered with tests, and three edits to the table writer's parameters are exempt with the reason on the line. go tool task site: built, new anchors present.
  • Every commit passes go vet and the tests of cmd/versions, versions/... and internal/tasks on its own (git rebase -x).
  • Release, under Task 3.54.0 (the tests in internal/tasks run the same cases):
    ### include states nothing
    $ task release RELEASE_DRY=1 GATE_WORKFLOW=ci.yml GATE_JOBS=Gate
        task: release: this repository's include of the common tasks states no RELEASE, so nothing says how it is released ...
        exit=201
    $ task release 'RELEASE={proof: ci.yml, jobs: Gate}' RELEASE_PROOF=ci.yml RELEASE_JOBS=Gate RELEASE_STATED=true
        (the same refusal)  exit=201
    $ env RELEASE=ci.yml RELEASE_PROOF=ci.yml RELEASE_JOBS=Gate RELEASE_STATED=true GATE_WORKFLOW=ci.yml GATE_JOBS=Gate task release
        (the same refusal)  exit=201
    ### include states elsewhere: release.yml
    $ task release RELEASE_DRY=1 RELEASE=x RELEASE_ELSEWHERE= RELEASE_PROOF=ci.yml RELEASE_JOBS=Gate GATE_WORKFLOW=ci.yml GATE_JOBS=Gate
        task: release: this repository releases, but not with this task: release.yml does. Its Taskfile says so (RELEASE's elsewhere), and this task releases nothing here.
        exit=201
    ### brand's include with both spellings, commands stubbed
    tasks.yml of v20261122.05:  RELEASE_DRY: 0123abc would be released to o/r as v20261122.09, and is not   exit=0
    tasks.yml of this PR:       RELEASE_DRY: 0123abc would be released to o/r as v20261122.09, and is not   exit=0
    
    go-tools' own: task release RELEASE_DRY=1 RELEASE=x RELEASE_PROOF=nope.yml asked ci.yml and answered is released already, as v20261122.05.
  • Unread rows, website's versions.yaml with no token, then with one:
    spin   v20261114.01                not read: versions: https://api.github.com/repos/spin-stack/spin/releases/latest answered 404 Not Found
    versions: 1 not read, and 1 behind of the 5 that were: ...        exit=2
    spin   v20261114.01  v20261121.03  behind
    versions: 2 behind; versions bump <name> moves one                exit=1
    
  • 11.2.0-rc0, spin-machine's versions.yaml. v20261122.05: qemu 11.2.0-rc0 versions: qemu's version "11.2.0-rc0": strconv.Atoi: parsing "0-rc0": invalid syntax. This PR: qemu 11.2.0-rc0 11.2.0-rc0, not behind, since no 11.2.0 is published.
  • Token: env -u GITHUB_TOKEN -u GH_TOKEN task versions on website's file read the private row (spin v20261114.01 v20261121.03 behind).
  • Backwards, website's file. v20261122.05: spin: v20261114.01 51f7e0d... -> v20261024.01 b359814..., exit 0. This PR: versions: spin is at v20261114.01, and v20261024.01 is older: a bump does not move a pin backwards (...), exit 1, file unchanged. versions bump brand (branch track, GitHub asked) moved forward.

Part of #135

🤖 Generated with Claude Code

aledbf and others added 7 commits November 22, 2026 14:30
…ommand line can spell

Every repository that includes the common tasks has a `release`, and it refused
in the ones that do not release only because two vars were absent. Under Task
3.54.0 a var of the command line or the environment reaches an included task
wherever the include states none of that name. spin-machine, which is released
by its own workflow, and spin-ami, which cuts no release, both have a ci.yml
with a job named Gate, the values the pages showed: there
`go tool task release GATE_WORKFLOW=ci.yml GATE_JOBS=Gate` named a release, and
without RELEASE_DRY would have published an empty one marked latest
(spin-stack/machine#529, spin-stack/ami#212).

A repository now states how it is released in one var of the include, RELEASE,
a map: `proof` and `jobs` where this task cuts the releases, with `files`;
`elsewhere`, naming the workflow, where it releases but not with this task,
as the four repositories whose release is built from its tag do; `none` where
it does not release. They are keys and not a comment so that a gate can read
them (spin-stack/devcontainer-cli#85 had only a comment to write).

The command line and the environment hold strings, and no string is a map;
where the include states the map it wins over both; and the task reads it
through vars of its own, which Task reads after every other. So a repository
that states nothing, `elsewhere` or `none` is refused with that reason whatever
is typed, and one that releases is asked the proof and the jobs it states and
no others. The tests run each case under Task.

GATE_WORKFLOW, GATE_JOBS and RELEASE_FILES are read by nothing. "Gate" is the
required check's name in spin-ami, and the two vars were set there for that
reason. go-tools' own include states the map, and every other repository that
set the vars states it in a commit of its own.

Part of #135

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…r it

A row whose upstream did not answer was a row with a note and no count. website
asked without a token got a 404 for its private upstream and `1 behind` where
there were 2 (spin-stack/website#140); spin-machine's qemu, pinned at
11.2.0-rc0, got `strconv.Atoi: parsing "0-rc0"` and `8 behind` with no word of
it (spin-stack/machine#529). A missing token read as nothing more to bump.

upstream.Status has Unread: the upstream did not answer, or answered what the
pin cannot be ordered against. Behind says nothing of such a row. check marks
it `not read:`, counts it apart, says how many rows the count of what is
behind is of, and exits 2 where a row behind exits 1, as diff does for a file it
could not read. The versions task keeps the worst status of its files, so a
later file that is only behind does not hide one that was not read. A kernel
series that is over was read, and so was an entry that follows another.

A pin with a -suffix after its numbers is now ordered by the tags track, not
refused. A release tag is numbers alone, so the comparison this package has is
of numbers, and what it can say of 11.2.0-rc0 is that 11.2.0 is newer and
11.1.2 is not. A pin that starts with no number is said to be one the track
cannot order, which is a row not read.

Part of #135

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
release exported gh's token when none was set; versions and bump did not. A
repository with a private upstream - website pins spin - had to be run as
`GITHUB_TOKEN=$(gh auth token) go tool task versions`, and without it the
private row was a 404 (spin-stack/website#140).

Both tasks now take gh's token when neither GITHUB_TOKEN nor GH_TOKEN is set.
A workflow's token is left as it is and gh is not asked. Where gh is logged
out or not there the task runs without a token, which release cannot: check
marks what it could not read and fails for it.

Part of #135

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`versions bump spin v20261024.01` moved website's pin from v20261114.01 to a
release three weeks older and exited 0 (spin-stack/website#140). website's own
`sources:bump` refuses that, and the rule is nobody's in particular, so it is
upstream.Bump's: every repository's command that bumps through it has it.

Backwards is what can be ordered. A version, by the numbers it starts with,
refused before anything is fetched: that also stops a bump with no version
named where the upstream's latest is older than the pin, which refresh now
leaves where it is rather than failing or moving it. And a commit, for a git
entry of a GitHub repository whose versions say neither way - a branch, or a
commit of main moved to a tag: GitHub's compare is asked whether the pinned
commit already holds the new one, which is website's rule that a pin on main
moves only to a release that holds it. Where GitHub cannot be asked the bump
is refused. Branches that parted are not called backwards, a version that
starts with no number is not ordered, and an entry tracked with another goes
where that one is.

upstream.BumpBackwards, `versions bump -back` and `task bump BACK=1` are the
bump of a person who means it.

Part of #135

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…it for that one

Four of seven repositories have a command that moves some entries with rules
the shared bump does not have: website's `sources:bump` waits for a release's
artefact and generates data again, spin-ami's `spin-os upgrade` holds entries
that move only with spin's release, spin-machine's `spin-machine-dev bump`
prints what a new machine type changes. Only prose stopped
`go tool task bump NAME=<such an entry>`.

An entry has one more field, `bump`: the command that moves it, one line, as a
person types it. `versions bump` and `versions refresh` refuse the entry and
name the command, with -back too, and `versions check` says it in the entry's
row. upstream.Bump does not read the field: it is what those commands are
built on.

The field is new to versions.yaml, which every repository reads, and a
versions from before it refuses a file that has it. A repository adds it in
the commit that requires this release, or after.

Part of #135

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Each of these cost a repository a round, and none was on a page
(#135, reports 3 to 7):

- `versions` through Task exits 201, whichever way it failed. The page and the
  task's description said 1. `versions check -task` makes the last line name the
  command a repository runs, `go tool task bump NAME=<name>`, and the task
  passes it.
- The shared tasks are the latest release's whatever go.mod says, so a file
  read by both a task and a test moves with go.mod in one commit, and after a
  release a task that is in no workflow can be broken with no commit and
  nothing red. brand's `consumers` was.
- The include's quotes are YAML's: double quotes are the same include to Task
  and to the gate, and what a repository formatted by Biome has to write.
- A repository whose own task has a common name renames its own, and
  `excludes` on the include is not a way out.
- `lint:workflows` goes in the task CI runs, needs an `actionlint` pin (the
  version is given) and, on spin-stack's own runners, a
  `.github/actionlint.yaml` naming their labels; it prints nothing on a pass.
- `release` publishes at once, and its tag, made with a person's token, starts
  every `push: tags` workflow.
- versions.md points to `go tool task versions` and `bump`.

Part of #135

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The gate mutates every function a change touches, and three of the ones this
series touched had edits no test refused, from before it:

- main: what a failure says and exits with is now failure, a function the
  tests call, and main is the two lines that are the process's own.
- Entry.equal, which is how Set reads its own rewrite back: no test told two
  entries apart by a field, so any `&&` of it could be an `||`.
- validate: a download whose source says only {os}, or only {arch}, with one
  pin was refused by no test.

The table writer's three zeros are exempt, with why none can be seen.

Part of #135

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@aledbf
aledbf merged commit 53dcee8 into main Nov 22, 2026
3 checks passed
@aledbf
aledbf deleted the task/rollout-fixes-2 branch November 22, 2026 17:37
aledbf added a commit to spin-stack/brand that referenced this pull request Nov 22, 2026
go-tools' release task now cuts a release only where the include says how, in a map
(spin-stack/go-tools#138): a command line or an environment holds strings, so nothing typed
at it can turn a repository that releases elsewhere, or not at all, into one this task
releases. brand's releases are this task's: pages.yml's pass is the proof and Gate the job
it must have run. go-tools moves to v0.20261122.6, whose tasks read the map.

Part of spin-stack/go-tools#135

Co-Authored-By: Claude Fable 5.2 <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.

1 participant