Skip to content

Commit 25cad23

Browse files
committed
Repaired the GitHub Pages build environment by installing t... (+4 more)
- Repaired the GitHub Pages build environment by installing the declared Python dependencies under Python 3.12 and using deterministic `npm ci` installs. - Enabled the setup actions' npm and pip download caches, keyed from `package-lock.json` and `pip_requirements-dev.txt`. - Separated browser-derived scene-stat validation from the production Pages build. Pages now builds and uploads `dist/` without installing or launching Playwright; the fast ... - The failed Pages run stopped in `pipeline/gen_object_library.py` because `lxml` was declared but not installed. The workflow now consumes the repository dependency manife... - The local Pages build reached the browser-only scene-stat stage after generation, type-checking, and bundling, confirming that Python dependency installation was the r...
1 parent 70fd7cc commit 25cad23

6 files changed

Lines changed: 50 additions & 32 deletions

File tree

build_github_pages.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# dist/<protocol_name>.html -- one per entry in generated PROTOCOLS_INDEX,
1616
# templated from src/protocol_host_template.html
1717
# dist/.nojekyll -- GitHub Pages flag
18-
# generated/scene_render_stats/<scene>.stats.json -- renderer-derived scene geometry consumed by SCENE-LINT/SCENE-DESIGN
1918
#
2019
# Contract:
2120
# - Wipes dist/ from scratch.
@@ -158,14 +157,4 @@ test -f dist/style.css
158157
test -f dist/bench_basic.html
159158
test -f dist/scene_viewer.html
160159

161-
# 10. Generate scene render-stats (renderer-derived build evidence).
162-
# SCENE-LINT and SCENE-DESIGN consume generated/scene_render_stats/*.stats.json.
163-
# Generate them now that dist/ exists -- the renderer loads the built dist.
164-
# Stats only (no --png); PNG screenshots are optional human evidence.
165-
node tools/scene_to_png.mjs --all
166-
compgen -G "generated/scene_render_stats/*.stats.json" > /dev/null || {
167-
echo "ERROR: scene render stats were not generated" >&2
168-
exit 1
169-
}
170-
171-
echo "Built dist/ + scene render stats (GitHub Pages-ready)."
160+
echo "Built dist/ (GitHub Pages-ready)."

docs/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## 2026-07-30
4+
5+
### Fixes and Maintenance
6+
7+
- Repaired the GitHub Pages build environment by installing the declared
8+
Python dependencies under Python 3.12 and using deterministic `npm ci`
9+
installs.
10+
- Enabled the setup actions' npm and pip download caches, keyed from
11+
`package-lock.json` and `pip_requirements-dev.txt`.
12+
- Separated browser-derived scene-stat validation from the production Pages
13+
build. Pages now builds and uploads `dist/` without installing or launching
14+
Playwright; the fast and exhaustive validation front doors still render the
15+
required scene statistics explicitly before content validation.
16+
17+
### Developer Tests and Notes
18+
19+
- The failed Pages run stopped in `pipeline/gen_object_library.py` because
20+
`lxml` was declared but not installed. The workflow now consumes the
21+
repository dependency manifests instead of relying on runner-global tools.
22+
- The local Pages build reached the browser-only scene-stat stage after
23+
generation, type-checking, and bundling, confirming that Python dependency
24+
installation was the reported CI blocker. The browser launch then hit the
25+
known macOS sandbox Mach-port restriction, which no longer affects Pages.
26+
327
## 2026-07-29
428

529
### Behavior or Interface Changes

docs/FILE_STRUCTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ All gitignored (see [.gitignore](../.gitignore)):
370370
| `generated/protocol_materials.ts` | [gen_protocols.py](../pipeline/gen_protocols.py) (per-protocol material registry; keyed by protocol_name) |
371371
| `generated/flow_views/<protocol_name>.txt` | [gen_flow_view.py](../pipeline/gen_flow_view.py) (per-protocol audit view; not the design source) |
372372
| `generated/precomputed_layout.ts` | [precompute_layout.mjs](../pipeline/precompute_layout.mjs) (`PRECOMPUTED_LAYOUT`: per-scene `{ final: ComputedItem[] }` at canonical 16:9) |
373-
| `generated/scene_render_stats/<scene>.stats.json` | renderer-produced scene geometry stats (build evidence consumed by SCENE-LINT/SCENE-DESIGN), written by [build_github_pages.sh](../build_github_pages.sh) via [scene_to_png.mjs](../tools/scene_to_png.mjs) |
373+
| `generated/scene_render_stats/<scene>.stats.json` | renderer-produced scene geometry stats consumed by SCENE-LINT/SCENE-DESIGN, written by [scene_to_png.mjs](../tools/scene_to_png.mjs) after the Pages bundle is built |
374374
| `dist/` | [build_github_pages.sh](../build_github_pages.sh) (GitHub Pages bundle) |
375375
| `dist/assets/svg/<category>/<name>.svg` | SVG assets copied by [build_github_pages.sh](../build_github_pages.sh) |
376376
| `dist/scene_viewer.html` | Copied from `src/scene_viewer_template.html` during build |

