|
| 1 | +# Stage 3 Cutover - Ship Checklist |
| 2 | + |
| 3 | +Generated by the Stage 3 pre-flight on the current `main` branch. Everything |
| 4 | +below has been **dry-run verified**. The actual cutover is one explicit go |
| 5 | +away. |
| 6 | + |
| 7 | +## Pre-cutover state (verified) |
| 8 | + |
| 9 | +- **Stage 2 gate:** 5/5 PASS (`scripts/run-stage2-gate.ps1`). |
| 10 | +- **Map:** `docs/EPISODE_MAP.json` validates against schema 1.0.0; 79 episodes |
| 11 | + (58 ep + 16 cc + 5 cc-bonus); UUIDs stable; track_number drives ordering. |
| 12 | +- **Audio inventory:** 79 mp3 files present in |
| 13 | + `podcasts/audio/kokoro-am_liam-af_jessica/`; 58 need rename, 21 already in |
| 14 | + new scheme. |
| 15 | +- **Working tree dirty:** 522 uncommitted files from prior Stage 1-2 work. |
| 16 | + Recommend committing or stashing these before Stage 3. |
| 17 | + |
| 18 | +## Built tools (this session) |
| 19 | + |
| 20 | +| Step | Tool | Status | |
| 21 | +| --- | --- | --- | |
| 22 | +| 3.1 | `podcasts/tools/dry_run_rename.py` | Dry-run PASS | |
| 23 | +| 3.2 | `podcasts/tools/rename_audio.py` (--apply, --finalize-map, --chapters-dir) | Preview PASS, preflight clean | |
| 24 | +| 3.5 | `scripts/rewrite-cross-links.ps1` (-Apply) | Dry-run PASS, 8 files / 509 reps | |
| 25 | + |
| 26 | +## Dry-run summary |
| 27 | + |
| 28 | +``` |
| 29 | +Stage 3.1 - rename plan |
| 30 | + 58 mp3 renames (e.g. ch-00-welcome.mp3 -> ch-00-welcome.mp3) |
| 31 | + 21 no-op (current_filename == filename) |
| 32 | + CSV: tmp-proposed-rename.csv |
| 33 | +
|
| 34 | +Stage 3.5 - cross-link rewrite (with .history, snapshots, transcripts excluded) |
| 35 | + 8 files, 509 replacements |
| 36 | + Largest: admin\PODCASTS.md (174), quality_triage_report.csv/.md (224 total), |
| 37 | + listening-order.json (58), validate-report.json (44) |
| 38 | + Report: tmp-crosslink-rewrite-report.txt |
| 39 | +``` |
| 40 | + |
| 41 | +## Fire sequence (locally reversible up through step 5) |
| 42 | + |
| 43 | +Run these commands in order. Each step is a separate commit so any single |
| 44 | +step can be reverted in isolation. |
| 45 | + |
| 46 | +### 0. Clean slate |
| 47 | + |
| 48 | +```powershell |
| 49 | +cd c:\code\git-going-with-github |
| 50 | +git checkout -b cutover-20260518 |
| 51 | +git add -A |
| 52 | +git commit -m "Pre-cutover state: Stage 1-2 work product + Stage 3 tooling" |
| 53 | +``` |
| 54 | + |
| 55 | +### 1. Rename audio + parallel chapter JSON (Stage 3.2) |
| 56 | + |
| 57 | +```powershell |
| 58 | +python podcasts\tools\rename_audio.py --apply --finalize-map |
| 59 | +git add -A |
| 60 | +git commit -m "Stage 3.2: rename audio to topic-prefixed filenames + finalize map" |
| 61 | +``` |
| 62 | + |
| 63 | +Effect: 58 mp3 files renamed, 58 chapter JSON files renamed, map's |
| 64 | +`current_filename`/`current_slug` updated to match `filename`. |
| 65 | + |
| 66 | +### 2. Retag ID3 (Stage 3.3) |
| 67 | + |
| 68 | +```powershell |
| 69 | +python podcasts\tools\tag_id3.py |
| 70 | +python podcasts\tools\verify_id3.py |
| 71 | +git add -A |
| 72 | +git commit -m "Stage 3.3: retag ID3 frames on renamed audio" |
| 73 | +``` |
| 74 | + |
| 75 | +Effect: TIT2, TRCK, TXXX:TOPIC updated; CHAP/CTOC untouched. Idempotent. |
| 76 | + |
| 77 | +### 3. Cross-link rewrite (Stage 3.5) |
| 78 | + |
| 79 | +```powershell |
| 80 | +powershell -NoProfile -ExecutionPolicy Bypass -File scripts\rewrite-cross-links.ps1 -Repo c:\code\git-going-with-github -Apply |
| 81 | +git add -A |
| 82 | +git commit -m "Stage 3.5: rewrite cross-links to new filename scheme" |
| 83 | +``` |
| 84 | + |
| 85 | +Effect: 509 replacements across 8 files (listening-order.json, PODCASTS.md, |
| 86 | +quality_triage_report.*, validate-report.json, etc.). |
| 87 | + |
| 88 | +### 4. Re-run Stage 2 gate |
| 89 | + |
| 90 | +```powershell |
| 91 | +powershell -NoProfile -ExecutionPolicy Bypass -File scripts\run-stage2-gate.ps1 |
| 92 | +``` |
| 93 | + |
| 94 | +Must return 5/5 PASS. If not, halt and investigate. |
| 95 | + |
| 96 | +### 5. Mirror to deploy repo (Stage 3.6) |
| 97 | + |
| 98 | +```powershell |
| 99 | +robocopy podcasts\audio\kokoro-am_liam-af_jessica c:\code\ggg\site\media *.mp3 /MIR |
| 100 | +``` |
| 101 | + |
| 102 | +Confirm file counts match: `(Get-ChildItem c:\code\ggg\site\media\*.mp3).Count`. |
| 103 | + |
| 104 | +### 6. Regenerate feed + site (Stages 3.7 - 3.8) |
| 105 | + |
| 106 | +```powershell |
| 107 | +cd c:\code\ggg |
| 108 | +node generator\generate-site.js |
| 109 | +node generator\validate-feed.js |
| 110 | +``` |
| 111 | + |
| 112 | +Spot-check `c:\code\ggg\site\feed.xml`. Confirm `<enclosure url>` points to |
| 113 | +the new filenames. (Cover art piece intentionally omitted per project |
| 114 | +constraint.) |
| 115 | + |
| 116 | +### --- IRREVERSIBLE LINE --- |
| 117 | + |
| 118 | +Steps below affect remote systems. Confirm step 6 looks correct before |
| 119 | +proceeding. |
| 120 | + |
| 121 | +### 7. Deploy (Stage 3.9) |
| 122 | + |
| 123 | +```powershell |
| 124 | +c:\code\ggg\deploy-ggg.ps1 -Backup |
| 125 | +c:\code\ggg\deploy-ggg.ps1 -DryRun # review the rsync delta |
| 126 | +c:\code\ggg\deploy-ggg.ps1 # live |
| 127 | +``` |
| 128 | + |
| 129 | +### 8. Smoke-test remote |
| 130 | + |
| 131 | +- `curl -I https://lp.csedesigns.com/ggg/feed.xml` -> 200 |
| 132 | +- Three sample enclosure URLs -> 200 |
| 133 | +- Three episode pages -> 200 |
| 134 | + |
| 135 | +### 9. Tag (Stage 3.10) |
| 136 | + |
| 137 | +```powershell |
| 138 | +cd c:\code\git-going-with-github |
| 139 | +git checkout main |
| 140 | +git merge --no-ff cutover-20260518 |
| 141 | +git tag v2-renumbered-20260518 |
| 142 | +git push origin main --tags |
| 143 | +
|
| 144 | +cd c:\code\ggg |
| 145 | +git tag v2-renumbered-20260518 |
| 146 | +git push origin main --tags |
| 147 | +``` |
| 148 | + |
| 149 | +## Rollback (steps 1-5) |
| 150 | + |
| 151 | +Any of steps 1-5 can be reverted with: |
| 152 | +```powershell |
| 153 | +git reset --hard HEAD~1 |
| 154 | +``` |
| 155 | + |
| 156 | +For audio rename specifically, `tmp-rename-audit.log` records every |
| 157 | +old -> new pair so a reverse rename script can be reconstructed. |
| 158 | + |
| 159 | +## What's intentionally excluded |
| 160 | + |
| 161 | +- **Cover art** (`<itunes:image>` in feed) - skipped per project constraint. |
| 162 | +- **`.history/` files** - VS Code Local History snapshots, not rewritten. |
| 163 | +- **`podcasts/_snapshot-pre-*/`** - intentional historical reference. |
| 164 | +- **`podcasts/transcripts/`** - workflow artifacts that key off old slug names |
| 165 | + in their own filename scheme; do not need rewrite for cutover. |
| 166 | + |
| 167 | +## Notes |
| 168 | + |
| 169 | +- All 522 currently-uncommitted files come from prior Stage 1-2 sessions. |
| 170 | + They have been validated by the Stage 2.8 gate. Committing them in step 0 |
| 171 | + is the cleanest restore point. |
| 172 | +- The cutover branch should be `cutover-20260518` per the REORG-PLAN.md |
| 173 | + specification. |
0 commit comments