Repository navigation
task: the tasks every repository has are written once, and ship with go tool task - #136
Merged
Merged
Conversation
…t is on brand wrote this for itself (spin-stack/brand#54): a consumers.toml naming who copies its stylesheets and marks, and a command that reads each one's pin, copies and faces. The question is every repository's whose outputs are copied, so the command is here and brand keeps only its table. What was brand's by name is the table's now: `name`, what a consumer's versions.yaml calls the repository, and `scope`, the npm scope whose packages are its to pin (brand's @fontsource). The report's "fonts" line is "packages". The table is read by the consumers package, so a repository's own test can hold its table to its tree. Part of #135 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…go tool task versions, bump, release and lint:workflows were typed again in each repository, a little differently each time: bump took VERSION= here and TO= in spin, a release was three tasks here and a copied naming rule in brand (spin-stack/brand#54). They are cmd/task/tasks.yml now, with consumers. The release archive carries the file beside the commands it calls, and go tool task names the unpacked copy in GO_TOOLS_TASKS, so a repository's Taskfile takes it in one flattened include and commits no copy. What differs between repositories is the include's vars: the gate's workflow and jobs, the files a release carries, where the consumers table is. An include by an environment path won over the others by what each did under the pinned Task 3.54.0. Two -t flags: the last one is the only Taskfile. A root Taskfile in the cache that includes the repository's: ROOT_DIR is the cache. A remote Taskfile: a trust prompt, a download on every run, a cache per checkout. With the flattened include a repository that defines a common name is refused by Task ("Found multiple tasks"). The release name is a command, cmd/release, where internal/release/cmd/releasename was go-tools' alone: `release <commit>` is the next name and refuses a commit released already, `release -outputs` is what release.yml reads. This repository includes its tree's tasks.yml with its tree's commands and writes none of those tasks: release.yml publishes with `task release`, the task every repository releases with, which asks proven of the gate first - hence actions: read. bump's version is TO=, since a Taskfile's own VERSION answers before the command line's in an included task. Part of #135 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The maintenance tasks every spin-stack repository has (
versions,bump,release,lint:workflows,consumers) should mean the same thing everywhere, without depending on how a prompt was worded that day. Today each repository types them again:bumptakesVERSION=in go-tools and shipset andTO=in spin, a release is three tasks here and a copied naming rule in brand (spin-stack/brand#54), and five repositories with aversions.yamlhave noversionstask at all.This is the first PR of #135: the shared Taskfile shipped with
go tool task, and the two commands brand had to copy.What changed
cmd/task/tasks.yml, the common tasks, one name and one contract each.release:buildputs it in every platform's archive beside the commands it calls, andcmd/tasknames the unpacked copy inGO_TOOLS_TASKS. A repository writes one include and commits no copy:versionsversions checkover every file inVERSIONS_FILES(defaultversions.yaml), all of them asked, exit 1 when any is behindbump NAME= [TO=] [FILE=]versions bump -file FILE NAME TOrelease [SHA=]proven release -workflow GATE_WORKFLOW -events push,pull_request -ran GATE_JOBS -also ''on main's head orSHA; name it withrelease;gh release create <name> RELEASE_FILES --target <sha> --latest --generate-noteslint:workflowsactionlintpin,-shellcheck=, over.githubandWORKFLOWS_ALSO; fails on an action used by a tagconsumers [-- flags]consumers -table CONSUMERS; refused with a message when the repository has no tableThe parameters are the include's
vars:GATE_WORKFLOW,GATE_JOBS,RELEASE_FILES,VERSIONS_FILES,WORKFLOWS_ALSO,CONSUMERS. A repository that names no gate does not release, andtask releasesaysmissing required variables: GATE_WORKFLOW, GATE_JOBS. Notversions.yaml: it is a list of pins, and a block that is not a pin would be a format change every reader takes. Not the Taskfile's rootvars: measured below, a root var beats the command line inside an included task.cmd/releasereplacesinternal/release/cmd/releasename.release <commit>prints the nextv<YYYYMMDD>.<NN>and refuses a commit a release names (brand'scmd/release).release -outputs <commit>is whatrelease.ymlreads (version=,new=,module=), unchanged. Tags that are not releases (screens-v...,v0.<day>.<n>, one-digit sequences) count for nothing.cmd/consumersand packageconsumers, moved from brand with its tests. Two things were brand's by name and are the table's now: top-levelname(the entry a consumer'sversions.yamlpins this repository under) and optionalscope(the npm scope whose unpinned packages are reported, brand's@fontsource). The report'sfontsline ispackages,-brandis-dir. Every git and gh call takes a context.consumers.Loadis exported so brand's test that holds its table to its tree keeps working.go-tools takes its own tasks. Its Taskfile includes the tree's
cmd/task/tasks.ymlwithGO_TOOLS: 'go run ./cmd/'(the tree's commands, not the last release's) and no longer definesversions,bump,lint:workflowsorrelease:publish.release.ymlpublishes withtask release, the task everyone releases with, so it gainsactions: readfor proven.release:name,release:buildandrelease:modulestay go-tools' own.bumptakesTO=, notVERSION=.Docs: site pages
tasks,release,consumers; Getting started; README.Scope
Not here: the gate that fails a repository lacking or redefining a common task (#135 item 3), and the changes to brand, shipset, spin and the others. The exact diff for each of those three is in a comment on #135.
Tradeoffs
Each candidate was run under Task 3.54.0, the version every
versions.yamlpins, in throwaway repositories.flatten: true--listshowsversions,releasewith their descriptions beside the repository's own;task versionsruns withcwdandROOT_DIRthe repository's, from a subdirectory too; includevarsreach the tasksversionsitselftask: Found multiple tasks (versions) included by "common", exit 203, for every task askedflattencommon:versions;Task "versions" does not exist-tflags-t a,bisNo Taskfile foundgo tool task -t <cache>)ROOT_DIR=/…/cachein the repository's own tasks, and every Taskfile here builds paths fromROOT_DIRnot trusted by user(exit 104) without--yes;Download of … failed(exit 103) with the server gone unless--offline; its cache is.task/remote/per checkout, apart from the release the commands come fromWhat the winner costs:
go tool taskhas noGO_TOOLS_TASKSand saysinclude cycle detected between Taskfile.yml <--> Taskfile.yml(exit 110), since an empty path is the Taskfile itself. A repository's go-tools commands are not onPATHthere either, so nothing that worked stops working, but the message is poor. The site's page says it.RELEASE_WORKFLOW: pages.ymlat the root,task release RELEASE_WORKFLOW=cli.ymlstill ran-workflow pages.yml. Hence include vars for the parameters andTOforbump.excludes: [versions]on the include lets a repository replace a task without Task refusing. The gate has to look at where each task is defined (--list-all --jsongiveslocation.taskfile), not only at Task's exit status.--generate-notes) where they were a fixed sentence, so that the task has no notes parameter.task releaseasksprovenagain insiderelease.yml, which already runs only after CI succeeded. One API round, and the same refusal every repository gets.github.com/BurntSushi/tomlbecomes a direct requirement of go-tools (it was indirect at an older pseudo-version). It has no dependencies of its own.Blast Radius
Every repository runs go-tools' latest release through
go tool task.At the next release, for every repository, with no change of its own:
tasks.yml,releaseandconsumersbeside the other commands. Nothing reads them until a Taskfile includes the file.releasenamewas never in the archive (internal/), so nothing is removed from anyone'sPATH.What does not change until a repository acts:
GO_TOOLS_TASKSis set bycmd/task, which each repository compiles from its owngo.mod. A repository gets it only when its go-tools requirement moves to this release's module version (the Dependabot PR). Until then its Taskfile and tasks are exactly what they are today.cmd/releaseandcmd/consumers.go-tools itself:
release.ymlchanges, and it runs only on main after CI passes, so it cannot be run on this PR. Iftask releasefails there, no release is published and no tag is made (the release makes the tag, last); the repositories go on with the previous release.Verification
task lint: exit 0.task test: exit 0, 85.89% of what CI runs.task mutate BASE=origin/main: 133 edits over 5 files. First run: 90 refused, 3 survived, all on one line ofcmd/consumers(where, thegit rev-listfailure). Answered withTestAPinGitCannotCountFromIsStillPlaced. Final run: 91 refused, 0 survived, 42 did not build.cmd/task/tasks_test.gorunstasks.ymlunder the pinned Task against fixture repositories, with the commands it calls replaced by recorders: a repository whose Taskfile is only the include lists exactly the five tasks, from a subdirectory too;GATE_WORKFLOW,GATE_JOBSandRELEASE_FILESreachprovenandgh release create;SHA,GH_TOKENandGITHUB_REPOSITORYare taken from a workflow's environment; a commitprovenrefuses is not named or released; a repository with no gate is refused before anything runs; one that redefinesversionsis refused for every task; a tagged action failslint:workflowsin either directory; go-tools' own Taskfile takes all five fromtasks.yml.proven release -repo spin-stack/go-tools -sha <main> -workflow ci.yml -events push,pull_request -ran Gate -also ''answeredci.yml passed on 38fdcbc…'s tree;release HEADansweredHEAD is released already, as v20261122.03andrelease -outputs HEADthe three linesrelease.ymlreads;task versionsasked all three files and exited 1 on the one that is behind (sfw-linux-amd64 1.15.4 → 1.16.0);task lint:workflowsexit 0.task release:build: exit 0, andgo-tools_linux_amd64.tar.gzholdstasks.yml,releaseandconsumers. A scratch repository whose Taskfile is only the include, run under the pinned Task with that archive unpacked onPATHand named inGO_TOOLS_TASKS, lists the five tasks from a subdirectory, runsversionsagainst the real upstreams (exit 0), and refusesrelease(missing required variables: GATE_WORKFLOW, GATE_JOBS) andconsumers(no consumers.toml).release.ymlitself, which first runs on main, andgh release createwith the run's token.Part of #135
🤖 Generated with Claude Code