run_fast_checks.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
# Runs (in order):
1010
# 1. Full build (./build_github_pages.sh). Regenerates generated/
1111
# (object_library, svg_manifest, scenes, protocols), precomputes the
12-
# static scene layout, type-checks, bundles into dist/, and renders
13-
# generated/scene_render_stats/<scene>.stats.json. That render step
14-
# (node tools/scene_to_png.mjs --all, run internally by
15-
# build_github_pages.sh) is REQUIRED before validate: SCENE-LINT's
16-
# geometry checks read the stats files, and without them validate
17-
# reports missing_render_evidence instead of a real geometry result.
18-
# 2. TypeScript gate (./check_codebase.sh: tsc, tsc --lint config,
12+
# static scene layout, type-checks, and bundles into dist/.
13+
# 2. Render scene statistics with Playwright
14+
# (node tools/scene_to_png.mjs --all). This is REQUIRED before
15+
# validation: SCENE-LINT's geometry checks read the stats files, and
16+
# without them validation reports missing_render_evidence instead of a
17+
# real geometry result.
18+
# 3. TypeScript gate (./check_codebase.sh: tsc, tsc --lint config,
1919
# eslint, prettier --check, node --test).
20-
# 3. Python tests (pytest tests/).
21-
# 4. Content validation (bash run_validate.sh), which reads the renderer
22-
# evidence produced in step 1.
20+
# 4. Python tests (pytest tests/).
21+
# 5. Content validation (bash run_validate.sh), which reads the renderer
22+
# evidence produced in step 2.
2323
#
2424
# Exit code is 0 only when every step passes. A step failure prints a
2525
# summary and exits non-zero immediately; it does not mask or skip later
@@ -132,17 +132,19 @@ trap print_summary EXIT
132132
SUMMARY_ENABLED=1
133133

134134
# 1. Full build: regenerates generated/, precomputes layout, type-checks,
135-
# bundles dist/, and renders generated/scene_render_stats/ (required
136-
# render evidence for run_validate.sh's SCENE-LINT stage below).
135+
# and bundles dist/.
137136
step_run build bash build_github_pages.sh
138137

139-
# 2. TypeScript gate (typecheck, typecheck:lint, lint, format:check, test:node).
138+
# 2. Render evidence for run_validate.sh's SCENE-LINT stage below.
139+
step_run render_stats node tools/scene_to_png.mjs --all
140+
141+
# 3. TypeScript gate (typecheck, typecheck:lint, lint, format:check, test:node).
140142
step_run typescript ./check_codebase.sh
141143

142-
# 3. Python tests.
144+
# 4. Python tests.
143145
step_run pytest pytest tests/
144146

145-
# 4. Content validation against generated evidence.
147+
# 5. Content validation against generated evidence.
146148
step_run validate bash run_validate.sh
147149

148150
# All steps complete; summary prints via EXIT trap. Exit 0 (failure paths

run_validate.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
#
33
# run_validate.sh validates the repository against EXISTING generated evidence.
44
# Scene layout validation reads renderer-produced stats from
5-
# generated/scene_render_stats/<scene>.stats.json, produced by build_github_pages.sh.
5+
# generated/scene_render_stats/<scene>.stats.json, produced by
6+
# `node tools/scene_to_png.mjs --all` after building dist/.
67
# This script validates only: it never renders scenes or parses PNG pixels.
7-
# If the stats are missing, validation fails clearly -- run ./build_github_pages.sh first.
8+
# If the stats are missing, validation fails clearly -- build, then render the
9+
# scene statistics before running this script.
810
# Additional validator flags are forwarded, so release callers can run
911
# `./run_validate.sh --strict` to promote warnings to a failing exit status.
1012
set -e

super_all_tests.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,10 @@ main() {
163163
echo "Running the full suite. Details in $LOG"
164164
echo ""
165165

166-
# --- 1. Build first. validate, scene metrics, and the browser tests all
167-
# read what this produces (generated/, dist/, render stats). ---
166+
# --- 1. Build dist/, then render the scene statistics consumed by
167+
# validation and scene metrics. ---
168168
run "build" bash build_github_pages.sh
169+
run "render_stats" node tools/scene_to_png.mjs --all
169170

170171
# --- 2. Code and content gates. ---
171172
run "check_codebase" ./check_codebase.sh

0 commit comments

Comments
 (0)