Spaces:
Running
Running
Release Process
This document defines the minimum release checklist for Token Cost Guard.
1) Pre-release checks
- Ensure branch is up to date and CI is green.
- Run local checks:
npm run lintnpm testnpm run security:checknpm run bench:baseline(optional local smoke baseline)
- Validate operational readiness:
GET /api/v1/healthGET /api/v1/ops/metricsGET /api/v1/metrics(Prometheus format)
- Trigger benchmark workflow manually if release risk is high:
.github/workflows/benchmark.yml
2) Versioning
- Use semantic version tags:
vMAJOR.MINOR.PATCH. - Recommended:
PATCH: bug fixes, no API contract break.MINOR: additive features / endpoints.MAJOR: breaking API or behavior changes.
3) Release execution
- Merge to
main. - Create annotated tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z"
- Push tag:
git push origin vX.Y.Z
- Wait for
.github/workflows/release.ymlto finish. - Confirm generated artifacts and GitHub Release notes.
- Confirm benchmark gate passed (if workflow was run).
4) Post-release verification
- Smoke test key endpoints in production/staging:
POST /api/v1/optimizeGET /api/v1/policies/auditGET /api/v1/alerts
- Check dead-letter backlog:
GET /api/v1/alerts/dead-letters
- Confirm alert webhook delivery success trend via metrics.
5) Rollback trigger and action
Trigger rollback if one or more are true:
- sustained 5xx increase,
- major latency regression,
- incorrect policy behavior in production.
Actions:
- Switch traffic to degraded-safe mode (
fastwhere needed). - Trigger
POST /api/v1/policies/rollback. - Verify health and replay baseline tests.