143143echo " ✓ bun install dry-run passes (bun.lock in sync)"
144144echo " "
145145
146- # ─── 3. Build verification ───────────────────────────
147- echo " ▶ Step 3: Full build"
146+ # ─── 3. CI browser dependency pre-flight ─────────────
147+ echo " ▶ Step 3: CI browser dependency"
148+ bunx playwright install --with-deps chromium
149+ echo " ✓ Playwright Chromium is installed for DOM contract tests"
150+ echo " "
151+
152+ # ─── 4. Build verification ───────────────────────────
153+ echo " ▶ Step 4: Full build"
148154bun run build
149155bun run build:beam
150156echo " ✓ Build passes"
151157echo " "
152158
153- # ─── 3 . Test suite ───────────────────────────────────
154- echo " ▶ Step 4 : Test suite"
159+ # ─── 5 . Test suite ───────────────────────────────────
160+ echo " ▶ Step 5 : Test suite"
155161if [ " ${PHOTON_RELEASE_ASSUME_TESTED:- } " = " 1" ]; then
156162 echo " ✓ Tests already passed in this release session"
157163else
@@ -160,8 +166,15 @@ else
160166fi
161167echo " "
162168
163- # ─── 5. Yield pattern check ─────────────────────────
164- echo " ▶ Step 5: Yield pattern verification"
169+ # ─── 6. Release-blocker regression checks ────────────
170+ echo " ▶ Step 6: Release-blocker regressions"
171+ bun tests/daemon-chaos.test.ts
172+ bun tests/contract/render-dom.test.ts
173+ echo " ✓ Daemon spawn-race and DOM rendering regressions pass"
174+ echo " "
175+
176+ # ─── 7. Yield pattern check ─────────────────────────
177+ echo " ▶ Step 7: Yield pattern verification"
165178# Check multi-line yields: line with 'yield {' must be followed by emit:/ask:/checkpoint:
166179# Uses awk to pair yield lines with their next line
167180# Check that each 'yield {' has emit:/ask:/checkpoint: on same line or next line
186199echo " ✓ All generator yields use emit pattern"
187200echo " "
188201
189- # ─── 6 . Dependency audit ────────────────────────────
190- echo " ▶ Step 6 : Runtime dependency check"
202+ # ─── 8 . Dependency audit ────────────────────────────
203+ echo " ▶ Step 8 : Runtime dependency check"
191204# Check that key runtime imports are in dependencies, not devDependencies
192205DEPS=$( node -e " const p=require('./package.json'); console.log(Object.keys(p.dependencies||{}).join(' '))" )
193206MISSING=" "
203216echo " ✓ Runtime dependencies present"
204217echo " "
205218
206- # ─── 7 . Fresh install simulation ────────────────────
207- echo " ▶ Step 7 : Fresh install simulation"
219+ # ─── 9 . Fresh install simulation ────────────────────
220+ echo " ▶ Step 9 : Fresh install simulation"
208221FRESH_DIR=$( mktemp -d)
209222FRESH_HOME=" $FRESH_DIR /.photon-home"
210223export PHOTON_DIR=" $FRESH_DIR "
@@ -218,7 +231,7 @@ cleanup_fresh() {
218231}
219232trap cleanup_fresh EXIT
220233
221- # Test 6a : Beam starts with only internal photons
234+ # Test 9a : Beam starts with only internal photons
222235echo " Testing Beam startup..."
223236BEAM_LOG=$( mktemp)
224237PHOTON_DIR=" $FRESH_DIR " PHOTON_HOME=" $FRESH_HOME " node dist/cli.js beam > " $BEAM_LOG " 2>&1 &
259272echo " ✓ No errors during startup"
260273rm -f " $BEAM_LOG "
261274
262- # Test 6b : Marketplace search works
275+ # Test 9b : Marketplace search works
263276echo " Testing marketplace search..."
264277SEARCH_OUT=$( PHOTON_DIR=" $FRESH_DIR " PHOTON_HOME=" $FRESH_HOME " node dist/cli.js search web 2>&1 )
265278if echo " $SEARCH_OUT " | grep -q " web" ; then
270283 exit 1
271284fi
272285
273- # Test 6c : Photon install works
286+ # Test 9c : Photon install works
274287echo " Testing photon install..."
275288ADD_OUT=$( PHOTON_DIR=" $FRESH_DIR " PHOTON_HOME=" $FRESH_HOME " node dist/cli.js add web 2>&1 )
276289if echo " $ADD_OUT " | grep -q " Added web" ; then
@@ -286,9 +299,9 @@ rm -rf "$FRESH_DIR"
286299unset PHOTON_DIR
287300unset PHOTON_HOME
288301
289- # ─── 8 . Visual tests (optional — requires lookout + MLX) ────
302+ # ─── 10 . Visual tests (optional — requires lookout + MLX) ────
290303echo " "
291- echo " ▶ Step 8 : Visual tests (lookout AI)"
304+ echo " ▶ Step 10 : Visual tests (lookout AI)"
292305if command -v photon > /dev/null 2>&1 && photon lookout status -y 2> /dev/null | grep -q ' "ready": true\|ready.*true' ; then
293306 echo " Lookout available — running visual tests..."
294307 bun run test:visual
@@ -297,16 +310,16 @@ else
297310 echo " ⏭ Lookout not available (no MLX or photon not installed) — skipping"
298311fi
299312
300- # ─── 9 . Promise validation (core intents — release gate) ────
313+ # ─── 11 . Promise validation (core intents — release gate) ────
301314echo " "
302- echo " ▶ Step 9 : Promise validation"
303- echo " ✓ Platform promises validated by Step 4 full suite"
315+ echo " ▶ Step 11 : Promise validation"
316+ echo " ✓ Platform promises validated by Step 5 full suite"
304317# Restore test fixture data files
305318git checkout -- tests/fixtures/.data/ 2> /dev/null || true
306319
307- # ─── 10 . Global install simulation ────
320+ # ─── 12 . Global install simulation ────
308321echo " "
309- echo " ▶ Step 10 : Global install simulation"
322+ echo " ▶ Step 12 : Global install simulation"
310323PACK_TGZ=$( bun pm pack --quiet 2> /dev/null | tail -1)
311324PACK_ABS=" $( pwd) /$PACK_TGZ "
312325if [ -f " $PACK_ABS " ]; then
327340 echo " ⏭ bun pack failed — skipping install test"
328341fi
329342
330- # ─── 10 . Production dependency verification ────
343+ # ─── 13 . Production dependency verification ────
331344echo " "
332- echo " ▶ Step 11 : Production dependency verification"
345+ echo " ▶ Step 13 : Production dependency verification"
333346PROD_DIR=$( mktemp -d)
334347PACK_CHECK=$( bun pm pack --quiet 2> /dev/null | tail -1)
335348if [ -f " $PACK_CHECK " ]; then
0 commit comments