Skip to content

Placeholder versions (0.0.0-dev) + in-runner stamping — zero release churn#62

Merged
MelbourneDeveloper merged 1 commit into
mainfrom
placeholder-versions
Jun 8, 2026
Merged

Placeholder versions (0.0.0-dev) + in-runner stamping — zero release churn#62
MelbourneDeveloper merged 1 commit into
mainfrom
placeholder-versions

Conversation

@MelbourneDeveloper

Copy link
Copy Markdown
Owner

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

  • 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.

…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.
@MelbourneDeveloper MelbourneDeveloper merged commit 64eaf42 into main Jun 8, 2026
4 checks passed
@MelbourneDeveloper MelbourneDeveloper deleted the placeholder-versions branch June 8, 2026 00:06
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.
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