|
| 1 | +# PR_26171_059 Rollback Restore Plan |
| 2 | + |
| 3 | +## Purpose |
| 4 | + |
| 5 | +Commit the clean recovery state from latest `main` and document the work that must be restored after rollback. |
| 6 | + |
| 7 | +This PR is documentation-only. It does not reapply implementation work, does not reuse the disconnected PC branch, and does not cherry-pick broad contaminated history. |
| 8 | + |
| 9 | +## Baseline Evidence |
| 10 | + |
| 11 | +- Verified starting branch: `main`. |
| 12 | +- Removed leftover local-only PR_26171_057 report artifacts before branching. |
| 13 | +- Pulled latest `origin/main` with a fast-forward update. |
| 14 | +- Recovery baseline commit used for this PR branch: `20fd280c608917b960b3080484a5d28c51990ccb`. |
| 15 | +- Created scoped branch: `pr/26171-059-rollback-restore-plan`. |
| 16 | +- No runtime, toolbox, engine, API, or test implementation files are changed by this PR. |
| 17 | + |
| 18 | +## Restore List After Rollback |
| 19 | + |
| 20 | +1. Local API sign-in recovery |
| 21 | + - Inspect the sign-in page and its external JavaScript first. |
| 22 | + - Remove preview-disabled sign-in behavior. |
| 23 | + - Use the configured API URL instead of hardcoded preview-disabled behavior. |
| 24 | + - Submit email and password to the Local API session auth endpoint used by `npm run dev:local-api`. |
| 25 | + - On valid DEV credentials, create a Local API session and redirect to the expected signed-in destination. |
| 26 | + - On invalid credentials, show a visible actionable error. |
| 27 | + - Keep Continue Browsing for guest browsing. |
| 28 | + - Do not create fake login. |
| 29 | + - Do not use browser-owned auth as the source of truth. |
| 30 | + - Do not create custom password tables. |
| 31 | + - Do not change Create Account or Password Reset beyond keeping placeholders safe. |
| 32 | + |
| 33 | +2. Env diagnostics and runtime ports |
| 34 | + - Print all env keys one per row. |
| 35 | + - Mask secrets. |
| 36 | + - Print the active site, API, and database ports. |
| 37 | + |
| 38 | +3. Toolbox image restoration |
| 39 | + - Restore valid toolbox images. |
| 40 | + - Remove excessive `image-missing.svg` fallbacks. |
| 41 | + - Keep image restoration scoped to real existing assets or approved replacements. |
| 42 | + |
| 43 | +4. Text To Speech engine/audio rebuild |
| 44 | + - Use `old_text2speech-V2` as the functionality sample. |
| 45 | + - Move reusable Text To Speech engine code to `src/engine/audio/`. |
| 46 | + - Make `toolbox/text-to-speech/` consume the reusable engine module. |
| 47 | + - Restore old controls, options, and features from the working sample. |
| 48 | + - Do not use the wrong `tools/text2speech/` path. |
| 49 | + - Do not ship placeholder Text To Speech shell work that does not restore functionality. |
| 50 | + |
| 51 | +5. Game Journey table correction |
| 52 | + - Add row under the table. |
| 53 | + - Support inline edit row behavior. |
| 54 | + - Treat Note Tree as a subtable. |
| 55 | + - Show metadata in table columns. |
| 56 | + - Ensure system notes cannot be deleted. |
| 57 | + |
| 58 | +6. Game Journey post-rollback verification |
| 59 | + - Confirm friendly descriptions. |
| 60 | + - Confirm dashboard, targets, and insights only if those surfaces are still present on clean `main`. |
| 61 | + - Reapply missing approved Journey work only from clean `main`. |
| 62 | + |
| 63 | +## Reapply Rules |
| 64 | + |
| 65 | +- Every reapply PR starts from clean `main`. |
| 66 | +- Every reapply PR gets its own branch. |
| 67 | +- Every reapply PR is scoped to one approved purpose. |
| 68 | +- Do not reuse the disconnected branch. |
| 69 | +- Do not merge the disconnected branch. |
| 70 | +- Do not cherry-pick broad PC commits. |
| 71 | +- Prefer file-level or diff-level reapplication for approved scoped changes. |
| 72 | +- Exclude wrong-path work such as `tools/text2speech/`. |
| 73 | +- Exclude placeholder Text To Speech shell work. |
| 74 | +- Exclude unrelated report churn. |
| 75 | +- Run targeted validation only after each reapply PR implements its scoped change. |
| 76 | + |
| 77 | +## Approved Reapply Order |
| 78 | + |
| 79 | +1. Local API sign-in recovery. |
| 80 | +2. Env diagnostics and runtime ports. |
| 81 | +3. Toolbox image restoration. |
| 82 | +4. Text To Speech engine/audio rebuild from the old working Text To Speech sample. |
| 83 | +5. Game Journey table corrections if still missing. |
| 84 | +6. Game Journey post-rollback verification and approved follow-up only if still needed. |
| 85 | + |
| 86 | +## Discarded Contaminated Work |
| 87 | + |
| 88 | +- Disconnected PC branch history. |
| 89 | +- Broad cherry-picks from contaminated commits. |
| 90 | +- Wrong-path `tools/text2speech/` work. |
| 91 | +- Placeholder Text To Speech shell work. |
| 92 | +- Unrelated report churn. |
| 93 | +- Any implementation work not revalidated from clean `main`. |
| 94 | + |
| 95 | +## Validation Boundary |
| 96 | + |
| 97 | +This PR is limited to docs/static validation. It intentionally does not run Local API sign-in validation, Text To Speech runtime validation, toolbox image runtime validation, or Project Workspace validation because implementation reapply is out of scope for PR_26171_059. |
0 commit comments