fix(deploy): gate rebase conflict-side flags and unchecked pull --rebase in DEPLOY-GATE-D07.TOPO_PUSH_PARITY
This commit is contained in:
1 parent
0d4b2a5d27
commit
808882e0a6
4 files changed
+57
-20
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 3 tracked module/artifact surface(s)
|
||||||
> - **Touched Files / Surfaces:** `deploy/push-all-to-git-libre-audio.sh`
|
> - **Touched Files / Surfaces:** `deploy/push-all-to-git-libre-audio.sh`, `src/hyperstitionstud_io/ci/deploy_scripts_sync.py`, `tests/test_core_suite.py`
|
||||||
> - **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 -->
|
||||||
|
|
||||||
|
|||||||
@@ -148,37 +148,37 @@ push_head_tag() {
|
|||||||
|
|
||||||
echo "[3/3] Rebasing any automated VPS telemetry commits & pushing all 6 repositories and HEAD release tags in topological dependency order to ${FORGE_SSH}..."
|
echo "[3/3] Rebasing any automated VPS telemetry commits & pushing all 6 repositories and HEAD release tags in topological dependency order to ${FORGE_SSH}..."
|
||||||
echo " -> (1/6) hyperstitionstudio-core (main + HEAD tag)"
|
echo " -> (1/6) hyperstitionstudio-core (main + HEAD tag)"
|
||||||
git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" pull --rebase --autostash origin main || true
|
run_checked "git pull --rebase (hyperstitionstudio-core main)" git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" pull --rebase --autostash origin main
|
||||||
git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" push -u origin main
|
git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" push -u origin main
|
||||||
push_head_tag "${WORKSPACE_DIR}/hyperstitionstudio-core" origin
|
push_head_tag "${WORKSPACE_DIR}/hyperstitionstudio-core" origin
|
||||||
|
|
||||||
echo " -> (2/6) ingglish-hyperdope-gematria (main + HEAD tag)"
|
echo " -> (2/6) ingglish-hyperdope-gematria (main + HEAD tag)"
|
||||||
git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" pull --rebase --autostash origin main || true
|
run_checked "git pull --rebase (ingglish-hyperdope-gematria main)" git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" pull --rebase --autostash origin main
|
||||||
git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" push -u origin main
|
git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" push -u origin main
|
||||||
push_head_tag "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" origin
|
push_head_tag "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" origin
|
||||||
|
|
||||||
echo " -> (3/6) technocapital-singularity-zoology (main + HEAD tag)"
|
echo " -> (3/6) technocapital-singularity-zoology (main + HEAD tag)"
|
||||||
git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" pull --rebase --autostash origin main || true
|
run_checked "git pull --rebase (technocapital-singularity-zoology main)" git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" pull --rebase --autostash origin main
|
||||||
git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" push -u origin main
|
git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" push -u origin main
|
||||||
push_head_tag "${WORKSPACE_DIR}/technocapital-singularity-zoology" origin
|
push_head_tag "${WORKSPACE_DIR}/technocapital-singularity-zoology" origin
|
||||||
|
|
||||||
echo " -> (4/6) encyclopedia-knowledge-graph (main + HEAD tag)"
|
echo " -> (4/6) encyclopedia-knowledge-graph (main + HEAD tag)"
|
||||||
git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" pull --rebase --autostash origin main || true
|
run_checked "git pull --rebase (encyclopedia-knowledge-graph main)" git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" pull --rebase --autostash origin main
|
||||||
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 (${CI_REPO_DIR}, 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}/${CI_REPO_DIR}" pull --rebase --autostash origin feat/ingglish-aq-corpus || true
|
run_checked "git pull --rebase (${CI_REPO_DIR} feat/ingglish-aq-corpus)" git -C "${WORKSPACE_DIR}/${CI_REPO_DIR}" pull --rebase --autostash origin feat/ingglish-aq-corpus
|
||||||
git -C "${WORKSPACE_DIR}/${CI_REPO_DIR}" 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}/${CI_REPO_DIR}" 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)"
|
||||||
ensure_remote_url "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream "${FORGE_SSH}/haiperdohp-jemaytreeah.git"
|
ensure_remote_url "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream "${FORGE_SSH}/haiperdohp-jemaytreeah.git"
|
||||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" fetch downstream || true
|
run_checked "git fetch downstream (haiperdohp-jemaytreeah)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" fetch downstream
|
||||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream main || true
|
run_checked "git pull --rebase (haiperdohp-jemaytreeah main)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream main
|
||||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-aq-corpus || true
|
run_checked "git pull --rebase (haiperdohp-jemaytreeah feat/ingglish-aq-corpus)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-aq-corpus
|
||||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-priority-toggle || true
|
run_checked "git pull --rebase (haiperdohp-jemaytreeah feat/ingglish-priority-toggle)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-priority-toggle
|
||||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" push downstream main feat/ingglish-aq-corpus feat/ingglish-priority-toggle
|
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" push downstream main feat/ingglish-aq-corpus feat/ingglish-priority-toggle
|
||||||
push_head_tag "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream
|
push_head_tag "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -23,6 +23,28 @@ from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
|||||||
from hyperstitionstud_io.config import load_workspace_config, normalize_workspace_relpath
|
from hyperstitionstud_io.config import load_workspace_config, normalize_workspace_relpath
|
||||||
|
|
||||||
|
|
||||||
|
FORBIDDEN_CONFLICT_SIDE_RE = re.compile(r"(?:^|\s)(?:--theirs|--ours|-X\s*(?:theirs|ours))\b")
|
||||||
|
FORBIDDEN_UNCHECKED_REBASE_RE = re.compile(r"pull\s+--rebase[^\n]*\|\|\s*true")
|
||||||
|
|
||||||
|
|
||||||
|
def validate_push_script_rebase_gating(push_txt: str) -> list[str]:
|
||||||
|
"""
|
||||||
|
Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Reject conflict-side resolution flags
|
||||||
|
(--theirs, --ours, -X theirs, -X ours) and unchecked pull --rebase ... || true
|
||||||
|
suppressions in push-all-to-git-libre-audio.sh.
|
||||||
|
"""
|
||||||
|
violations: list[str] = []
|
||||||
|
for m_flag in FORBIDDEN_CONFLICT_SIDE_RE.finditer(push_txt):
|
||||||
|
violations.append(
|
||||||
|
f"Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Forbidden conflict-side flag {m_flag.group(0).strip()!r} in push-all-to-git-libre-audio.sh"
|
||||||
|
)
|
||||||
|
for m_reb in FORBIDDEN_UNCHECKED_REBASE_RE.finditer(push_txt):
|
||||||
|
violations.append(
|
||||||
|
f"Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Forbidden unchecked rebase suppression {m_reb.group(0)!r} in push-all-to-git-libre-audio.sh"
|
||||||
|
)
|
||||||
|
return violations
|
||||||
|
|
||||||
|
|
||||||
def prepare_and_verify_deploy_scripts(
|
def prepare_and_verify_deploy_scripts(
|
||||||
workspace_root: str | Path | None = None,
|
workspace_root: str | Path | None = None,
|
||||||
target_version: str | None = None,
|
target_version: str | None = None,
|
||||||
@@ -194,7 +216,7 @@ def prepare_and_verify_deploy_scripts(
|
|||||||
if not gate_d6_ok:
|
if not gate_d6_ok:
|
||||||
errors.append("Gate D6: Single-layer compression enforcement or Caddyfile media extension parity missing")
|
errors.append("Gate D6: Single-layer compression enforcement or Caddyfile media extension parity missing")
|
||||||
|
|
||||||
# Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Topological 6-Repository Push & Force-Tag Sync Parity in push-all-to-git-libre-audio.sh
|
# Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Topological 6-Repository Push, Force-Tag Sync & Fail-Fast Rebase Parity in push-all-to-git-libre-audio.sh
|
||||||
required_push_markers = (
|
required_push_markers = (
|
||||||
"hyperstitionstudio-core",
|
"hyperstitionstudio-core",
|
||||||
"ingglish-hyperdope-gematria",
|
"ingglish-hyperdope-gematria",
|
||||||
@@ -209,9 +231,11 @@ def prepare_and_verify_deploy_scripts(
|
|||||||
"--exegesis-uninstall",
|
"--exegesis-uninstall",
|
||||||
"--skip-exegesis-deploy",
|
"--skip-exegesis-deploy",
|
||||||
)
|
)
|
||||||
gate_d7_ok = all(m in push_txt_cur for m in required_push_markers)
|
d7_rebase_violations = validate_push_script_rebase_gating(push_txt_cur)
|
||||||
if not gate_d7_ok:
|
gate_d7_ok = all(m in push_txt_cur for m in required_push_markers) and len(d7_rebase_violations) == 0
|
||||||
errors.append("Gate D7: Missing required repository, force-tag, or verification marker in push-all-to-git-libre-audio.sh")
|
if not all(m in push_txt_cur for m in required_push_markers):
|
||||||
|
errors.append("Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Missing required repository, force-tag, or verification marker in push-all-to-git-libre-audio.sh")
|
||||||
|
errors.extend(d7_rebase_violations)
|
||||||
|
|
||||||
# Gate DEPLOY-GATE-D08.PRE_COMMIT_STAGE: Automatic Git Staging Prior to Commit (--stage)
|
# Gate DEPLOY-GATE-D08.PRE_COMMIT_STAGE: Automatic Git Staging Prior to Commit (--stage)
|
||||||
staged_files: list[str] = []
|
staged_files: list[str] = []
|
||||||
|
|||||||
@@ -1470,17 +1470,30 @@ def test_ipld_quant_and_mcp_server() -> None:
|
|||||||
f"Expected thin delegator wrapper for {ci_prov_mirror}"
|
f"Expected thin delegator wrapper for {ci_prov_mirror}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verify Plan #58: Pre-Commit Preparation & Gates DEPLOY-GATE-D01.MIRROR_PARITY..DEPLOY-GATE-D08.PRE_COMMIT_STAGE for push-all-to-git-libre-audio.sh & deploy/sync-vps-repos.sh
|
# Verify Plan #58 & DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Pre-Commit Preparation & Gates DEPLOY-GATE-D01.MIRROR_PARITY..DEPLOY-GATE-D08.PRE_COMMIT_STAGE for push-all-to-git-libre-audio.sh & deploy/sync-vps-repos.sh
|
||||||
from hyperstitionstud_io.ci.deploy_scripts_sync import prepare_and_verify_deploy_scripts
|
from hyperstitionstud_io.ci.deploy_scripts_sync import (
|
||||||
|
prepare_and_verify_deploy_scripts,
|
||||||
|
validate_push_script_rebase_gating,
|
||||||
|
)
|
||||||
|
|
||||||
dep_sync = prepare_and_verify_deploy_scripts(workspace_root=cfg.workspace_root, check_only=False)
|
dep_sync = prepare_and_verify_deploy_scripts(workspace_root=cfg.workspace_root, check_only=False)
|
||||||
assert dep_sync["ok"] is True, f"Deploy scripts sync failed: {dep_sync}"
|
assert dep_sync["ok"] is True, f"Deploy scripts sync failed: {dep_sync}"
|
||||||
assert all(dep_sync["gates"].values()), f"Deploy scripts gates failed: {dep_sync['gates']}"
|
assert all(dep_sync["gates"].values()), f"Deploy scripts gates failed: {dep_sync['gates']}"
|
||||||
dep_chk = prepare_and_verify_deploy_scripts(workspace_root=cfg.workspace_root, check_only=True)
|
dep_chk = prepare_and_verify_deploy_scripts(workspace_root=cfg.workspace_root, check_only=True)
|
||||||
assert dep_chk["ok"] is True, f"Deploy scripts check_only failed: {dep_chk}"
|
assert dep_chk["ok"] is True, f"Deploy scripts check_only failed: {dep_chk}"
|
||||||
assert (cfg.core_dir / "deploy" / "push-all-to-git-libre-audio.sh").read_text(encoding="utf-8") == (
|
ws_push_txt = (cfg.workspace_root / "push-all-to-git-libre-audio.sh").read_text(encoding="utf-8")
|
||||||
cfg.workspace_root / "push-all-to-git-libre-audio.sh"
|
assert (cfg.core_dir / "deploy" / "push-all-to-git-libre-audio.sh").read_text(encoding="utf-8") == ws_push_txt
|
||||||
).read_text(encoding="utf-8")
|
assert validate_push_script_rebase_gating(ws_push_txt) == []
|
||||||
|
assert 'run_checked "git pull --rebase' in ws_push_txt
|
||||||
|
for bad_rebase_snippet in (
|
||||||
|
"git checkout --theirs README.md",
|
||||||
|
"git checkout --ours README.md",
|
||||||
|
"git pull --rebase -X theirs origin main",
|
||||||
|
"git pull --rebase -X ours origin main",
|
||||||
|
"git pull --rebase --autostash origin main || true",
|
||||||
|
):
|
||||||
|
bad_v = validate_push_script_rebase_gating(bad_rebase_snippet)
|
||||||
|
assert len(bad_v) >= 1, f"Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY failed to reject {bad_rebase_snippet!r}"
|
||||||
|
|
||||||
# Verify Plan #60: /calc/ (haiperdohpjematreeah) Homepage Group 3 UI Parity, Zero "Cypher Calculator" & hyperdope-ci-build Patch Integration
|
# Verify Plan #60: /calc/ (haiperdohpjematreeah) Homepage Group 3 UI Parity, Zero "Cypher Calculator" & hyperdope-ci-build Patch Integration
|
||||||
calc_dir = cfg.paths["gematria_js_dir"]
|
calc_dir = cfg.paths["gematria_js_dir"]
|
||||||
|
|||||||
Reference in new issue
Block a user