feat(namespace): implement Plan #71 CI repo standardization, schema_version parity & path normalization
This commit is contained in:
1 parent
1e2968f84e
commit
3945e3648a
14 files changed
+62
-43
No files matched your search
@@ -3,8 +3,8 @@
|
|||||||
<!-- HS-COMMIT-STATUS:START -->
|
<!-- HS-COMMIT-STATUS:START -->
|
||||||
> **Gitea Commit & Release Telemetry (`v2.17.1` • Namespace `urn:io:hyperstitionstud`)**
|
> **Gitea Commit & Release Telemetry (`v2.17.1` • Namespace `urn:io:hyperstitionstud`)**
|
||||||
> - **Repository Role & Public Route:** Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots → [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
|
> - **Repository Role & Public Route:** Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots → [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
|
||||||
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 1 tracked module/artifact surface(s)
|
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 13 tracked module/artifact surface(s)
|
||||||
> - **Touched Files / Surfaces:** `tests/test_core_suite.py`
|
> - **Touched Files / Surfaces:** `deploy/push-all-to-git-libre-audio.sh`, `deploy/run-vps-data-production.sh`, `deploy/sync-vps-repos.sh`, `src/hyperstitionstud_io/ci/deploy_scripts_sync.py`, `src/hyperstitionstud_io/ci/public_regression.py`, `src/hyperstitionstud_io/config/__init__.py`, `src/hyperstitionstud_io/mcp/tools.py`, `src/hyperstitionstud_io/publishing/archive_rotator.py` (+5 more)
|
||||||
> - **Live Verified Ecosystem Metrics (`v2.17.1`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
|
> - **Live Verified Ecosystem Metrics (`v2.17.1`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
|
||||||
<!-- HS-COMMIT-STATUS:END -->
|
<!-- HS-COMMIT-STATUS:END -->
|
||||||
|
|
||||||
|
|||||||
@@ -85,12 +85,16 @@ python3 "${WORKSPACE_DIR}/hyperstitionstudio-core/tests/test_core_suite.py"
|
|||||||
run_checked "build_encyclopedia_knowledge_graph.py --verify-only" python3 "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
|
run_checked "build_encyclopedia_knowledge_graph.py --verify-only" python3 "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
|
||||||
|
|
||||||
echo "[2/3] Verifying git.libre.audio remote URLs across all repositories..."
|
echo "[2/3] Verifying git.libre.audio remote URLs across all repositories..."
|
||||||
|
CI_REPO_DIR="hyperdope-ci-build"
|
||||||
|
if [[ ! -d "${WORKSPACE_DIR}/${CI_REPO_DIR}" ]] && [[ -d "${WORKSPACE_DIR}/ingglish-hyperdope-ci" ]]; then
|
||||||
|
CI_REPO_DIR="ingglish-hyperdope-ci"
|
||||||
|
fi
|
||||||
for pair in \
|
for pair in \
|
||||||
"hyperstitionstudio-core:hyperstitionstudio-core.git" \
|
"hyperstitionstudio-core:hyperstitionstudio-core.git" \
|
||||||
"ingglish-hyperdope-gematria:ingglish-hyperdope-gematria.git" \
|
"ingglish-hyperdope-gematria:ingglish-hyperdope-gematria.git" \
|
||||||
"technocapital-singularity-zoology:technocapital-singularity-zoology.git" \
|
"technocapital-singularity-zoology:technocapital-singularity-zoology.git" \
|
||||||
"encyclopedia-knowledge-graph:encyclopedia-knowledge-graph.git" \
|
"encyclopedia-knowledge-graph:encyclopedia-knowledge-graph.git" \
|
||||||
"hyperdope-ci-build:ingglish-hyperdope-ci.git"; do
|
"${CI_REPO_DIR}:ingglish-hyperdope-ci.git"; do
|
||||||
rdir="${WORKSPACE_DIR}/${pair%%:*}"
|
rdir="${WORKSPACE_DIR}/${pair%%:*}"
|
||||||
rslug="${pair##*:}"
|
rslug="${pair##*:}"
|
||||||
ensure_remote_url "${rdir}" origin "${FORGE_SSH}/${rslug}"
|
ensure_remote_url "${rdir}" origin "${FORGE_SSH}/${rslug}"
|
||||||
@@ -127,10 +131,10 @@ git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" pull --rebase --autostash
|
|||||||
git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" push -u origin main
|
git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" push -u origin main
|
||||||
push_head_tag "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" origin
|
push_head_tag "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" origin
|
||||||
|
|
||||||
echo " -> (5/6) hyperdope-ci-build (feat/ingglish-aq-corpus + HEAD tag)"
|
echo " -> (5/6) hyperdope-ci-build (${CI_REPO_DIR}, feat/ingglish-aq-corpus + HEAD tag)"
|
||||||
git -C "${WORKSPACE_DIR}/hyperdope-ci-build" pull --rebase --autostash origin feat/ingglish-aq-corpus || true
|
git -C "${WORKSPACE_DIR}/${CI_REPO_DIR}" pull --rebase --autostash origin feat/ingglish-aq-corpus || true
|
||||||
git -C "${WORKSPACE_DIR}/hyperdope-ci-build" push -u origin feat/ingglish-aq-corpus
|
git -C "${WORKSPACE_DIR}/${CI_REPO_DIR}" push -u origin feat/ingglish-aq-corpus
|
||||||
push_head_tag "${WORKSPACE_DIR}/hyperdope-ci-build" origin
|
push_head_tag "${WORKSPACE_DIR}/${CI_REPO_DIR}" origin
|
||||||
|
|
||||||
if [[ -d "${WORKSPACE_DIR}/haiperdohp-jemaytreeah/.git" ]]; then
|
if [[ -d "${WORKSPACE_DIR}/haiperdohp-jemaytreeah/.git" ]]; then
|
||||||
echo " -> (6/6) haiperdohp-jemaytreeah (downstream main, feat/ingglish-aq-corpus, feat/ingglish-priority-toggle + HEAD tag)"
|
echo " -> (6/6) haiperdohp-jemaytreeah (downstream main, feat/ingglish-aq-corpus, feat/ingglish-priority-toggle + HEAD tag)"
|
||||||
|
|||||||
@@ -90,9 +90,9 @@ if [[ "${PUSH_ONLY}" -eq 0 ]]; then
|
|||||||
run_checked "hs-macro-harvest (live FRED CSV)" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.macro
|
run_checked "hs-macro-harvest (live FRED CSV)" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.macro
|
||||||
fi
|
fi
|
||||||
if [[ "${WINDOW_MODE}" == "utc-rollover" ]] && [[ -f "${REPOS_ROOT}/ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/ci_provision_ingglish.py" ]]; then
|
if [[ "${WINDOW_MODE}" == "utc-rollover" ]] && [[ -f "${REPOS_ROOT}/ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/ci_provision_ingglish.py" ]]; then
|
||||||
CI_OUT_DIR="${REPOS_ROOT}/ingglish-hyperdope-ci"
|
|
||||||
if [[ ! -d "${CI_OUT_DIR}" ]] && [[ -d "${REPOS_ROOT}/hyperdope-ci-build" ]]; then
|
|
||||||
CI_OUT_DIR="${REPOS_ROOT}/hyperdope-ci-build"
|
CI_OUT_DIR="${REPOS_ROOT}/hyperdope-ci-build"
|
||||||
|
if [[ ! -d "${CI_OUT_DIR}" ]] && [[ -d "${REPOS_ROOT}/ingglish-hyperdope-ci" ]]; then
|
||||||
|
CI_OUT_DIR="${REPOS_ROOT}/ingglish-hyperdope-ci"
|
||||||
fi
|
fi
|
||||||
if [[ -d "${CI_OUT_DIR}" ]]; then
|
if [[ -d "${CI_OUT_DIR}" ]]; then
|
||||||
run_checked "ci_provision_ingglish.py (--tier 2)" "${PYTHON_BIN}" "${REPOS_ROOT}/ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/ci_provision_ingglish.py" \
|
run_checked "ci_provision_ingglish.py (--tier 2)" "${PYTHON_BIN}" "${REPOS_ROOT}/ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/ci_provision_ingglish.py" \
|
||||||
|
|||||||
@@ -95,10 +95,10 @@ if [[ -f "${REPOS_ROOT}/workspace.toml" ]]; then
|
|||||||
export HYPERSTITIONSTUDIO_CONFIG="${REPOS_ROOT}/workspace.toml"
|
export HYPERSTITIONSTUDIO_CONFIG="${REPOS_ROOT}/workspace.toml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Detect whether the CI artifact repository is cloned as ingglish-hyperdope-ci or hyperdope-ci-build
|
# Detect whether the CI artifact repository is cloned as hyperdope-ci-build (canonical) or ingglish-hyperdope-ci
|
||||||
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"
|
CI_REPO_DIR="hyperdope-ci-build"
|
||||||
|
if [[ ! -d "${REPOS_ROOT}/${CI_REPO_DIR}" ]] && [[ -d "${REPOS_ROOT}/ingglish-hyperdope-ci" ]]; then
|
||||||
|
CI_REPO_DIR="ingglish-hyperdope-ci"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REPOS=(
|
REPOS=(
|
||||||
@@ -248,8 +248,10 @@ for entry in "${REPOS[@]}"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "${CI_REPO_DIR}" == "hyperdope-ci-build" ]] && [[ -d "${LIVE_REPOS}/hyperdope-ci-build" ]] && [[ ! -e "${LIVE_REPOS}/ingglish-hyperdope-ci" ]]; then
|
if [[ "${CI_REPO_DIR}" == "hyperdope-ci-build" ]] && [[ -d "${LIVE_REPOS}/hyperdope-ci-build" ]]; then
|
||||||
${LIVE_SUDO} ln -sfn "hyperdope-ci-build" "${LIVE_REPOS}/ingglish-hyperdope-ci"
|
${LIVE_SUDO} ln -sfn "hyperdope-ci-build" "${LIVE_REPOS}/ingglish-hyperdope-ci"
|
||||||
|
elif [[ "${CI_REPO_DIR}" == "ingglish-hyperdope-ci" ]] && [[ -d "${LIVE_REPOS}/ingglish-hyperdope-ci" ]]; then
|
||||||
|
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/hyperdope-ci-build"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create relative route symlinks inside LIVE_REPOS so both Caddy and standalone HTTP servers resolve all active routes
|
# Create relative route symlinks inside LIVE_REPOS so both Caddy and standalone HTTP servers resolve all active routes
|
||||||
@@ -287,7 +289,7 @@ ${LIVE_SUDO} ln -sfn "technocapital-singularity-zoology/encyclopedia" "${LIVE_RE
|
|||||||
${LIVE_SUDO} ln -sfn "technocapital-singularity-zoology" "${LIVE_REPOS}/zoology"
|
${LIVE_SUDO} ln -sfn "technocapital-singularity-zoology" "${LIVE_REPOS}/zoology"
|
||||||
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-gematria/ingglish-aq-archive" "${LIVE_REPOS}/archive"
|
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-gematria/ingglish-aq-archive" "${LIVE_REPOS}/archive"
|
||||||
${LIVE_SUDO} ln -sfn "haiperdohp-jemaytreeah" "${LIVE_REPOS}/calc"
|
${LIVE_SUDO} ln -sfn "haiperdohp-jemaytreeah" "${LIVE_REPOS}/calc"
|
||||||
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/ci"
|
${LIVE_SUDO} ln -sfn "${CI_REPO_DIR}" "${LIVE_REPOS}/ci"
|
||||||
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/schemas" "${LIVE_REPOS}/schemas"
|
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/schemas" "${LIVE_REPOS}/schemas"
|
||||||
|
|
||||||
echo "[4/5] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz) incrementally in parallel & enforcing single-layer (1x) compression..."
|
echo "[4/5] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz) incrementally in parallel & enforcing single-layer (1x) compression..."
|
||||||
|
|||||||
@@ -20,16 +20,11 @@ from pathlib import Path
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||||
from hyperstitionstud_io.config import load_workspace_config
|
from hyperstitionstud_io.config import load_workspace_config, normalize_workspace_relpath
|
||||||
|
|
||||||
|
|
||||||
def _norm_ws_path(p: Path | str, workspace_root: str | Path | None = None) -> str:
|
def _norm_ws_path(p: Path | str, workspace_root: str | Path | None = None) -> str:
|
||||||
cfg = load_workspace_config(workspace_root=workspace_root)
|
return normalize_workspace_relpath(p, workspace_root=workspace_root)
|
||||||
ws_res = str(cfg.workspace_root.resolve())
|
|
||||||
s = str(Path(p).resolve())
|
|
||||||
if s.startswith(ws_res):
|
|
||||||
return "/workspace" + s[len(ws_res):]
|
|
||||||
return str(p)
|
|
||||||
|
|
||||||
|
|
||||||
def prepare_and_verify_deploy_scripts(
|
def prepare_and_verify_deploy_scripts(
|
||||||
|
|||||||
@@ -60,9 +60,7 @@ def _resolve_web_route_to_disk(route: str, cfg: Any) -> Path:
|
|||||||
core = cfg.core_dir
|
core = cfg.core_dir
|
||||||
zoo = cfg.zoology_dir
|
zoo = cfg.zoology_dir
|
||||||
kg = cfg.knowledge_graph_dir
|
kg = cfg.knowledge_graph_dir
|
||||||
ci = cfg.paths.get("ci_build_dir") or (cfg.workspace_root / "hyperdope-ci-build")
|
ci = cfg.ci_build_dir
|
||||||
if not ci.is_dir() and (cfg.workspace_root / "ingglish-hyperdope-ci").is_dir():
|
|
||||||
ci = cfg.workspace_root / "ingglish-hyperdope-ci"
|
|
||||||
|
|
||||||
if route == "/":
|
if route == "/":
|
||||||
return core / "site" / "index.html"
|
return core / "site" / "index.html"
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ from dataclasses import dataclass, field
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from hyperstitionstud_io import __version__ as _PKG_VERSION
|
||||||
|
|
||||||
CORE_REPO_ROOT = Path(__file__).resolve().parents[3]
|
CORE_REPO_ROOT = Path(__file__).resolve().parents[3]
|
||||||
WORKSPACE_ROOT = CORE_REPO_ROOT.parent
|
WORKSPACE_ROOT = CORE_REPO_ROOT.parent
|
||||||
USER_WORKSPACE_TOML = Path.home() / ".config" / "hyperstitionstud.io" / "workspace.toml"
|
USER_WORKSPACE_TOML = Path.home() / ".config" / "hyperstitionstud.io" / "workspace.toml"
|
||||||
@@ -173,7 +175,7 @@ def load_json_cached(path: str | Path, *, copy_result: bool = True) -> Any:
|
|||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class WorkspaceConfig:
|
class WorkspaceConfig:
|
||||||
schema_version: str = "1.2.0"
|
schema_version: str = _PKG_VERSION
|
||||||
namespace_urn: str = "urn:io:hyperstitionstud"
|
namespace_urn: str = "urn:io:hyperstitionstud"
|
||||||
workspace_root: Path = WORKSPACE_ROOT
|
workspace_root: Path = WORKSPACE_ROOT
|
||||||
paths: dict[str, Path] = field(default_factory=dict)
|
paths: dict[str, Path] = field(default_factory=dict)
|
||||||
@@ -288,7 +290,7 @@ def load_workspace_config(
|
|||||||
resolved_mounts = {str(_rebase_path(k, ws_root)): str(v) for k, v in raw_cit.items()}
|
resolved_mounts = {str(_rebase_path(k, ws_root)): str(v) for k, v in raw_cit.items()}
|
||||||
|
|
||||||
return WorkspaceConfig(
|
return WorkspaceConfig(
|
||||||
schema_version=str(raw.get("schema_version", "1.2.0")),
|
schema_version=str(raw.get("schema_version", _PKG_VERSION)),
|
||||||
namespace_urn=str(raw.get("namespace_urn", "urn:io:hyperstitionstud")),
|
namespace_urn=str(raw.get("namespace_urn", "urn:io:hyperstitionstud")),
|
||||||
workspace_root=ws_root,
|
workspace_root=ws_root,
|
||||||
paths=resolved_paths,
|
paths=resolved_paths,
|
||||||
|
|||||||
@@ -760,7 +760,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
|||||||
{
|
{
|
||||||
"id": "ONBOARDING-INGGLISH-AQ",
|
"id": "ONBOARDING-INGGLISH-AQ",
|
||||||
"category": "manuals",
|
"category": "manuals",
|
||||||
"md_path": (cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")) / "ONBOARDING-INGGLISH-AQ.md",
|
"md_path": cfg.ci_build_dir / "ONBOARDING-INGGLISH-AQ.md",
|
||||||
"web_pdf_route": "/ci/ONBOARDING-INGGLISH-AQ.pdf",
|
"web_pdf_route": "/ci/ONBOARDING-INGGLISH-AQ.pdf",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -949,7 +949,7 @@ def audit_and_fix_multi_compressed_files(
|
|||||||
cfg.zoology_dir,
|
cfg.zoology_dir,
|
||||||
cfg.knowledge_graph_dir,
|
cfg.knowledge_graph_dir,
|
||||||
cfg.paths["gematria_js_dir"],
|
cfg.paths["gematria_js_dir"],
|
||||||
cfg.paths.get("ci_repo_dir", cfg.workspace_root / "hyperdope-ci-build"),
|
cfg.ci_build_dir,
|
||||||
]
|
]
|
||||||
for ed in extra_dirs or []:
|
for ed in extra_dirs or []:
|
||||||
ep = Path(ed)
|
ep = Path(ed)
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ def introspect_live_ui_elements(workspace_root: str | Path | None = None) -> dic
|
|||||||
core = cfg.core_dir
|
core = cfg.core_dir
|
||||||
kg = cfg.knowledge_graph_dir
|
kg = cfg.knowledge_graph_dir
|
||||||
calc_dir = cfg.paths["gematria_js_dir"]
|
calc_dir = cfg.paths["gematria_js_dir"]
|
||||||
ci_dir = cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")
|
ci_dir = cfg.ci_build_dir
|
||||||
|
|
||||||
surfaces: dict[str, Path] = {
|
surfaces: dict[str, Path] = {
|
||||||
"home": core / "site" / "index.html",
|
"home": core / "site" / "index.html",
|
||||||
|
|||||||
@@ -639,9 +639,7 @@ def discover_web_and_repo_pdf_pairs(workspace_root: str | Path | None = None) ->
|
|||||||
core = cfg.core_dir
|
core = cfg.core_dir
|
||||||
zoo = cfg.zoology_dir
|
zoo = cfg.zoology_dir
|
||||||
kg = cfg.knowledge_graph_dir
|
kg = cfg.knowledge_graph_dir
|
||||||
ci = cfg.paths.get("ci_build_dir") or (cfg.workspace_root / "hyperdope-ci-build")
|
ci = cfg.ci_build_dir
|
||||||
if not ci.is_dir() and (cfg.workspace_root / "ingglish-hyperdope-ci").is_dir():
|
|
||||||
ci = cfg.workspace_root / "ingglish-hyperdope-ci"
|
|
||||||
|
|
||||||
web_surfaces = [
|
web_surfaces = [
|
||||||
core / "site" / "index.html",
|
core / "site" / "index.html",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path:
|
|||||||
sys.path.insert(0, str(_SRC_DIR))
|
sys.path.insert(0, str(_SRC_DIR))
|
||||||
|
|
||||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION # noqa: E402
|
from hyperstitionstud_io import __version__ as CURRENT_VERSION # noqa: E402
|
||||||
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
|
from hyperstitionstud_io.config import load_workspace_config, resolve_workspace_repo_dir # noqa: E402
|
||||||
|
|
||||||
STATUS_START = "<!-- HS-COMMIT-STATUS:START -->"
|
STATUS_START = "<!-- HS-COMMIT-STATUS:START -->"
|
||||||
STATUS_END = "<!-- HS-COMMIT-STATUS:END -->"
|
STATUS_END = "<!-- HS-COMMIT-STATUS:END -->"
|
||||||
@@ -90,12 +90,7 @@ def _git_out(repo_dir: Path, args: list[str], strip_leading: bool = True) -> str
|
|||||||
|
|
||||||
|
|
||||||
def _resolve_repo_dir(ws_root: Path, repo_key: str) -> Path:
|
def _resolve_repo_dir(ws_root: Path, repo_key: str) -> Path:
|
||||||
cand = ws_root / repo_key
|
return resolve_workspace_repo_dir(ws_root, repo_key)
|
||||||
if cand.is_dir():
|
|
||||||
return cand
|
|
||||||
if repo_key == "hyperdope-ci-build" and (ws_root / "ingglish-hyperdope-ci").is_dir():
|
|
||||||
return ws_root / "ingglish-hyperdope-ci"
|
|
||||||
return cand
|
|
||||||
|
|
||||||
|
|
||||||
def _introspect_repo_commit_context(repo_dir: Path, version: str) -> dict[str, Any]:
|
def _introspect_repo_commit_context(repo_dir: Path, version: str) -> dict[str, Any]:
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ def collect_workspace_change_signals(ws_root: Path | None = None) -> dict[str, A
|
|||||||
cfg.zoology_dir,
|
cfg.zoology_dir,
|
||||||
kg,
|
kg,
|
||||||
cfg.paths["gematria_js_dir"],
|
cfg.paths["gematria_js_dir"],
|
||||||
cfg.paths.get("ci_repo_dir", cfg.workspace_root / "hyperdope-ci-build"),
|
cfg.ci_build_dir,
|
||||||
]
|
]
|
||||||
repo_diff_summary: dict[str, dict[str, int]] = {}
|
repo_diff_summary: dict[str, dict[str, int]] = {}
|
||||||
total_dirty = 0
|
total_dirty = 0
|
||||||
@@ -491,12 +491,14 @@ def sync_workspace_version(target_version: str, check_only: bool = False, ws_roo
|
|||||||
path.write_text(updated, encoding="utf-8")
|
path.write_text(updated, encoding="utf-8")
|
||||||
modified_files.append(str(path))
|
modified_files.append(str(path))
|
||||||
|
|
||||||
if not check_only:
|
|
||||||
ws_toml = cfg.workspace_root / "workspace.toml"
|
ws_toml = cfg.workspace_root / "workspace.toml"
|
||||||
if ws_toml.is_file():
|
if ws_toml.is_file():
|
||||||
orig_ws = ws_toml.read_text(encoding="utf-8")
|
orig_ws = ws_toml.read_text(encoding="utf-8")
|
||||||
upd_ws = re.sub(rf'schema_version\s*=\s*"{SEMVER_RE}"', f'schema_version = "{v}"', orig_ws, flags=re.M)
|
upd_ws = re.sub(rf'schema_version\s*=\s*"{SEMVER_RE}"', f'schema_version = "{v}"', orig_ws, flags=re.M)
|
||||||
if upd_ws != orig_ws:
|
if upd_ws != orig_ws:
|
||||||
|
if check_only:
|
||||||
|
mismatched_files.append(str(ws_toml))
|
||||||
|
else:
|
||||||
ws_toml.write_text(upd_ws, encoding="utf-8")
|
ws_toml.write_text(upd_ws, encoding="utf-8")
|
||||||
modified_files.append(str(ws_toml))
|
modified_files.append(str(ws_toml))
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
|
|||||||
cfg.zoology_dir,
|
cfg.zoology_dir,
|
||||||
cfg.knowledge_graph_dir,
|
cfg.knowledge_graph_dir,
|
||||||
cfg.paths["gematria_js_dir"],
|
cfg.paths["gematria_js_dir"],
|
||||||
cfg.paths.get("ci_repo_dir", cfg.workspace_root / "hyperdope-ci-build"),
|
cfg.ci_build_dir,
|
||||||
):
|
):
|
||||||
if not rdir.is_dir():
|
if not rdir.is_dir():
|
||||||
continue
|
continue
|
||||||
@@ -212,8 +212,27 @@ def test_local_config_citation_resolution_and_proposals() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def test_doctor_all_checks_pass() -> None:
|
def test_doctor_all_checks_pass() -> None:
|
||||||
|
from hyperstitionstud_io import __version__ as cur_ver
|
||||||
|
from hyperstitionstud_io.config import (
|
||||||
|
normalize_workspace_relpath,
|
||||||
|
resolve_workspace_repo_dir,
|
||||||
|
)
|
||||||
|
|
||||||
diag = run_diagnostics()
|
diag = run_diagnostics()
|
||||||
assert diag["all_checks_passed"] is True
|
assert diag["all_checks_passed"] is True
|
||||||
|
assert diag["schema_version"] == cur_ver
|
||||||
|
|
||||||
|
cfg = load_workspace_config()
|
||||||
|
assert cfg.schema_version == cur_ver
|
||||||
|
assert cfg.ci_build_dir.is_dir()
|
||||||
|
assert (
|
||||||
|
resolve_workspace_repo_dir(cfg.workspace_root, "hyperdope-ci-build")
|
||||||
|
== resolve_workspace_repo_dir(cfg.workspace_root, "ingglish-hyperdope-ci")
|
||||||
|
)
|
||||||
|
assert (
|
||||||
|
normalize_workspace_relpath(cfg.core_dir / "deploy" / "sync-vps-repos.sh", workspace_root=cfg.workspace_root)
|
||||||
|
== "/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_ipld_quant_and_mcp_server() -> None:
|
def test_ipld_quant_and_mcp_server() -> None:
|
||||||
@@ -1457,8 +1476,12 @@ def test_ipld_quant_and_mcp_server() -> None:
|
|||||||
|
|
||||||
plan_audit = verify_plan_specifications(workspace_root=cfg.workspace_root)
|
plan_audit = verify_plan_specifications(workspace_root=cfg.workspace_root)
|
||||||
assert plan_audit["ok"] is True, f"Plan specification audit failed: {plan_audit['errors']}"
|
assert plan_audit["ok"] is True, f"Plan specification audit failed: {plan_audit['errors']}"
|
||||||
assert plan_audit["total_plans_checked"] >= 6
|
assert plan_audit["total_plans_checked"] == plan_audit["active_plans_checked"] + plan_audit["piecewise_plans_checked"]
|
||||||
|
assert plan_audit["total_plans_checked"] > 0
|
||||||
assert len(plan_audit["missing_pdfs"]) == 0
|
assert len(plan_audit["missing_pdfs"]) == 0
|
||||||
|
assert len(plan_audit["missing_ledger_entries"]) == 0
|
||||||
|
assert len(plan_audit["metadata_errors"]) == 0
|
||||||
|
assert len(plan_audit["host_path_errors"]) == 0
|
||||||
|
|
||||||
# Write cached internal test baseline (.cache/internal-test-baseline-latest.json) for hs-public-smoke
|
# Write cached internal test baseline (.cache/internal-test-baseline-latest.json) for hs-public-smoke
|
||||||
from hyperstitionstud_io.ci.public_regression import write_internal_test_baseline_cache
|
from hyperstitionstud_io.ci.public_regression import write_internal_test_baseline_cache
|
||||||
|
|||||||
Reference in new issue
Block a user