Skip to main content
IntermediateQuality & SecurityEst. Time: 20-30 min

PR & Release Safety Verification

Evaluate reversibility across 8 dimensions, verify CI status, and release SemVer tags safely with automated rollback readiness.

The Problem

Rushing releases without checking reversibility (e.g., destructive database migrations, external third-party API mutations) leads to prolonged downtime when bugs emerge in production.

Who It Is For

Release managers, operations engineers, and full-stack developers shipping production tags.

Prerequisites & Tools

Prerequisites Checklist:
  • Git remote configured
  • Automated CI/CD pipeline (GitHub Actions, GitLab CI)
Tool / CommandTypeRole in Tutorial
acquire_release_lockmcpPrevent concurrent overlapping releases
perform_releasemcpExecute release script and record release notes
record_deploymentmcpLog deployment evidence, version, and health status

Example Task Contract

Exact start_task payload representing this workflow in DevWorkflow local-first governance.

AI Tool Call: start_task payload
{
  "description": "Release patch version v2.1.2 with verified CI pipeline and post-deploy health check",
  "type": "other",
  "plan": [
    "Verify working tree is clean and all tests pass",
    "Run npm run release:patch to bump SemVer and generate changelog",
    "Monitor GitHub Actions CI runner on bw-tools",
    "Verify live production deployment answers HTTP 200"
  ],
  "definitionOfDone": [
    "SemVer tag created and pushed to origin",
    "CI/CD build and secret scan pipelines pass green",
    "Production website serves new release version"
  ]
}

Step-by-Step Tutorial Workflow

Follow these sequential actions with validated copyable commands and expected outputs.

1

Evaluate 8 Reversibility Dimensions

Before tagging, assess source revert, build artifact, DB schema, data recovery, and side effects.

Code / Tool Payload
Execution Payload
// Reversibility Assessment:
// - Source code revert: REVERSIBLE (clean git revert)
// - Build artifact: REVERSIBLE (atomic swap)
// - Database schema: REVERSIBLE (additive column, default null)
// Classification: REVERSIBLE
2

Check Ready to Commit

Verify clean working tree, passed tests, and completed Definition of Done criteria.

Code / Tool Payload
Execution Payload
// AI Tool Call: check_ready_to_commit
{}
// Result: Ready to commit. 0 open DoD items.
3

Release SemVer Tag & Push

Bump version via conventional commiter and push tag to origin to trigger CI/CD deployment.

Copyable Command
Terminal Command
npm run release:patch
Expected Terminal Output
Generating v2.1.2 from HEAD
✔ bumping version in package.json from 3.1.2 to 3.1.3
✔ outputting changes to CHANGELOG.md
✅ Release v2.1.2 complete; annotated tag verified on origin.

Verification Steps

Verify that your work genuinely satisfies the task contract before closing.

Run `git describe --tags` to verify local tag matches remote
Run `curl -I https://your-production-url.example` to verify HTTP 200 response

Limitations & Troubleshooting

Issue: Release tag rejected by protected tags policy
Resolution: Ensure CI token or GitHub App has write permissions on `v*` protected tags, or run release through automated release script.