Repository navigation
refactor(ci): split release.yml so each workflow carries one design - #119
Merged
Merged
Conversation
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.
Stack (root → tip):
PR 1 of 3 for the
nightly-cli-buildschange. Behavior-preserving apart from one correction, and it exists so PRs 2 and 3 add one flow each to a file that already has one job.The split
release-cli-changeset.ymlversion— opens the Version Packages PRconcurrency: release-${{ github.ref }}release-cli.ymlcheck+publish, in one filenpm-production, approvalrelease-vale.ymlvale-binaries.ymlrelease.ymlis deleted. Each new file carries a header written for its own trust story rather than a copy of the original —release.yml's header is the reason its security properties survived this long, and splitting it without splitting the reasoning would have thrown that away.checkandpublishstay together deliberately: the credential-free gate is what keeps an OIDC-capable job from existing on an ordinary push, and separating it from the job it protects is the arrangement most likely to be broken by a later partial edit.release-cli.ymlhas no concurrency group, also deliberately, and the header says why — the gate makes a duplicate publish a no-op, and the residual TOCTOU is handled the way the Vale workflow already handles it, treating a publish failure as possibly-already-published.Verified equivalence
A parsed-config diff of old versus new shows
version,check, andpublishbyte-identical, with the same triggers and the samepermissions: {}. All 9 workflow files parse underjs-yaml.Two intentional behavior differences:
check/publishno longer share therelease-*concurrency group (D6).Release CLI Version PR / …andRelease CLI / …instead ofRelease / ….Vale Binaries→Release Vale,vale-binaries→release-vale), so its check context changes too and anything keyed on the old name (badges, notification rules,gh run list --workflow) stops matching.None of these is a required check. Branch protection on
mainrequires onlyValidate, fromci.yml— confirmed via the API, so no repo-settings change is needed.pr-check-openspec.yml,require-changeset.yml,stack-breadcrumb.yml, and.github/scripts/*.cjskey on nothing workflow-name-specific.The renamed Vale workflow is renamed through:
name:becomesRelease Valeandconcurrency:becomesrelease-vale. A file calledrelease-vale.ymlthat still announced itself asVale Binarieswould reproduce the naming mismatch this split exists to remove, so task 1.5 calls for both. Its whole header comment is preserved verbatim apart from therelease.yml→release-cli.ymlreference.The one behavior-adjacent correction
release.yml's header claimed "No required reviewers (fully automatic once the Version Packages PR merges), by design." That is false:npm-productionhasrequired_reviewers(reviewerthecodedrift) plus a protected-branches policy. A release has always waited on an approval the file denied existed. The new header states what is configured, and why.Three things measurement corrected in the proposal
Task group 0 is verification, and it contradicted the design in three places. All three are fixed in
design.mdandtasks.mdon this branch, since PR 2 codes against them:changeset status --outputreturns an object, not an array. It is{changesets: [...], releases: [{name, type, oldVersion, changesets, newVersion}]}. The bump isdata.releases.find(r => r.name === "@taskless/cli").newVersion. The proposal described a bare top-level array — so the review finding about not indexing with[0]was right about the hazard and wrong about the shape.--output=/tmp/x.jsonresolves against cwd to<cwd>/tmp/x.jsonand fails loudly withENOENTand exit 1. It does not silently write nothing. It would write to the wrong place silently only if that directory happened to exist.npm-autopublishalready exists, created 2026-08-18 — but with no protection rules and no deployment branch policy, meaning any branch may deploy to it. Group 2 is half-done and the missing half is the branch restriction. Noted inline on task 2.1 so nobody assumes it is complete. Inert today since no workflow references it; load-bearing the moment PR 3 does.@taskless/cli-nightlyis confirmed unclaimed on npm.Verification
pnpm lintclean ·pnpm typecheck1/1 ·pnpm test602 passing ·openspec validate --all --strict24/24 ·.github/scriptstests 113 passing across 4 files (turbo does not cover these, so they were run directly)Refs #111
Refs OSS-34
Built on top of #116
Proposal only — no implementation. Artifacts for a nightly build of the CLI published from
mainas a separate package, plus a split of the release workflows so each carries one design.What it proposes
@taskless/cli-nightly, published frommain, versionn.m.k-yyyymmddhhmmssx<sha>.changeset/empty (a directory listing, before any install), and is this SHA already builtnpm-autopublishenvironment for flows that publish without a human clickrelease.ymlandvale-binaries.yml, each with one trust storyThe design is argued in #111;
design.mdrecords the decisions with their reasoning rather than restating the conclusions.Built from
main, not from PRsThe original framing was "on PR update". That is what the title of #111 said until this proposal was written, and it does not survive contact with
release.yml's security model: a PR-triggered publish would route contributor-authored changeset text into a credentialed job, inverting the split that file exists to maintain, and would publish unreviewed code under the@tasklessscope.Tying builds to changeset edits does not work either. Measured on the #71→#106 stack,
add-vale-rule-enginehad 7 commits after its last changeset edit andagent-command-and-vale-authoringhad 11 — a nightly stamped at changeset-edit time would omit all of them while looking current.Delivery: stacked, merging forward, three PRs
release.yml's header, which claims "No required reviewers … by design" whilenpm-productiondemonstrably has a required reviewer.npm-autopublishand registering trusted publishing.npm-autopublish— tip, archives the change.The nightly deliberately precedes the Vale move. npm trusted-publisher bindings can be scoped to a GitHub environment. If the six
@taskless/vale-*bindings are, moving Vale first invalidates all of them and the next publish fails the OIDC handshake with no stored token to fall back on — trading a working release path for a convenience. The nightly exercises the same environment, handshake, and binding model on a package where failure is free: nothing resolves@taskless/cli-nightly, so a failed first publish blocks nobody. Stated generally indesign.md, because it outlives this change: prove a new credential path on something disposable before migrating something that works onto it.Two prerequisites no implementer can satisfy
Called out in the proposal body rather than buried in tasks, because they gate merges:
npm-autopublishenvironment must be created in repo settings — no required reviewers, branch policy onmain.@taskless/cli-nightlymust be published once manually and a trusted-publisher binding registered. Trusted publishing is per-package, and the package does not exist yet.Both sit as maintainer task groups before the nightly unit. A PR waits rather than merging with a dangling environment reference.
Gaps this surfaced in #111
Writing the design down found four things the discussion had left implicit, all captured as tasks:
changeset statusreturns an array; taking[0]breaks the day a second changesets-managed package appears. Filter by name.npm view … versionslists versions regardless of tag, so a version that published but failed to get tagged reads as already-built and is skipped forever. The Vale workflow handles that case explicitly; nightly's was left implicit.mainrequiresValidate; any branch-protection or breadcrumb reference to an old name silently stops reporting.openspec validate --all --strict: 24 passed, 0 failed.No changeset — a proposal ships nothing.
Refs #111
Refs OSS-34