|
| 1 | +# Release Readiness Gate |
| 2 | + |
| 3 | +This document defines the mandatory pre-release readiness review for CPA Manager Plus. |
| 4 | +It runs before the release branch workflow in `docs/release.md`. |
| 5 | + |
| 6 | +When an operator asks to publish a version such as `v1.12.14`, the release process starts here. |
| 7 | +Do not create the release branch, write release files, promote `dev`, dispatch the release workflow, |
| 8 | +or create a tag until this gate has passed for the reviewed candidate SHA. |
| 9 | + |
| 10 | +The purpose of this gate is to answer one question first: |
| 11 | + |
| 12 | +> Is the current `dev` candidate actually ready to become a release? |
| 13 | +
|
| 14 | +The gate is evidence-driven and risk-based. It must not become a fixed checklist that forces |
| 15 | +unrelated manual testing on every release. |
| 16 | + |
| 17 | +## Candidate And Evidence |
| 18 | + |
| 19 | +Record the current remote `dev` tip as the **readiness candidate SHA** and evaluate the exact range |
| 20 | +from the previous stable release tag through that SHA. |
| 21 | + |
| 22 | +The readiness record must contain: |
| 23 | + |
| 24 | +- target version and previous stable tag; |
| 25 | +- readiness candidate SHA; |
| 26 | +- release-relevant PRs and issues in the candidate range; |
| 27 | +- product/runtime/data/upgrade/deployment/UI risk summary; |
| 28 | +- UI risk class (`UI-0`, `UI-1`, or `UI-2`); |
| 29 | +- required manual QA matrix, when applicable; |
| 30 | +- findings and their disposition; |
| 31 | +- final readiness result: `PASS` or `BLOCKED`. |
| 32 | + |
| 33 | +Automated CI results are supporting evidence, not a substitute for manual product validation when |
| 34 | +manual validation is required below. |
| 35 | + |
| 36 | +## Readiness Review Dimensions |
| 37 | + |
| 38 | +Review only dimensions materially affected by the candidate, but explicitly consider each one: |
| 39 | + |
| 40 | +1. **Product scope and responsibility boundary** |
| 41 | + - Confirm the release contains only intended 1.x work. |
| 42 | + - Identify unfinished or accidentally included behavior. |
| 43 | + - Check open issues/PRs that can invalidate the release scope. |
| 44 | + - Reject architecture-level expansion that belongs to 2.0 or upstream CPA. |
| 45 | + |
| 46 | +2. **Runtime and upstream contracts** |
| 47 | + - Check CPA/API/provider/quota/subscription contract changes. |
| 48 | + - Check unknown or future fields, fallback behavior, and round-trip preservation when relevant. |
| 49 | + - Check state-machine, concurrency, retry, and error-path changes introduced by the release. |
| 50 | + |
| 51 | +3. **Data and upgrade safety** |
| 52 | + - Check SQLite schema/migrations, cache rebuild behavior, persistence compatibility, and old data. |
| 53 | + - Check configuration or environment-variable changes. |
| 54 | + - Check direct upgrade from the previous supported stable release. |
| 55 | + |
| 56 | +4. **Deployment and packaging** |
| 57 | + - Check Docker, native package, compose/config, first install, and existing-install upgrade paths |
| 58 | + when affected. |
| 59 | + - Check non-default deployment modes when the changed code touches their shared path. |
| 60 | + |
| 61 | +5. **UI and UX impact** |
| 62 | + - Classify UI risk using the rules below. |
| 63 | + - Generate a release-specific manual QA matrix from the actual changed surfaces and shared |
| 64 | + components instead of using a universal page list. |
| 65 | + |
| 66 | +## UI Risk Classes |
| 67 | + |
| 68 | +### UI-0 — no meaningful UI risk |
| 69 | + |
| 70 | +Use `UI-0` when there is no UI change or only a trivial copy-only change with no layout or |
| 71 | +interaction impact. |
| 72 | + |
| 73 | +Manual UI walkthrough is not required. Automated checks and targeted content review are sufficient. |
| 74 | + |
| 75 | +### UI-1 — targeted UI validation |
| 76 | + |
| 77 | +Use `UI-1` for a localized change such as one page, one component, or a small interaction that does |
| 78 | +not materially change shared layout or navigation. |
| 79 | + |
| 80 | +Generate a targeted manual QA matrix covering the directly affected states and the most relevant |
| 81 | +shared-component consumers. The operator may record the result without a full application walkthrough. |
| 82 | + |
| 83 | +### UI-2 — mandatory detailed manual walkthrough |
| 84 | + |
| 85 | +Use `UI-2` when the release changes a broad or shared UI surface, including examples such as: |
| 86 | + |
| 87 | +- page or navigation restructuring; |
| 88 | +- list/detail redesigns; |
| 89 | +- table/card mode changes; |
| 90 | +- responsive layout or column-width behavior; |
| 91 | +- initialization or upgrade flows; |
| 92 | +- shared dialogs, selects, tables, cards, layout primitives, or global styling/tokens; |
| 93 | +- changes likely to alter long-text, localization, or multi-window quota layouts across screens. |
| 94 | + |
| 95 | +`UI-2` is a hard readiness gate. The release cannot proceed until the operator explicitly confirms |
| 96 | +that the generated manual QA matrix passed, with any findings either fixed or consciously accepted as |
| 97 | +non-blocking. |
| 98 | + |
| 99 | +## Manual UI QA Matrix |
| 100 | + |
| 101 | +Build the matrix dynamically from the changed surfaces. Include only applicable dimensions, but |
| 102 | +consider the following categories: |
| 103 | + |
| 104 | +- **Data states:** normal, loading, empty, error, disabled/unavailable, expired, missing/unknown fields, |
| 105 | + and unusually dense real-world data. |
| 106 | +- **Variant states:** table/card or other display modes, plan/provider/model variants, quota-window |
| 107 | + counts, and feature-specific states changed by the release. |
| 108 | +- **Localization:** Chinese, English, Russian, and any other affected locale; explicitly inspect long |
| 109 | + translated labels and overflow when layout-sensitive UI changed. |
| 110 | +- **Appearance and layout:** light/dark/system where relevant, supported viewport widths, wrapping, |
| 111 | + clipping, unexpected horizontal scrolling, alignment, and unstable column/card sizing. |
| 112 | +- **Interaction:** search, filter, sort, navigation, back/return state, menus, dialogs, tooltips, |
| 113 | + destructive actions, and keyboard/focus behavior where the changed surface uses them. |
| 114 | +- **Shared-component regression:** identify other screens that consume changed shared components and |
| 115 | + include representative regression checks outside the primary feature page. |
| 116 | + |
| 117 | +For a `UI-2` release, the generated checklist must name the concrete pages/components and states to |
| 118 | +walk through. A generic `Manual UI check` checkbox is not sufficient evidence. |
| 119 | + |
| 120 | +## Findings And Blocking Rules |
| 121 | + |
| 122 | +Classify findings by release impact rather than by how difficult they are to fix: |
| 123 | + |
| 124 | +- **Blocking:** broken primary workflow, data loss/corruption risk, migration failure, serious runtime |
| 125 | + contract break, inaccessible critical action, severe layout failure, or a regression that materially |
| 126 | + violates the intended release behavior. |
| 127 | +- **Non-blocking:** known limitation or cosmetic issue that does not invalidate the release and is |
| 128 | + explicitly accepted for this version. |
| 129 | +- **Out of scope:** valid issue not introduced by or required for this release. Track separately; do not |
| 130 | + expand the release into unrelated refactoring. |
| 131 | + |
| 132 | +A finding must not silently disappear from the readiness record. Record whether it was fixed, |
| 133 | +accepted as non-blocking, or moved out of scope. |
| 134 | + |
| 135 | +## SHA Binding And Invalidation |
| 136 | + |
| 137 | +Readiness approval is bound to the exact readiness candidate SHA, not to the moving `dev` branch. |
| 138 | + |
| 139 | +If `dev` advances after `PASS`: |
| 140 | + |
| 141 | +1. stop the release flow; |
| 142 | +2. compare the old candidate SHA with the new `dev` SHA; |
| 143 | +3. re-evaluate only the dimensions affected by the new delta; |
| 144 | +4. preserve prior manual evidence only when the new delta cannot affect it; |
| 145 | +5. run new targeted manual QA when the delta touches previously reviewed UI/runtime/data paths; |
| 146 | +6. record the new readiness candidate SHA before continuing. |
| 147 | + |
| 148 | +A release-notes-only or other provably non-runtime delta does not require blindly repeating unrelated |
| 149 | +UI walkthroughs. A shared UI/runtime change does. |
| 150 | + |
| 151 | +The same rule applies if a blocking finding is fixed: the fix produces a new candidate SHA and the |
| 152 | +readiness record must identify which prior evidence remains valid and which checks were repeated. |
| 153 | + |
| 154 | +## Required Handoff To The Release Workflow |
| 155 | + |
| 156 | +Gate 0 passes only when all of the following are true: |
| 157 | + |
| 158 | +- the candidate scope is understood and acceptable; |
| 159 | +- no unresolved blocking readiness finding remains; |
| 160 | +- required automated evidence is green or explicitly accounted for; |
| 161 | +- required `UI-1`/`UI-2` manual QA is complete; |
| 162 | +- `UI-2` has explicit operator confirmation; |
| 163 | +- the readiness candidate SHA still equals the current remote `dev` tip. |
| 164 | + |
| 165 | +The handoff to `docs/release.md` must include at least: |
| 166 | + |
| 167 | +```text |
| 168 | +Release Readiness |
| 169 | +Version: vX.Y.Z |
| 170 | +Candidate dev SHA: <full SHA> |
| 171 | +UI risk: UI-0 | UI-1 | UI-2 |
| 172 | +Runtime risk: Low | Medium | High |
| 173 | +Data/upgrade risk: Low | Medium | High |
| 174 | +Deployment risk: Low | Medium | High |
| 175 | +Manual QA: N/A | PASS | BLOCKED |
| 176 | +Findings: <summary or None> |
| 177 | +Result: PASS |
| 178 | +``` |
| 179 | + |
| 180 | +Only after this handoff is `PASS` may the normal release branch, release-content, promotion, dry-run, |
| 181 | +and tag/publish gates proceed. |
| 182 | + |
| 183 | +## Relationship To The Existing Release Gates |
| 184 | + |
| 185 | +The complete normal release model is: |
| 186 | + |
| 187 | +```text |
| 188 | +Gate 0 Release Readiness |
| 189 | + -> Gate 1 Integrate and Validate |
| 190 | + -> Gate 2 Tag and Publish |
| 191 | +``` |
| 192 | + |
| 193 | +Gate 0 validates the product candidate. Gate 1 validates the exact release integration and build. |
| 194 | +Gate 2 authorizes the irreversible tag/publication operation. |
| 195 | + |
| 196 | +Do not treat the operator's initial request to `publish vX.Y.Z` as permission to skip Gate 0 or as |
| 197 | +advance authorization for Gate 2. It starts the release process; irreversible publication still |
| 198 | +requires the exact final tag/SHA/dry-run evidence defined by `docs/release.md`. |
0 commit comments