chore(ci): remove staging_tag promotion path from release-production#3179
Conversation
The staging_tag promotion flow is no longer needed — production releases now always build from main (HEAD or a specific commit_sha) with a fresh version bump, matching how staging works. - Remove `release_source` choice input and `staging_tag` string input. - Remove the entire Path B (staging tag resolution, version verification, production tag creation from staging commit). - Simplify `review-approval` to always run (no longer conditional on release_source). - Simplify `prepare-build` — single linear flow: bump, verify, commit, push, optionally tag. - Simplify `Resolve build outputs` — no more branching on release_source. - Update staging workflow comment that referenced the promotion path.
📝 WalkthroughWalkthroughProduction release workflow removes release-source conditionals and simplifies job dependencies, checkout logic, and output resolution. Staging workflow documentation is updated to reflect optional tag creation. ChangesRelease Workflow Conditional Simplification
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/release-production.yml (1)
156-157: 💤 Low valueConsider using env var to mitigate template injection risk (flagged by static analysis).
While the version comes from an internal script and the workflow has an approval gate, passing
steps.bump.outputs.versiondirectly in the shell command could theoretically allow code injection if that output ever contained shell metacharacters. Using an env var is more defensive and consistent with the pattern used in nearby steps (e.g., lines 165-174).🛡️ Suggested hardening
- name: Verify release version sync + env: + VERSION: ${{ steps.bump.outputs.version }} - run: node scripts/release/verify-version-sync.js "${{ steps.bump.outputs.version }}" + run: node scripts/release/verify-version-sync.js "$VERSION"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release-production.yml around lines 156 - 157, Replace the direct interpolation of the bump output in the run command for the "Verify release version sync" step by exposing steps.bump.outputs.version as an environment variable (e.g., VERSION) and referencing that env var in the run invocation that calls node scripts/release/verify-version-sync.js; update the step metadata to include env: VERSION: ${{ steps.bump.outputs.version }} and change the run command to use the shell variable (e.g., "$VERSION") so the version value is passed safely via env rather than inline template expansion.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/release-production.yml:
- Around line 156-157: Replace the direct interpolation of the bump output in
the run command for the "Verify release version sync" step by exposing
steps.bump.outputs.version as an environment variable (e.g., VERSION) and
referencing that env var in the run invocation that calls node
scripts/release/verify-version-sync.js; update the step metadata to include env:
VERSION: ${{ steps.bump.outputs.version }} and change the run command to use the
shell variable (e.g., "$VERSION") so the version value is passed safely via env
rather than inline template expansion.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d845c071-2dc2-4a76-831f-19a45050aea4
📒 Files selected for processing (2)
.github/workflows/release-production.yml.github/workflows/release-staging.yml
sanil-23
left a comment
There was a problem hiding this comment.
@senamakel the cleanup itself reads well — collapsing the two-path (staging_tag vs main_head) branching into a single linear bump -> verify -> refresh-lockfiles -> commit -> push -> optional-tag flow is a real readability win, and the Resolve build outputs simplification is correct (the version/tag/sha now come straight from the bump/push steps with no fallback gymnastics). Net -167 lines of dead path. Nice.
Two things before I can approve:
-
CI — the coverage checks are still pending, so I'll hold the final approval until they go green.
-
Docs are now out of sync.
gitbooks/developing/release-policy.md(and itsrelease-policy.zh-CN.mdtranslation) still document the removed inputs as the supported and default release flow. After this merges, the docs describe aworkflow_dispatchform that no longer exists, so an operator following them will reach for inputs that are gone:- The whole "Promoting to production (default flow)" section instructs running with
release_source = staging_tag(described as the default) and leavingstaging_tagblank to promote the latestv*-staging. That path is entirely removed by this PR. - The "Hotfix from main HEAD" section references
release_source = main_head— which is now just the only path, not a mode you select. - The note that the
staging_tagpath is not gated byreview-approval, and the "Manual approval gate" section stating the gate isscoped to release_source == 'main_head', are both stale —review-approvalnow runs unconditionally for every production cut, which is actually a meaningful behavior change worth calling out in the docs rather than dropping silently.
Worth folding the doc update into this PR so the release runbook matches the workflow: replace the staging->production promotion section with the new single main-build flow, and update the approval-gate description to reflect that it always runs now.
- The whole "Promoting to production (default flow)" section instructs running with
Once CI is green and the docs are reconciled, I'll come back and approve.
Summary
staging_tagpromotion path fromrelease-production.yml— production releases now always build from main with a fresh version bump.release_sourcechoice andstaging_tagstring inputs.review-approval,prepare-build, andResolve build outputsto a single linear flow.Problem
staging_tagpromotion path in release-production.yml is obsolete now that staging no longer always creates tags (per PR chore(ci): simplify release workflows — remove pretests, add commit picker and bump-only mode #3177).Solution
release_sourcechoice input,staging_tagstring input, and the entire Path B (staging tag resolution, version verification across 4 manifest files, production tag creation from staging commit).review-approvalnow always runs (was previously conditional onrelease_source == 'main_head').prepare-buildis a single linear flow: bump → verify → refresh lockfiles → commit → push → optionally tag.Resolve build outputsno longer branches on release_source — reads directly from the bump/push step outputs.Submission Checklist
Impact
create_taginput.Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
pnpm --filter openhuman-app format:checkpnpm typecheck— no TS changesValidation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
Duplicate / Superseded PR Handling
Summary by CodeRabbit