| 1 | --- |
| 2 | name: codew-release-qa-sweep |
| 3 | description: "Use before claiming CodeWhale release work is done: run the full gate sweep and list the manual QA targets." |
| 4 | --- |
| 5 | |
| 6 | # CodeWhale Release QA Sweep |
| 7 | |
| 8 | Run this before claiming any CodeWhale release work is "done." A green automated |
| 9 | gate sweep plus the three manual QA targets is the evidence bar. No sweep, no |
| 10 | "done" — report exactly what was run and the result of each step. |
| 11 | |
| 12 | ## When to use |
| 13 | |
| 14 | - Before telling Hunter (or a PR thread) that release work is complete or |
| 15 | merge-ready. |
| 16 | - After harvesting/landing PRs into the release branch, before the publish boundary. |
| 17 | - When verifying a release candidate on the **real** landing branch |
| 18 | (e.g. `<release-branch>`), which is often local-only. |
| 19 | |
| 20 | ## Automated gate sweep |
| 21 | |
| 22 | Run from the repo root, in order. Stop on the first failure and report it. |
| 23 | |
| 24 | ```bash |
| 25 | # 0. Confirm you are on the real release head, not a main-based assumption. |
| 26 | git branch --show-current # expect e.g. <release-branch> |
| 27 | git status --short # working tree should be clean |
| 28 | |
| 29 | # 1. Formatting + stray whitespace/conflict markers |
| 30 | cargo fmt --all --check |
| 31 | git diff --check |
| 32 | |
| 33 | # 2. Library/protocol/cli/flow/state tests, locked |
| 34 | cargo test -p codewhale-config -p codewhale-protocol -p codewhale-cli \ |
| 35 | -p codewhale-workflow -p codewhale-state --locked |
| 36 | |
| 37 | # 3. TUI test binaries, locked |
| 38 | cargo test -p codewhale-tui --bins --locked |
| 39 | |
| 40 | # 4. Real-PTY release runtime QA (sealed HOME + loopback providers) |
| 41 | cargo test -p codewhale-tui --test release_runtime_qa --locked -- --test-threads=1 |
| 42 | |
| 43 | # 5. TUI debug build, locked |
| 44 | cargo build -p codewhale-tui --locked |
| 45 | |
| 46 | # 6. Release build for the shipped binaries, locked |
| 47 | cargo build --release --locked -p codewhale-cli -p codewhale-tui |
| 48 | |
| 49 | # 7. Version-drift gate (workspace ↔ npm ↔ Cargo.lock ↔ changelog ↔ README) |
| 50 | ./scripts/release/check-versions.sh |
| 51 | |
| 52 | # 8. Binary smoke |
| 53 | ./target/release/codewhale --version |
| 54 | ``` |
| 55 | |
| 56 | If you are validating a PR for landing, also test mergeability against the |
| 57 | **actual** release head, never the main-based clean flag: |
| 58 | |
| 59 | ```bash |
| 60 | git merge-tree $(git merge-base <release-branch> <pr-head>) <release-branch> <pr-head> |
| 61 | ``` |
| 62 | |
| 63 | A PR that is clean against `main` can still conflict with the release branch. |
| 64 | |
| 65 | ## Manual QA targets |
| 66 | |
| 67 | Unit/build gates do not cover the live TUI. Exercise all three and record what you saw: |
| 68 | |
| 69 | The repeatable local baseline is `release_runtime_qa`: it boots real TUI |
| 70 | processes in pseudo-terminals with sealed homes and loopback mock providers, |
| 71 | then asserts each scenario below. Run it even when doing a separate hands-on |
| 72 | visual pass; the test leaves no provider traffic or credentials behind. |
| 73 | |
| 74 | 1. **Six-worker fanout liveness (#3216/#2211).** Spawn 6 sub-agents. Confirm |
| 75 | typing, render, cancel, and the sidebar stay live throughout, and that **Esc |
| 76 | cancels mid-fanout** (prompt interrupt, not a wedged ~24s burst or freeze). |
| 77 | For the Windows Terminal retest path from #3289, start in plan mode, add |
| 78 | follow-up input to the plan, press Esc, switch to yolo/accept flow, trigger |
| 79 | at least two auto/Fleet worker spawns, and keep typing/cancel/mode-switch |
| 80 | checks live for several minutes. Attach logs if the freeze reproduces. |
| 81 | 2. **Multi-terminal route isolation (#3227).** Open multiple terminals on |
| 82 | distinct provider/model routes. Confirm zero cross-terminal contamination and |
| 83 | no provider+model mismatch — each terminal honors its own route. |
| 84 | 3. **Running-turn input contract (#3203).** During a busy turn, confirm Enter |
| 85 | queues a typed follow-up, the preview advertises **Enter send now**, and an |
| 86 | empty Enter promotes the oldest queued follow-up. Confirm Ctrl+Enter steers |
| 87 | typed text directly, Shift+Enter inserts a newline, and Ctrl+G/Ctrl+S only |
| 88 | stash drafts. |
| 89 | |
| 90 | ## Reporting format |
| 91 | |
| 92 | Report a checklist: each command, pass/fail, and the salient output line |
| 93 | (test counts, the `--version` string, `check-versions.sh` verdict). For manual |
| 94 | QA, state what you actually observed per target, citing the issue number. If a |
| 95 | step was skipped or could not be run (e.g. no display for TUI QA), say so |
| 96 | explicitly — do not imply coverage you do not have. |
| 97 | |
| 98 | ## Red flags / don't |
| 99 | |
| 100 | - Don't claim "done," "passing," or "merge-ready" without the evidence above. |
| 101 | Assertions without command output are not acceptable. |
| 102 | - Don't trust the main-based mergeability flag for a release branch; use |
| 103 | `git merge-tree` against the real head. |
| 104 | - Don't skip the manual TUI targets because the build is green — the freeze, |
| 105 | route-mismatch, and steering regressions live in the runtime, not the gates. |
| 106 | - Don't tag, publish, create a GitHub Release, push artifacts, or merge/close |
| 107 | any PR or issue without Hunter's explicit approval. A green sweep is readiness |
| 108 | evidence, not permission. |
| 109 | - Never harvest/close from a PR title or label alone — review from code, tests, |
| 110 | comments, and checks. |
| 111 | - When the sweep clears a harvested PR, preserve contributor credit: cherry-pick |
| 112 | keeps the original author, otherwise add `Co-authored-by: Name <email>` and |
| 113 | `Harvested-from: PR #N by @handle` so the auto-close-at-main workflow credits |
| 114 | the contributor. |
| 115 | - Keep any contributor-facing comment positive and crediting; gates stay |
| 116 | dry-run/advisory unless Hunter approves enforcement. |
| 117 |