feat(deploy): integrate haiperdohp-jemaytreeah calculator repository into per-repo deployment harness and verify all 25 HTTP routes (v1.2.0)

This commit is contained in:
Hermes Agent committed 2026-11-29 23:28:48 +00:00
1 parent fd2f671b9f
commit 360bf63e46
6 files changed
+51 -25

No files matched your search

+22 -11
View File
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
# /workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh
# Hydrates per-repository install directories from REPOS_ROOT into LIVE_REPOS (tmpfs RAM mount),
# builds calc/db.json if absent, creates top-level route symlinks, and pre-compresses (.br / .gz).
# builds haiperdohp-jemaytreeah/db_lite.json if absent, creates top-level route symlinks, and
# pre-compresses (.br / .gz) static assets.
#
# Usage:
# ./sync-vps-repos.sh all # Pull from git.libre.audio, audit & sync all 5 repos
# ./sync-vps-repos.sh all # Pull from git.libre.audio, audit & sync all repos
# ./sync-vps-repos.sh encyclopedia-knowledge-graph # Pull, audit & sync a single repo
# ./sync-vps-repos.sh --no-pull # Audit & sync existing local clones without network fetch
set -euo pipefail
@@ -16,7 +17,6 @@ export REPOS_ROOT="${REPOS_ROOT:-${DEFAULT_REPOS_ROOT}}"
export LIVE_REPOS="${LIVE_REPOS:-/var/www/hyperstitionstud.io/repos}"
TARGET_REPO="${1:-all}"
# Use sudo only when writing to a root-owned target directory as a non-root user
SUDO=""
if [[ "${EUID:-$(id -u)}" -ne 0 ]] && [[ ! -w "$(dirname "${LIVE_REPOS}")" ]] && command -v sudo >/dev/null 2>&1; then
SUDO="sudo"
@@ -31,7 +31,7 @@ if [[ -f "${REPOS_ROOT}/workspace.toml" ]]; then
export HYPERSTITIONSTUDIO_CONFIG="${REPOS_ROOT}/workspace.toml"
fi
# Detect whether the 5th repository is cloned as ingglish-hyperdope-ci or hyperdope-ci-build
# Detect whether the CI artifact repository is cloned as ingglish-hyperdope-ci or hyperdope-ci-build
CI_REPO_DIR="ingglish-hyperdope-ci"
if [[ ! -d "${REPOS_ROOT}/${CI_REPO_DIR}" ]] && [[ -d "${REPOS_ROOT}/hyperdope-ci-build" ]]; then
CI_REPO_DIR="hyperdope-ci-build"
@@ -42,6 +42,7 @@ REPOS=(
"ingglish-hyperdope-gematria:main"
"technocapital-singularity-zoology:main"
"encyclopedia-knowledge-graph:main"
"haiperdohp-jemaytreeah:main"
"${CI_REPO_DIR}:feat/ingglish-aq-corpus"
)
@@ -53,13 +54,23 @@ if [[ "${TARGET_REPO}" != "--no-pull" ]]; then
continue
fi
if [[ -d "${REPOS_ROOT}/${repo}/.git" ]]; then
echo "[1/4] Updating ${REPOS_ROOT}/${repo} (${branch})..."
git -C "${REPOS_ROOT}/${repo}" fetch origin "${branch}" --tags
git -C "${REPOS_ROOT}/${repo}" merge --ff-only "origin/${branch}"
remote_name="origin"
if [[ "${repo}" == "haiperdohp-jemaytreeah" ]] && git -C "${REPOS_ROOT}/${repo}" remote get-url downstream >/dev/null 2>&1; then
remote_name="downstream"
fi
echo "[1/4] Updating ${REPOS_ROOT}/${repo} (${remote_name}/${branch})..."
git -C "${REPOS_ROOT}/${repo}" fetch "${remote_name}" "${branch}" --tags
git -C "${REPOS_ROOT}/${repo}" merge --ff-only "${remote_name}/${branch}"
fi
done
fi
# Ensure db_lite.json and db.json exist inside haiperdohp-jemaytreeah (generated from db.txt if absent on fresh clone)
if [[ -d "${REPOS_ROOT}/haiperdohp-jemaytreeah" ]] && [[ ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/db_lite.json" ]] && [[ -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/tools/generate_db_json.py" ]]; then
echo "[build] Generating haiperdohp-jemaytreeah/db_lite.json and db.json from db.txt..."
(cd "${REPOS_ROOT}/haiperdohp-jemaytreeah" && "${PYTHON_BIN}" tools/generate_db_json.py >/dev/null)
fi
echo "[2/4] Running hs-doctor and 6-Gate Knowledge Graph Verification..."
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.doctor >/dev/null
"${PYTHON_BIN}" "${REPOS_ROOT}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only >/dev/null
@@ -77,7 +88,6 @@ for entry in "${REPOS[@]}"; do
fi
done
# Ensure canonical ingglish-hyperdope-ci directory name exists in LIVE_REPOS if sourced from hyperdope-ci-build
if [[ "${CI_REPO_DIR}" == "hyperdope-ci-build" ]] && [[ -d "${LIVE_REPOS}/hyperdope-ci-build" ]] && [[ ! -e "${LIVE_REPOS}/ingglish-hyperdope-ci" ]]; then
${SUDO} ln -sfn "hyperdope-ci-build" "${LIVE_REPOS}/ingglish-hyperdope-ci"
fi
@@ -88,15 +98,16 @@ ${SUDO} ln -sfn "encyclopedia-knowledge-graph" "${LIVE_REPOS}/graph"
${SUDO} ln -sfn "technocapital-singularity-zoology/encyclopedia" "${LIVE_REPOS}/encyclopedia"
${SUDO} ln -sfn "technocapital-singularity-zoology" "${LIVE_REPOS}/zoology"
${SUDO} ln -sfn "ingglish-hyperdope-gematria/ingglish-aq-archive" "${LIVE_REPOS}/archive"
${SUDO} ln -sfn "haiperdohp-jemaytreeah" "${LIVE_REPOS}/calc"
${SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/ci"
${SUDO} ln -sfn "hyperstitionstudio-core/schemas" "${LIVE_REPOS}/schemas"
echo "[4/4] Pre-compressing HTML, JS, JSON, XML, Canvas, MD & CSS assets (.br / .gz)..."
${SUDO} find "${LIVE_REPOS}" -type f \
echo "[4/4] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz)..."
${SUDO} find "${LIVE_REPOS}" -type f -size -5M \
\( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) \
-exec gzip -9 -k -f {} \;
if command -v brotli >/dev/null 2>&1; then
${SUDO} find "${LIVE_REPOS}" -type f \
${SUDO} find "${LIVE_REPOS}" -type f -size -5M \
\( -name "*.html" -o -name "*.js" -o -name "*.json" -o -name "*.graphml" -o -name "*.gexf" -o -name "*.canvas" -o -name "*.css" -o -name "*.md" \) \
-exec brotli -q 11 -k -f {} \;
fi