From 51f4a59e2680a32592a045eb92bed2283ce12434 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 2 Dec 2026 11:27:46 +0000 Subject: [PATCH] Implement git pull --rebase --autostash in sync-vps-repos.sh and run-vps-data-production.sh for non-destructive bidirectional telemetry reconciliation --- README.md | 4 ++-- deploy/run-vps-data-production.sh | 1 + deploy/sync-vps-repos.sh | 15 ++------------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index dfd0492..761334d 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ > **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/) -> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 1 tracked module/artifact surface(s) -> - **Touched Files / Surfaces:** `deploy/sync-vps-repos.sh` +> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 2 tracked module/artifact surface(s) +> - **Touched Files / Surfaces:** `deploy/run-vps-data-production.sh`, `deploy/sync-vps-repos.sh` > - **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 diff --git a/deploy/run-vps-data-production.sh b/deploy/run-vps-data-production.sh index 65d3b97..c8d0388 100755 --- a/deploy/run-vps-data-production.sh +++ b/deploy/run-vps-data-production.sh @@ -140,6 +140,7 @@ if [[ "${DO_PUSH}" -eq 1 ]] && [[ -f "/etc/hyperstitionstud.io/id_ed25519_git_li git -C "${REPOS_ROOT}/${r}" add -A if ! git -C "${REPOS_ROOT}/${r}" diff --cached --quiet; then run_checked "git commit (${r})" git -C "${REPOS_ROOT}/${r}" commit -m "chore(telemetry): automated VPS ${WINDOW_MODE} harvest (${STAMP_UTC})" || true + run_checked "git pull --rebase --autostash (${r})" git -C "${REPOS_ROOT}/${r}" pull --rebase --autostash origin main || true run_checked "git push (${r})" git -C "${REPOS_ROOT}/${r}" push origin main || true fi fi diff --git a/deploy/sync-vps-repos.sh b/deploy/sync-vps-repos.sh index a8f6f5b..217a09f 100755 --- a/deploy/sync-vps-repos.sh +++ b/deploy/sync-vps-repos.sh @@ -111,20 +111,9 @@ if [[ "${DO_PULL}" -eq 1 ]]; then if [[ "${repo}" == "haiperdohp-jemaytreeah" ]] && git -C "${REPOS_ROOT}/${repo}" remote | grep -qx "downstream"; then remote_name="downstream" fi - echo "[1/5] Updating ${REPOS_ROOT}/${repo} (${remote_name}/${branch})..." + echo "[1/5] Updating ${REPOS_ROOT}/${repo} (${remote_name}/${branch}) with autostash rebase..." prev_head="$(git -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)" - run_checked "git fetch ${repo}" git -C "${REPOS_ROOT}/${repo}" fetch --force "${remote_name}" "${branch}" --tags - git -C "${REPOS_ROOT}/${repo}" reset HEAD -- README.md || true - git -C "${REPOS_ROOT}/${repo}" checkout -- README.md || true - if [[ -n "$(git -C "${REPOS_ROOT}/${repo}" ls-files financial-aq-harvest-latest.json)" ]]; then - if ! git -C "${REPOS_ROOT}/${repo}" diff --quiet -- financial-aq-harvest-latest.json 2>&1; then - git -C "${REPOS_ROOT}/${repo}" checkout -- financial-aq-harvest-latest.json || true - fi - fi - if [[ "${repo}" == "${CI_REPO_DIR}" || "${repo}" == "ingglish-hyperdope-gematria" || "${repo}" == "encyclopedia-knowledge-graph" ]] && ! git -C "${REPOS_ROOT}/${repo}" diff --quiet 2>&1; then - git -C "${REPOS_ROOT}/${repo}" checkout -- . || true - fi - run_checked "git merge ${repo}" git -C "${REPOS_ROOT}/${repo}" merge --ff-only "${remote_name}/${branch}" + run_checked "git pull --rebase --autostash ${repo}" git -C "${REPOS_ROOT}/${repo}" pull --rebase --autostash "${remote_name}" "${branch}" new_head="$(git -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)" if [[ "${repo}" == "hyperstitionstudio-core" && "${prev_head}" != "${new_head}" && -z "${HYPERSTITION_SYNC_REEXEC:-}" ]]; then echo "[1/5] hyperstitionstudio-core updated (${prev_head:0:7} -> ${new_head:0:7}); re-executing updated sync-vps-repos.sh..."