From 1e5777d0fbfbc5de5cd813ad64055130ad85393b Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Sat, 28 Nov 2026 13:01:27 +0100 Subject: [PATCH] chore(phase38): add Phase 38 cross-repo verification gate script --- scripts/check-phase38.sh | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 scripts/check-phase38.sh diff --git a/scripts/check-phase38.sh b/scripts/check-phase38.sh new file mode 100755 index 00000000..84c7c0ee --- /dev/null +++ b/scripts/check-phase38.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +# Phase 38 verification gate: Extensible Journal embed providers. +# Runs Go (-race), Blog Editor build/Vitest/dist check, corpus byte-parity check, +# vue-journal-layer unit tests + playground SSR build + SSR smoke, and framework +# docs tree check across sm-journal-plugin, vue-journal-layer, and summercms.go. +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +PLUGIN_DIR="$(cd "${ROOT_DIR}/../sm-journal-plugin" && pwd)" +LAYER_DIR="$(cd "${ROOT_DIR}/../vue-journal-layer" && pwd)" + +echo "=== Phase 38 Stage 1: sm-journal-plugin Go vet & -race unit tests ===" +( + cd "${PLUGIN_DIR}" + go vet ./... + go test -race -short ./... +) + +echo "=== Phase 38 Stage 2: sm-journal-plugin Blog Editor build, Vitest & dist check ===" +( + cd "${PLUGIN_DIR}" + npm run build + npm run test + bash scripts/check-dist.sh +) + +echo "=== Phase 38 Stage 3: Blog Editor corpus byte-parity check ===" +PLUGIN_CORPUS="${PLUGIN_DIR}/tests/blogeditor/fixtures/editor-corpus.json" +LAYER_CORPUS="${LAYER_DIR}/tests/fixtures/editor-corpus.json" +if ! cmp -s "${PLUGIN_CORPUS}" "${LAYER_CORPUS}"; then + echo "ERROR: editor-corpus.json differs between sm-journal-plugin and vue-journal-layer" >&2 + diff -u "${PLUGIN_CORPUS}" "${LAYER_CORPUS}" >&2 || true + exit 1 +fi +echo "OK: editor-corpus.json is byte-identical across sm-journal-plugin and vue-journal-layer" + +echo "=== Phase 38 Stage 4: vue-journal-layer unit tests, playground build & SSR smoke ===" +( + cd "${LAYER_DIR}" + pnpm test + pnpm build:playground + pnpm smoke:ssr +) + +echo "=== Phase 38 Stage 5: summercms.go docs tree check ===" +( + cd "${ROOT_DIR}" + go test ./cmd/summer -run TestDocsTree +) + +echo "=== Phase 38 gate: ALL STAGES PASSED ==="