Gate5 Release Runbooks And Client Validation
Objective
Define one operational playbook for Gate5 release validation and incident handling across CLI, Web, OpenClaw, and agent-runtime client lanes.
Entry Criteria
Run this playbook only when foundational dependencies are complete:
#44consumer-driven mock contract checks merged.#45SLO and alert baseline merged.#75deployment profile reconciled to one active path.#80pre-release readiness dependency is either:- closed, or
- explicitly waived with rationale and approver reference recorded on
#150.
Release Validation Sequence
- Confirm required governance checks are green on release PRs:
contract-governancereview-governancedocs-governancellm-package-governancecontract-governancemust include:pytest backend/tests/contracts/test_sdk_validation_contract_shape.pypython -m src.platform_api.validation.release_gate_check
- Confirm deployment profile remains singular:
/docs/portal/operations/gate5-deployment-profile.md
- Confirm reliability closure evidence is current:
/docs/portal/operations/gate5-reliability-deployment-closure.md
- Execute lane-by-lane compatibility checks (below).
Cross-Client Compatibility Matrix
| Lane | Validation Surface | Primary Commands | Pass Criteria |
|---|---|---|---|
| CLI | Platform boundary + mock consumer checks | cd trading-cli && bun run ci | contract tests pass, no boundary drift |
| Web | OpenAPI + SDK contract compatibility | cd trade-nexus && bash contracts/scripts/verify-sdk-drift.sh | SDK in sync with OpenAPI contract |
| OpenClaw | Platform API lane contract + end-to-end flow | cd trade-nexus/backend && uv run --with pytest python -m pytest tests/contracts/test_openclaw_client_lane_contract.py tests/contracts/test_openclaw_e2e_flow.py | both suites pass |
| Agent runtime | risk/research/reconciliation/orchestrator contracts | cd trade-nexus/backend && uv run --with pytest python -m pytest tests/contracts | full contract suite passes |
Deployment Promotion And Rollback
Promotion and rollback follow the existing operational runbooks:
- Promotion guide:
/.ops/runbooks/release-promotion.md - Smoke validation:
/.ops/scripts/smoke-check.sh - Rollback automation:
/.ops/scripts/rollback.sh - SLO reference:
/.ops/runbooks/slo-definitions.md
Incident Handling Playbook
Scenario A: Contract Regression
- Contain: block merge and hold deployment promotion.
- Verify with:
pytest backend/tests/contracts/test_openapi_contract_baseline.pypytest backend/tests/contracts/test_openapi_contract_freeze.pybash contracts/scripts/check-breaking-changes.sh
- Recover: patch contract/runtime mismatch, rerun gates, and repost evidence on the release issue.
Scenario B: Reliability/SLO Breach
- Contain: halt release progression, run smoke checks, and assess active revision health.
- Verify with:
/.ops/scripts/smoke-check.sh- SLO baseline at
contracts/config/slo-alert-baseline.v1.json
- Recover: execute rollback (
/.ops/scripts/rollback.sh) if breach criteria are met.
Scenario C: Cross-Client Compatibility Failure
- Contain: freeze release and identify affected lane(s).
- Reproduce using lane-specific commands from the compatibility matrix.
- Recover: fix contract drift or client expectation mismatch, then rerun lane and governance checks.
Scenario D: Replay Gate Blocked (mergeGateStatus=blocked or releaseGateStatus=blocked)
- Contain:
- block merge and deployment promotion for the candidate revision,
- mark release status as
BLOCKEDin gate updates, - link the failing governance run in the child issue.
- Verify and reproduce with replay preflight:
- CI parity command (merge-time/deploy-time gate):
python -m src.platform_api.validation.release_gate_check
- Local pass validation:
PYTHONPATH=backend python3 -m src.platform_api.validation.release_gate_check --baseline-profile STANDARD --candidate-profile STANDARD --output /tmp/replay-gate-pass.json
- Local blocked reproduction:
PYTHONPATH=backend python3 -m src.platform_api.validation.release_gate_check --baseline-profile STANDARD --candidate-profile EXPERT --output /tmp/replay-gate-blocked.json
- CI parity command (merge-time/deploy-time gate):
- Recover:
- inspect replay output and reasons,
- remediate candidate policy/runtime drift,
- rerun governance checks and confirm replay gate returns pass status.
Evidence Recording
For each release candidate, capture:
- CI run URLs for required governance checks.
- Command output summaries per lane.
- Deployment revision and smoke-check outcome.
- Any rollback/incident actions executed.
- Replay-gate evidence when blocked:
- failing run URL (
contracts-governanceorbackend-deploy), - replay JSON fields:
id,decision,mergeBlocked,releaseBlocked,mergeGateStatus,releaseGateStatus,baselineDecision,candidateDecision,reasons, - remediation PR URL and post-fix rerun URL showing pass.
- failing run URL (
Use:
/.ops/templates/release-evidence.md/.ops/templates/drill-report.md
Traceability
- Child issue:
#147 - Parent epics:
#81,#106 - Signoff:
#150 - Related docs:
/docs/portal/operations/gate5-deployment-profile.md/docs/portal/operations/gate5-reliability-deployment-closure.md/docs/portal/operations/gate5-consumer-mock-contracts.md/docs/portal/operations/gate5-slo-alerting-baseline.md