ci(release): auto-sync master → dev + version non-release builds from the manifest#484
Merged
Merged
Conversation
…rom the manifest Two gaps after a release-please release: the version/changelog commit that lands on master was never carried back to dev (dev's manifest sat at 0.4.0 while master reached 0.5.0), and every non-release build reported the frozen crate version 0.1.0 because only release.yml injects OVERSLASH_VERSION. - sync-dev.yml: on the release tag push, merge master into dev (never rebase — dev forbids non-fast-forward; never a sync PR — dev's squash-only rule would leave the release commit outside dev's history). Idempotent, fails loudly on conflict/403 with a pointer to the runbook. Needs RELEASE_PLEASE_TOKEN owned by a repo admin (the dev ruleset's bypass actor). - overslash-core build.rs now emits OVERSLASH_VERSION from .release-please-manifest.json with a -dev suffix (0.5.0-dev) when the release workflow didn't set it, so local + dev-deployment builds report the real release line while Cargo.toml stays pinned at 0.1.0 (D19). Dockerfile copies the manifest into the build context so the Cloud Run image picks it up. - Docs: release runbook step 5, DECISIONS D19. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TqH5GWsrHigQYscRvUcMCW
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Two gaps in the release-please flow, both visible right now:
devdrifts frommasterevery release. The version/changelog commit release-please lands onmasterwas never carried back todev. The runbook's step 5 (a manualgit merge) was skipped for v0.5.0, sodev's manifest still says0.4.0whilemasterreached0.5.0.0.1.0. Crate versions inCargo.tomlare frozen at0.1.0on purpose (D19 — bumping them churnsCargo.lockand breaks the--lockedrelease build), and onlyrelease.ymlinjectsOVERSLASH_VERSION. So the dev Cloud Run deployment, local builds, and the dashboard sidebar footer (GET /v1/version) all say0.1.0.What
.github/workflows/sync-dev.yml— on the release tag push, mergemasterintodev. A merge, never a rebase (devforbids non-fast-forward pushes) and never a sync PR (dev's squash-only rule would leave the release commit outsidedev's history, so the drift would recur). Idempotent — exits early whendevalready containsmaster— and fails loudly on conflict or a rejected push, pointing at the runbook. NeedsRELEASE_PLEASE_TOKENowned by a repo admin (thedevruleset's bypass actor); same PATrelease-please.ymlalready uses.crates/overslash-core/build.rs— now emitsOVERSLASH_VERSIONfrom.release-please-manifest.jsonwith a-devsuffix (e.g.0.5.0-dev) when the release workflow didn't set it. The release path is unchanged: an explicitOVERSLASH_VERSIONstill wins verbatim. This is what makes the sync-back load-bearing rather than mere tidiness.crates/overslash-api/Dockerfile— copies the manifest into the build context (after the dependency-only build layer) so the Cloud Run image reports the release line too.Verification
cargo run -p overslash-cli -- --version→0.4.0-dev(was0.1.0; this branch's manifest is at 0.4.0).OVERSLASH_VERSION=0.9.9 cargo build …→ reports0.9.9, no suffix — release path intact.cargo test -p overslash-core build_info— green.vet(agentic) — no issues.sync-dev.ymlvalidated as YAML; the idempotent early-exit meansgh workflow run sync-dev.ymlis safe to dry-run once merged.🤖 Generated with Claude Code