Placeholder versions (0.0.0-dev) + in-runner stamping — zero release churn#62
Merged
Conversation
…urn) Enforce the Shipwright [SWR-VERSION-BUILD-STAMPING] contract: source version fields are placeholders and the real version is stamped from the tag in the CI runner working tree only — never committed, pushed, branched, or PR'd back. - Set every packages/*/pubspec.yaml version: to 0.0.0-dev (was 0.11.0-beta, and dart_node_sql_js was hard-coded at 0.13.0-beta). - Rewrite publish-tier1/2/3 workflows to stamp in-runner via prepare_publish and publish directly. Removes the release branch, the bot "prepare"/"switch to local" commits, and the "Create PR to main" step that bumped placeholders on main. Drop now-unneeded contents:write from tier1/tier3 (least privilege). - Document the placeholder contract in CLAUDE.md and the release skill; remove the stale "merge the release PR" / manual switch_deps steps. Releases now produce ZERO churn on tracked source. Inter-package deps stay as local path: deps in source and are rewritten to ^<version> in-runner at publish.
Closed
MelbourneDeveloper
added a commit
that referenced
this pull request
Jun 9, 2026
…churn (#62) ## TLDR Bring the release pipeline into conformity with Shipwright `[SWR-VERSION-BUILD-STAMPING]`: source `version:` fields become `0.0.0-dev` placeholders and the real version is stamped from the tag **in the CI runner working tree only** — never committed, pushed, branched, or PR'd back. Releases now produce **zero churn** on tracked source. ## What Was Changed? - **Placeholders everywhere:** every `packages/*/pubspec.yaml` `version:` → `0.0.0-dev` (the 9 were at `0.11.0-beta`; `dart_node_sql_js` was hard-coded at the release version `0.13.0-beta`). - **In-runner stamping, no churn:** `publish-tier1/2/3.yml` now run `dart run tools/prepare_publish.dart <version>` in a throwaway runner and publish directly. This removes: - the `release/<version>` branch, - the bot commits (`chore: prepare release …`, `chore: switch to local dependencies after publish` — the latter was `17a0abcf`), - the "Create PR to main" step (a PR that bumps a placeholder to a real version — the spec says such PRs MUST be rejected). - **Least privilege:** dropped `contents: write` / `pull-requests: write` from tier1 and `contents: write` from tier3 (`[SWR-SEC]`) — the jobs no longer write to the repo. - **Docs:** documented the placeholder contract in `CLAUDE.md` (new Releases rule) and the `release` skill; removed the stale "merge the release PR" / manual `switch_deps` steps. ## Why The previous flow stamped versions onto a release branch and opened a PR that bumped committed versions on `main` (PR #61), and tier3 committed a dep-switch back — all of which is source churn the contract forbids. `[SWR-VERSION-BUILD-STAMPING]`: *"All version fields in source … MUST be `0.0.0-dev` on every branch at all times"* and *"Release jobs MUST NOT commit, push, or move source-control refs after the tag exists."* ## How Do The Automated Tests Prove It Works? - Round-trip verified locally: `prepare_publish.dart 0.99.0-test` stamps `0.0.0-dev → 0.99.0-test` and rewrites every internal `path:` dep to `^0.99.0-test`; `git restore packages` returns the tree to `0.0.0-dev` + `path:` deps. So CI can stamp at publish without any committed change. - `dart pub get` resolves cleanly with `0.0.0-dev` path deps (versions are ignored for path sources). - Existing CI (Lint/Test/Build/Website) runs unchanged — package versions don't affect analyze/tests; the publishable packages remain 100%-covered. ## Breaking Changes - [x] None for consumers. Internal release-process change only: no more release branch or release PR; the already-published `0.13.0-beta` packages are unaffected. Next release stamps from its tag.
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.
TLDR
Bring the release pipeline into conformity with Shipwright
[SWR-VERSION-BUILD-STAMPING]: sourceversion:fields become0.0.0-devplaceholders and the real version is stamped from the tag in the CI runner working tree only — never committed, pushed, branched, or PR'd back. Releases now produce zero churn on tracked source.What Was Changed?
packages/*/pubspec.yamlversion:→0.0.0-dev(the 9 were at0.11.0-beta;dart_node_sql_jswas hard-coded at the release version0.13.0-beta).publish-tier1/2/3.ymlnow rundart run tools/prepare_publish.dart <version>in a throwaway runner and publish directly. This removes:release/<version>branch,chore: prepare release …,chore: switch to local dependencies after publish— the latter was17a0abcf),contents: write/pull-requests: writefrom tier1 andcontents: writefrom tier3 ([SWR-SEC]) — the jobs no longer write to the repo.CLAUDE.md(new Releases rule) and thereleaseskill; removed the stale "merge the release PR" / manualswitch_depssteps.Why
The previous flow stamped versions onto a release branch and opened a PR that bumped committed versions on
main(PR #61), and tier3 committed a dep-switch back — all of which is source churn the contract forbids.[SWR-VERSION-BUILD-STAMPING]: "All version fields in source … MUST be0.0.0-devon every branch at all times" and "Release jobs MUST NOT commit, push, or move source-control refs after the tag exists."How Do The Automated Tests Prove It Works?
prepare_publish.dart 0.99.0-teststamps0.0.0-dev → 0.99.0-testand rewrites every internalpath:dep to^0.99.0-test;git restore packagesreturns the tree to0.0.0-dev+path:deps. So CI can stamp at publish without any committed change.dart pub getresolves cleanly with0.0.0-devpath deps (versions are ignored for path sources).Breaking Changes
0.13.0-betapackages are unaffected. Next release stamps from its tag.