|
| 1 | +# BUILD_PR_SAMPLES_INDEX_FIXES_AND_TARGETED_PREVIEW_RETRY |
| 2 | + |
| 3 | +## PR Purpose |
| 4 | +Apply one narrow samples-system fix bundle with three scoped actions only: |
| 5 | +1. update `samples/index.html` header/dropdown labeling |
| 6 | +2. fix the gameplay velocity explosion in Sample 1303 without engine changes |
| 7 | +3. retry runtime preview SVG generation only for the explicitly listed failed samples, and only when the generated SVG still contains the text `Capture timeout` |
| 8 | + |
| 9 | +This BUILD is docs-only. Codex owns all runtime/code edits. |
| 10 | + |
| 11 | +## Truth Boundary |
| 12 | +- ChatGPT created this BUILD bundle only. |
| 13 | +- Codex must write any code, runtime scripts, and regenerated SVG files. |
| 14 | +- Do not claim code completion unless Codex actually reports it. |
| 15 | + |
| 16 | +## Locked / Protected Areas |
| 17 | +Do **not** create, modify, replace, rename, or delete anything in: |
| 18 | +- `docs/dev/start_of_day/chatGPT/` |
| 19 | +- `docs/dev/start_of_day/codex/` |
| 20 | + |
| 21 | +## Hard Constraints |
| 22 | +- Single-purpose PR only |
| 23 | +- No engine-core changes |
| 24 | +- No layout changes outside `samples/index.html` |
| 25 | +- No metadata/tag system changes |
| 26 | +- Do not modify Samples `1316`, `1317`, or `1318` |
| 27 | +- Do not broaden scope to other samples |
| 28 | +- Do not re-run prior repo-wide failed-detection logic |
| 29 | +- Retry only the listed sample preview SVGs |
| 30 | +- Only regenerate a sample SVG when the current generated SVG contains the literal text `Capture timeout` |
| 31 | +- Let the runtime settle before capture with adaptive wait and a **minimum of ~3 seconds** |
| 32 | + |
| 33 | +## Scope Details |
| 34 | + |
| 35 | +### 1) `samples/index.html` |
| 36 | +Apply only these changes: |
| 37 | +- Remove the header reference text: |
| 38 | + - `(xxyy - xxzz)` |
| 39 | +- Update phase dropdown labels from the old format to exactly: |
| 40 | + - `Phase xx - <phase name>` |
| 41 | + |
| 42 | +Notes: |
| 43 | +- Keep the rest of `samples/index.html` behavior/layout intact. |
| 44 | +- Do not modify per-sample metadata/tag rendering. |
| 45 | + |
| 46 | +### 2) Gameplay Bug Fix — Sample 1303 |
| 47 | +Target: |
| 48 | +- `samples/phase13/1303/*` only, plus any sample-local files required by that sample |
| 49 | + |
| 50 | +Problem: |
| 51 | +- In **Sample 1303 - Asteroids World Systems**, asteroid velocity can explode to extreme values (example observed: `4336107765`), making asteroids unusably fast. |
| 52 | + |
| 53 | +Required fix: |
| 54 | +- Add a **sample-local** cap/clamp on asteroid velocity so asteroid speed remains visible/playable. |
| 55 | +- Choose a reasonable maximum speed consistent with Asteroids-style gameplay. |
| 56 | +- Preserve normal movement feel. |
| 57 | +- Do not change engine code. |
| 58 | +- Do not alter other phase 13 samples. |
| 59 | +- Do not change 1316/1317/1318. |
| 60 | + |
| 61 | +Acceptance for this bug: |
| 62 | +- Sample 1303 runs without runaway asteroid velocities. |
| 63 | +- Asteroids remain visible on screen and playable. |
| 64 | +- No engine files changed. |
| 65 | + |
| 66 | +### 3) Targeted Runtime Preview SVG Retry |
| 67 | +Retry preview generation **only** for the following samples: |
| 68 | + |
| 69 | +- `0102`,`0107`,`0110`,`0116`,`0117`,`0119` |
| 70 | +- `0206`,`0212`,`0218`,`0220`,`0221`,`0223` |
| 71 | +- `0305`,`0306`,`0307`,`0308`,`0311`,`0318`,`0320`,`0322`,`0324` |
| 72 | +- `0407`,`0409`,`0412` |
| 73 | +- `0508` |
| 74 | +- `0601`,`0603`,`0605`,`0607`,`0608`,`0612` |
| 75 | +- `0707`,`0709`,`0712` |
| 76 | +- `0801`,`0808` |
| 77 | +- `0904` |
| 78 | +- `1101`,`1102`,`1103` |
| 79 | +- `1201`,`1202`,`1203`,`1206`,`1207` |
| 80 | +- `1301`,`1302`,`1303`,`1305`,`1306`,`1307`,`1308`,`1309`,`1311`,`1313`,`1314`,`1315` |
| 81 | +- `1401`,`1404`,`1410`,`1418` |
| 82 | +- `1503`,`1506` |
| 83 | + |
| 84 | +Preview retry rule: |
| 85 | +- For each listed sample only, inspect the existing generated preview SVG. |
| 86 | +- If and only if the SVG contains the text `Capture timeout`, regenerate that sample’s runtime preview SVG. |
| 87 | +- If the SVG does **not** contain `Capture timeout`, leave it untouched. |
| 88 | +- Do not retry any samples not listed above. |
| 89 | +- Do not modify `1316`, `1317`, or `1318` even if adjacent logic would normally include them. |
| 90 | + |
| 91 | +Capture execution guidance: |
| 92 | +- Launch the sample runtime normally. |
| 93 | +- Wait adaptively before capture, with a hard minimum delay of ~3 seconds. |
| 94 | +- If a specific sample appears to need slightly longer stabilization, allow a slightly longer wait. |
| 95 | +- Capture the runtime canvas result. |
| 96 | +- Save back only the regenerated SVG for those samples that met the retry condition. |
| 97 | + |
| 98 | +## Suggested Codex Execution Order |
| 99 | +1. Update `samples/index.html` |
| 100 | +2. Fix Sample 1303 velocity cap using sample-local code only |
| 101 | +3. Process the targeted preview SVG retry list |
| 102 | +4. Validate changed files and package output ZIP |
| 103 | + |
| 104 | +## Validation Requirements |
| 105 | +Codex must report these validations explicitly: |
| 106 | + |
| 107 | +### A. Index validation |
| 108 | +- Confirm the `(xxyy - xxzz)` text is removed from `samples/index.html` |
| 109 | +- Confirm phase dropdown labels use `Phase xx - <phase name>` |
| 110 | +- Confirm no other samples layout files were changed |
| 111 | + |
| 112 | +### B. Sample 1303 validation |
| 113 | +- Identify the exact file(s) changed in Sample 1303 |
| 114 | +- Confirm no engine files changed |
| 115 | +- Confirm asteroid velocity is clamped/capped locally |
| 116 | +- Confirm sample remains playable and asteroids no longer accelerate to runaway values |
| 117 | + |
| 118 | +### C. Preview retry validation |
| 119 | +For the listed sample set only, report: |
| 120 | +- which samples had SVGs containing `Capture timeout` |
| 121 | +- which of those were retried/regenerated |
| 122 | +- which listed samples were skipped because their SVG did not contain `Capture timeout` |
| 123 | +- confirm no samples outside the list were retried |
| 124 | +- confirm `1316`, `1317`, `1318` were not touched |
| 125 | + |
| 126 | +### D. Packaging validation |
| 127 | +Produce a repo-structured delta ZIP containing only files relevant to this PR, plus the docs in this BUILD bundle. |
| 128 | +Expected output location: |
| 129 | +- `<project folder>/tmp/BUILD_PR_SAMPLES_INDEX_FIXES_AND_TARGETED_PREVIEW_RETRY_delta.zip` |
| 130 | + |
| 131 | +## Non-Goals |
| 132 | +- No engine cleanup/refactor |
| 133 | +- No repo-wide preview regeneration |
| 134 | +- No metadata/tag cleanup |
| 135 | +- No changes to sample page layouts beyond the requested `samples/index.html` text updates |
| 136 | +- No edits to 1316/1317/1318 |
| 137 | +- No APPLY docs in this step |
| 138 | + |
| 139 | +## Expected Codex Deliverable |
| 140 | +A repo-structured delta ZIP at: |
| 141 | +- `<project folder>/tmp/BUILD_PR_SAMPLES_INDEX_FIXES_AND_TARGETED_PREVIEW_RETRY_delta.zip` |
| 142 | + |
| 143 | +with only the files changed for: |
| 144 | +- `samples/index.html` |
| 145 | +- Sample 1303 local gameplay fix files |
| 146 | +- regenerated preview SVG files for the listed retry set that actually contained `Capture timeout` |
| 147 | +- supporting BUILD/PR docs if Codex includes them in its packaging flow |
0 commit comments