Skip to content

Commit fc77196

Browse files
author
DavidQ
committed
BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE: add 3-second runtime-derived preview SVG generation for samples, keep scope limited to preview capture.
& BUILD_PR_SAMPLES_INDEX_FIXES_AND_TARGETED_PREVIEW_RETRY: narrow samples-system BUILD for index label cleanup, Sample 1303 local asteroid speed cap, and targeted preview SVG retry only where current SVG contains "Capture timeout".
1 parent f845cb9 commit fc77196

143 files changed

Lines changed: 615 additions & 249 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Codex Command
2+
3+
MODEL: GPT-5.4-codex
4+
REASONING: high
5+
6+
## COMMAND
7+
Execute `BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE` exactly as written.
8+
9+
## EXECUTION ENVIRONMENT (MANDATORY)
10+
- Target platform: Windows
11+
- Prefer Node.js or vanilla JS for any scripting or generation support
12+
- DO NOT run `npm install`
13+
- DO NOT create `package.json`
14+
- DO NOT create `package-lock.json`
15+
- DO NOT create or populate `node_modules/`
16+
- Do not depend on external screenshot tools or browser extensions
17+
18+
## HARD CONSTRAINTS
19+
- Do not modify gameplay logic except for minimal non-behavioral hooks strictly required for automated preview capture
20+
- Do not modify engine core unless absolutely required for capture orchestration
21+
- Do not change sample page layout
22+
- Do not change tags, titles, related samples, or engine-classes-used presentation
23+
- Do not modify `samples/index.html` except if strictly required to consume existing preview asset paths already used by the system
24+
- Do not modify `docs/dev/start_of_day/chatGPT/`
25+
- Do not modify `docs/dev/start_of_day/codex/`
26+
- Do not perform more work on `1316`, `1317`, or `1318`; preserve them exactly as they are now
27+
28+
## RUNTIME CAPTURE REQUIREMENT
29+
For each targeted sample:
30+
1. Load the actual runnable sample page
31+
2. Let the game/sample run for 3 seconds
32+
3. Capture the live canvas appearance at 3000 ms
33+
4. Generate/update the preview SVG asset from that runtime-derived canvas state
34+
35+
## ZIP OUTPUT REQUIREMENT
36+
Must produce:
37+
`<project folder>/tmp/BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE.zip`
38+
39+
Task is not complete until that ZIP exists at the exact requested path.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE: add 3-second runtime-derived preview SVG generation for samples, keep scope limited to preview capture, and leave 1316/1317/1318 untouched
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Next suggested command after this BUILD succeeds:
2+
3+
Create APPLY_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE docs-only acceptance bundle with exact files changed, exact validation performed, and explicit confirmation that 1316/1317/1318 were not modified.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Bundle type: BUILD
2+
PR purpose: Runtime-derived sample preview SVG capture after 3 seconds of gameplay/runtime
3+
4+
What this bundle changes:
5+
- Replaces the earlier broader direction with a narrowed runtime-preview-only BUILD
6+
- Explicitly freezes samples 1316, 1317, and 1318 from further changes
7+
- Preserves layout/metadata normalization for a separate future PR if needed
8+
9+
Non-goals:
10+
- No sample page layout work
11+
- No metadata/tag/title normalization
12+
- No Engine Classes Used formatting work
13+
- No further 1316/1317/1318 work
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
docs/
2+
dev/
3+
codex_commands.md
4+
commit_comment.txt
5+
next_command.txt
6+
reports/
7+
change_summary.txt
8+
file_tree.txt
9+
validation_checklist.txt
10+
pr/
11+
BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE.md
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Session validation gate applied:
2+
- Single PR purpose: yes
3+
- BUILD specific enough for Codex: yes
4+
- Scope minimized: yes
5+
- No vague repo-wide refactor language: yes
6+
- No fake claim of code already written: yes
7+
- No start_of_day directories touched: yes
8+
- 1316/1317/1318 explicitly protected: yes
9+
- ZIP-required output specified: yes
10+
11+
Codex validation to report:
12+
- representative runtime capture at 3000 ms confirmed
13+
- preview SVG assets created/updated for targeted samples
14+
- console clean for representative tested samples
15+
- exact changed files listed
16+
- exact validation listed
17+
- any uncaptured samples listed with exact reason
18+
- 1316/1317/1318 confirmed untouched
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE
2+
3+
## PR Purpose
4+
Generate runtime-derived preview SVG assets for samples by loading each runnable sample, allowing runtime/gameplay to proceed for 3 seconds, then capturing the live canvas appearance and producing the preview SVG from that runtime state.
5+
6+
## Scope
7+
In scope only:
8+
- sample preview generation script(s) or helper(s) directly responsible for preview creation
9+
- preview SVG output location used by the samples system
10+
- minimal automation hooks strictly required for capture orchestration
11+
- minimal docs/reporting for this PR
12+
13+
Out of scope:
14+
- gameplay changes
15+
- engine-core refactors
16+
- sample detail page layout changes
17+
- tag/title/related/engine-classes-used normalization
18+
- changes to `samples/index.html` except if strictly required to consume the existing preview asset path already used by the system
19+
- any additional work on Phase 13 samples `1316`, `1317`, or `1318`
20+
- any modification inside:
21+
- `docs/dev/start_of_day/chatGPT/`
22+
- `docs/dev/start_of_day/codex/`
23+
24+
## Frozen Samples
25+
Do not perform more work on:
26+
- `1316`
27+
- `1317`
28+
- `1318`
29+
30+
These samples are explicitly accepted visually as they are now and must not be restyled, relabeled, relaid out, or otherwise normalized in this PR.
31+
32+
## Required Implementation Shape
33+
1. Load each target sample's actual runnable sample page.
34+
2. Let the sample run for exactly 3000 ms before capture.
35+
3. Capture the live canvas appearance after that runtime window.
36+
4. Generate or update the preview SVG asset from that runtime-derived canvas state.
37+
5. Ensure the final preview asset is based on real runtime output, not a placeholder or manually drawn card.
38+
6. Keep changed-file count minimal and tightly scoped to runtime preview generation.
39+
40+
## Capture Rules
41+
- Use the sample's real canvas output.
42+
- Wait 3000 ms after runtime start before capture.
43+
- Prefer deterministic capture where feasible.
44+
- If a sample does not animate meaningfully, still capture its real canvas state at 3 seconds.
45+
- Do not hand-draw preview art.
46+
- Do not replace runtime-derived previews with generic cards.
47+
- Preserve existing approved appearance for `1316`, `1317`, and `1318`.
48+
49+
## Target Files
50+
Expected likely targets only if directly needed:
51+
- preview generation scripts/helpers
52+
- preview asset output folders/files used by the samples system
53+
- minimal automation support files directly required for runtime capture
54+
- docs under `docs/` for changed-file/validation reporting
55+
56+
## Validation Required
57+
- confirm preview SVG assets exist for all samples targeted by the generation path
58+
- confirm representative previews were captured from live runtime after 3 seconds
59+
- confirm no placeholder preview cards remain as final generated assets for targeted samples
60+
- confirm representative samples still load normally after any automation hooks
61+
- confirm console is clean for tested representative samples
62+
- report exact files changed
63+
- report exact validation performed
64+
- report any samples that could not be captured and the exact reason
65+
- confirm `1316`, `1317`, and `1318` were not modified in this PR
66+
67+
## Acceptance Criteria
68+
- Runtime preview generation works from actual sample canvas output.
69+
- Capture timing is 3 seconds from runtime start.
70+
- Preview assets are SVG outputs derived from runtime state.
71+
- Scope remains limited to preview generation.
72+
- `1316`, `1317`, and `1318` remain untouched.
73+
- ZIP output exists at the requested path.
74+
75+
## ZIP Output Requirement
76+
Must produce:
77+
- `<project folder>/tmp/BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE.zip`
78+
79+
ZIP must:
80+
- contain only repo-relevant delta output for this PR
81+
- exclude staged ZIPs from `<project folder>/tmp/`
82+
83+
## Fail Fast
84+
Stop and report failure immediately if:
85+
- preview generation requires unrelated metadata/layout normalization
86+
- runtime capture requires broad engine-core redesign
87+
- capture cannot be performed from the actual sample canvas
88+
- implementation would require changing `1316`, `1317`, or `1318`
89+
- ZIP output is missing at the exact requested path

