docs: align CHRNX media contracts
This commit is contained in:
2 files changed
+27
-12
No files matched your search
@@ -83,12 +83,20 @@ responsive_output=$(mktemp -d "${TMPDIR:-/tmp}/chrnx-responsive.XXXXXX")
|
||||
|
||||
The rebuild rejects symlinks, nested paths, nonexistent paths, and destinations
|
||||
outside the canonical system temporary directory. The automated smoke test
|
||||
byte-compares all 40 outputs, validates their formats and dimensions, and
|
||||
enforces 160 KiB per derivative, 400 KiB for the collage family, and a 2.1 MiB
|
||||
total inventory bound.
|
||||
byte-compares all 52 generated files: 42 binary derivatives and 10 manifests.
|
||||
The inventory has nine portrait families at 384 px and 768 px, plus the Podcast
|
||||
background family at 384 px, 768 px, and 1536 px. Every 384/768 derivative is
|
||||
limited to 160 KiB; each 1536 px Podcast derivative is limited to 260 KiB. The
|
||||
collage, Gaming half-body, and Podcast families are capped at 400 KiB, 340 KiB,
|
||||
and 620 KiB respectively, while all generated binaries together are capped at
|
||||
2.75 MiB. The complete inventory, including manifests, must rebuild
|
||||
byte-identically.
|
||||
|
||||
The source masters remain unchanged. WordPress serves 384 px and 768 px AVIF or
|
||||
WebP sources, with the original source as a fallback.
|
||||
The builder uses transactional publication with rollback: a failed promotion
|
||||
restores the prior generated set, but does not promise an indivisible directory
|
||||
view to concurrent observers. The source masters remain unchanged. WordPress
|
||||
serves portrait AVIF/WebP sources at 384 px and 768 px and Podcast background
|
||||
sources at 384 px, 768 px, and 1536 px, with each original source as a fallback.
|
||||
|
||||
Capture the approved local review routes with Chromium:
|
||||
|
||||
@@ -120,8 +128,9 @@ The capture script rejects public hosts and writes its screenshots to
|
||||
`tmp/imagegen/grunge-stage-review.png/`, which Git ignores. The directory's
|
||||
`.png` suffix intentionally matches the existing review-artifact ignore rule;
|
||||
the script builds all 24 files in a private staging directory, validates the
|
||||
complete inventory, and publishes the directory as one fresh set; a failed
|
||||
capture leaves the prior published set unchanged. It captures the rendered
|
||||
complete inventory, and uses transactional publication with rollback; a failed
|
||||
capture or promotion restores the prior published set. This does not promise an
|
||||
indivisible directory view to concurrent observers. It captures the rendered
|
||||
Music and Podcasts pages at 375, 768, 1440, and 2560 px in light and dark themes.
|
||||
The long-copy Podcast state changes only the rendered latest-card title and
|
||||
excerpt; it does not write to the database. Source masters remain authoritative,
|
||||
|
||||
@@ -489,7 +489,7 @@ git commit -m "style: finish CHRNX music and podcast stages"
|
||||
- Modify: `scripts/capture-visual-review.mjs`
|
||||
- Modify: `tests/smoke/visual-integration.test.mjs`
|
||||
- Modify: `README.md`
|
||||
- Create temporarily, never commit: `tmp/imagegen/grunge-stage-*.png`
|
||||
- Create temporarily, never commit: `tmp/imagegen/grunge-stage-review.png/`
|
||||
|
||||
- [ ] **Step 1: Write failing capture-contract tests**
|
||||
|
||||
@@ -511,12 +511,15 @@ Keep the known fresh-browser isolation that prevents dark-to-light compositing c
|
||||
CHRNX_REVIEW_URL=http://localhost:8908 node scripts/capture-visual-review.mjs
|
||||
```
|
||||
|
||||
Describe the directory replacement accurately as transactional publication with rollback: failed capture or promotion restores the prior complete set, but concurrent observers are not promised an indivisible directory view.
|
||||
|
||||
- [ ] **Step 4: Run GREEN and capture all 24 review images**
|
||||
|
||||
```bash
|
||||
node --test tests/smoke/visual-integration.test.mjs
|
||||
CHRNX_REVIEW_URL=http://localhost:8908 node scripts/capture-visual-review.mjs
|
||||
find tmp/imagegen -maxdepth 1 -type f -name 'grunge-stage-*.png' -print | sort
|
||||
find tmp/imagegen/grunge-stage-review.png -maxdepth 1 -type f -name 'grunge-stage-*.png' -print | sort
|
||||
test "$(find tmp/imagegen/grunge-stage-review.png -maxdepth 1 -type f -name 'grunge-stage-*.png' -print | wc -l | tr -d ' ')" -eq 24
|
||||
```
|
||||
|
||||
Expected: exactly 24 screenshots total (Music, Podcast, Podcast long-copy × 4 widths × 2 themes), each produced by a fresh browser.
|
||||
@@ -551,7 +554,7 @@ git commit -m "test: capture CHRNX grunge stage review"
|
||||
**Files:**
|
||||
|
||||
- No new production files expected
|
||||
- Remove temporary/ignored: `.wp-env.override.json`, `tmp/imagegen/grunge-stage-*.png`, test rebuild directories, `test-results`, `playwright-report`, `.phpunit.result.cache`
|
||||
- Remove temporary/ignored: `.wp-env.override.json`, `tmp/imagegen/grunge-stage-review.png/`, test rebuild directories, `test-results`, `playwright-report`, `.phpunit.result.cache`
|
||||
|
||||
- [ ] **Step 1: Run preflight and exact fixture invariants**
|
||||
|
||||
@@ -602,10 +605,13 @@ Expected: only planned files/commits; no secrets, remote endpoints, embeds, debu
|
||||
```bash
|
||||
PATH=/opt/homebrew/opt/docker/bin:$PATH npx wp-env stop
|
||||
trash .wp-env.override.json 2>/dev/null || true
|
||||
find tmp/imagegen -maxdepth 1 -type f -name 'grunge-stage-*.png' -exec trash {} + 2>/dev/null || true
|
||||
if [ -e tmp/imagegen/grunge-stage-review.png ] || [ -L tmp/imagegen/grunge-stage-review.png ]; then
|
||||
node -e "const { lstatSync } = require('node:fs'); const stats = lstatSync( 'tmp/imagegen/grunge-stage-review.png' ); if (stats.isSymbolicLink() || !stats.isDirectory()) process.exit(1);"
|
||||
trash tmp/imagegen/grunge-stage-review.png
|
||||
fi
|
||||
trash test-results playwright-report .phpunit.result.cache 2>/dev/null || true
|
||||
test ! -e .wp-env.override.json
|
||||
test -z "$(find tmp/imagegen -maxdepth 1 -type f -name 'grunge-stage-*.png' -print -quit 2>/dev/null)"
|
||||
test ! -e tmp/imagegen/grunge-stage-review.png
|
||||
test ! -e test-results
|
||||
test ! -e playwright-report
|
||||
test ! -e .phpunit.result.cache
|
||||
|
||||
Reference in new issue
Block a user