docs/dev/CODEX_COMMANDS.md

Lines changed: 29 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,39 @@
1-
# Codex command for BUILD_PR_SAMPLES_PRESENTATION_PREVIEW_AND_METADATA_NORMALIZATION
1+
# Codex Command
22

3-
MODEL: GPT-5.4-codex
3+
MODEL: GPT-5.4-codex
44
REASONING: high
55

6-
COMMAND:
7-
Execute BUILD_PR_SAMPLES_PRESENTATION_PREVIEW_AND_METADATA_NORMALIZATION exactly as written.
6+
## COMMAND
7+
Execute `BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE` exactly as written.
88

9-
EXECUTION ENVIRONMENT (MANDATORY):
9+
## EXECUTION ENVIRONMENT (MANDATORY)
1010
- Target platform: Windows
1111
- Prefer Node.js or vanilla JS for any scripting or generation support
1212
- DO NOT run `npm install`
1313
- DO NOT create `package.json`
1414
- DO NOT create `package-lock.json`
1515
- DO NOT create or populate `node_modules/`
16-
- DO NOT use PowerShell for path construction, rename-heavy work, or ZIP path generation
17-
18-
PR PURPOSE:
19-
Normalize sample presentation, runtime-derived preview assets, metadata tags, and engine-class reporting consistently across the samples system.
20-
21-
EXPECTED TARGETS:
22-
- `samples/index.html`
23-
- sample metadata source(s) directly used for titles, tags, related items, and engine-classes-used presentation
24-
- minimal sample detail rendering files/templates/helpers directly controlling page layout
25-
- preview SVG generation path or preview mapping files directly needed for producing previews from the running sample canvas appearance
26-
- reporting docs under `docs/`
27-
28-
DO NOT:
29-
- modify gameplay code
30-
- modify engine core
31-
- change canonical paths
32-
- broaden scope beyond presentation / runtime-preview / metadata display normalization
33-
- modify `docs/dev/start_of_day/chatGPT/`
34-
- modify `docs/dev/start_of_day/codex/`
35-
36-
REQUIRED IMPLEMENTATION SHAPE:
37-
1. Create preview SVG assets for all samples based on the sample canvas appearance when running
38-
2. Do not use generic placeholder cards as the final preview source
39-
3. Remove preview image from sample detail pages
40-
4. Ensure sample page layout is:
41-
- H1
42-
- description
43-
- tags
44-
- canvas
45-
- related samples
46-
- engine classes used
47-
- navigation retained
48-
5. Normalize tags to classes used while excluding:
49-
- engine
50-
- theme
51-
- phase labels
52-
- sample numbers
53-
- sample names
54-
6. Normalize Engine Classes Used references consistently to the engine folder/class format
55-
7. Update `samples/index.html` labels for 1316 / 1317 / 1318 to exactly match the sample page titles
56-
8. Keep changed-file count minimal for the approved scope
57-
58-
VALIDATION (REQUIRED):
59-
- open representative sample pages and validate top-of-page structure
60-
- confirm preview image block is removed from sample pages
61-
- confirm tags remain at the top
62-
- confirm Related Samples is below the canvas and before Engine Classes Used
63-
- confirm Back to Samples and Prev / Next remain present and functional
64-
- confirm Engine Classes Used formatting is normalized
65-
- confirm tags exclude sample-number / phase / sample-name noise
66-
- confirm preview SVG assets exist and visually match the running canvas appearance for representative samples
67-
- confirm `samples/index.html` names for 1316 / 1317 / 1318 match sample page titles exactly
68-
- confirm Phase 13 samples 1316, 1317, 1318 still load
69-
- confirm console is clean for tested pages
70-
- report exact files changed
71-
- report exact validation performed
72-
73-
ZIP OUTPUT REQUIREMENT (HARD RULE):
74-
- MUST produce ZIP:
75-
<project folder>/tmp/BUILD_PR_SAMPLES_PRESENTATION_PREVIEW_AND_METADATA_NORMALIZATION.zip
76-
- ZIP must contain only repo-relevant delta output for this PR
77-
- Do not stage ZIP files from `<project folder>/tmp/`
78-
- Task is NOT complete until the ZIP exists at the exact requested path
79-
80-
FAIL FAST:
81-
- runtime preview SVG generation requires broad asset pipeline redesign
82-
- engine-class normalization requires engine-core changes
83-
- layout normalization requires unrelated page architecture rewrites
84-
- missing ZIP output at exact path
16+
- Do not depend on external screenshot tools or browser extensions
17+
18+
## HARD CONSTRAINTS
19+
- Do not modify gameplay logic except for minimal non-behavioral hooks strictly required for automated preview capture
20+
- Do not modify engine core unless absolutely required for capture orchestration
21+
- Do not change sample page layout
22+
- Do not change tags, titles, related samples, or engine-classes-used presentation
23+
- Do not modify `samples/index.html` except if strictly required to consume existing preview asset paths already used by the system
24+
- Do not modify `docs/dev/start_of_day/chatGPT/`
25+
- Do not modify `docs/dev/start_of_day/codex/`
26+
- Do not perform more work on `1316`, `1317`, or `1318`; preserve them exactly as they are now
27+
28+
## RUNTIME CAPTURE REQUIREMENT
29+
For each targeted sample:
30+
1. Load the actual runnable sample page
31+
2. Let the game/sample run for 3 seconds
32+
3. Capture the live canvas appearance at 3000 ms
33+
4. Generate/update the preview SVG asset from that runtime-derived canvas state
34+
35+
## ZIP OUTPUT REQUIREMENT
36+
Must produce:
37+
`<project folder>/tmp/BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE.zip`
38+
39+
Task is not complete until that ZIP exists at the exact requested path.

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
1-
BUILD_PR: normalize sample presentation, runtime-derived previews, tags, and engine-class reporting
2-
3-
- create preview SVG assets for all samples from the running sample canvas appearance
4-
- remove preview image blocks from sample pages
5-
- keep H1, description, and tags at the top
6-
- keep Back to Samples and Prev / Next navigation
7-
- move Related Samples below canvas and before Engine Classes Used
8-
- normalize Engine Classes Used references
9-
- normalize tags to classes used excluding engine/theme/system-noise labels
10-
- sync samples/index.html names for 1316/1317/1318 with sample page titles
11-
12-
No gameplay or engine-core scope included
1+
BUILD_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE: add 3-second runtime-derived preview SVG generation for samples, keep scope limited to preview capture, and leave 1316/1317/1318 untouched

docs/dev/NEXT_COMMAND.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
Create APPLY_PR_NETWORK_SAMPLES_RELOCATION_FROM_GAMES_TO_SAMPLES
1+
Next suggested command after this BUILD succeeds:
2+
3+
Create APPLY_PR_SAMPLES_RUNTIME_PREVIEW_SVG_CAPTURE docs-only acceptance bundle with exact files changed, exact validation performed, and explicit confirmation that 1316/1317/1318 were not modified.

0 commit comments

Comments
 (0)