Skip to content

fix(scripts): update remaining gittensory references, fix stale Sentry release default - #6881

Merged
JSONbored merged 1 commit into
mainfrom
fix/scripts-gittensory-references
Jul 17, 2026
Merged

fix(scripts): update remaining gittensory references, fix stale Sentry release default#6881
JSONbored merged 1 commit into
mainfrom
fix/scripts-gittensory-references

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • deploy-selfhost-prebuilt.sh carried the same live bug just fixed in release-selfhost.yml (fix(ci): update remaining gittensory references in workflow files #6876): SENTRY_RELEASE defaulted to gittensory-selfhost@<sha> when unset, so a manual/prebuilt deploy tags Sentry with the pre-rename project's release format on every run. Fixed the default, its log-file path, and the usage-example comment.
  • check-changelog.mjs, export-ams-reporting-db.sh, export-miner-prometheus-textfile.sh had cosmetic-only references (a temp-dir prefix, a stale parenthetical, a default output filename) — updated for consistency with the already-renamed LOOPOVER_MINER_* env vars around them.
  • Audited every other gittensor(y) hit in scripts/** and deliberately left several untouched (full reasoning in the commit message): a wiki-link to an external doc I can't verify the real name of, a --db gittensory usage example that's now confirmed correct against the live Cloudflare account (the production D1 database is genuinely still named gittensory, kept by explicit decision — no in-place rename support in wrangler d1/wrangler r2 bucket, and a live-data migration isn't worth it for a cosmetic label), a stored DB discriminant value, an unrelated external gittensor.io service integration, and gittensor:bug/feature/priority — real, current GitHub label names on this repo, a deliberate naming choice separate from the old gittensory product name (confirmed against src/config/loopover-repo-focus-manifest.ts).

Scope

  • Narrow, single-purpose change (scripts only)
  • No secrets/private terms touched
  • No changelog edit

Validation

  • bash -n on all 3 shell scripts, node --check on the one .mjs — all clean
  • git diff --check — clean

…y release default

deploy-selfhost-prebuilt.sh carried the same live bug just fixed in
release-selfhost.yml (#6876): SENTRY_RELEASE defaulted to
"gittensory-selfhost@<sha>" when unset, so a manual/prebuilt deploy would
tag Sentry with the pre-rename project's release format on every run.
Fixed the default, its log-file path, and the usage-example comment.

check-changelog.mjs's temp-dir prefix, export-ams-reporting-db.sh's
"AMS (gittensory-miner)" comment, and export-miner-prometheus-textfile.sh's
default output filename were cosmetic-only -- updated for consistency
with the already-renamed LOOPOVER_MINER_* env vars around them.

Deliberately left untouched (verified each is either external or a
separate, real, current convention, not gittensory-rebrand drift):
export-d1-core.mjs's [[gittensory-selfhost-migration-plan]] wiki-link
(can't verify the target doc's real name from here);
export-d1-data.mjs's `--db gittensory` usage example (confirmed against
the live Cloudflare account: the production D1 database is genuinely
still named "gittensory", by explicit decision -- no rename planned,
D1/R2 have no in-place rename support and the cost of a live-data
migration isn't worth it for a cosmetic label); export-grafana-reporting-db.sh's
'gittensory-native' source-column literal (a stored, historical DB
discriminant value, must stay stable for existing rows);
gittensor-impact-card.mjs (calls the unrelated external gittensor.io
service); github-type-label.d.mts and the config it mirrors
(gittensor:bug/feature/priority are real, current GitHub label names on
this repo, a deliberate naming choice separate from the old gittensory
product name); and selfhost-post-update-check.sh's historical comment
about the rename incident itself.
@JSONbored JSONbored self-assigned this Jul 17, 2026
@JSONbored
JSONbored merged commit c5e834e into main Jul 17, 2026
5 checks passed
@JSONbored
JSONbored deleted the fix/scripts-gittensory-references branch July 17, 2026 10:09
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
18065 2 18063 13
View the top 2 failed test(s) by shortest run time
test/unit/release-selfhost-prerelease.test.ts > release-selfhost.yml "Resolve version" step (#1937) > accepts a stable semver tag and marks it non-prerelease
Stack Traces | 0.115s run time
AssertionError: expected { v: '0.1.0', tag: 'orb-v0.1.0', …(2) } to match object { v: '0.1.0', tag: 'orb-v0.1.0', …(2) }

- Expected
+ Received

  {
    "prerelease": "false",
-   "release": "gittensory-orb@0.1.0",
+   "release": "loopover-orb@0.1.0",
    "tag": "orb-v0.1.0",
    "v": "0.1.0",
  }

 ❯ test/unit/release-selfhost-prerelease.test.ts:58:23
test/unit/selfhost-sentry-release.test.ts > self-host Sentry release wiring > keeps source-map uploads in the maintainer release workflow only
Stack Traces | 0.182s run time
AssertionError: expected '#!....../usr/bin/env bash\n# Build and depl…' to contain 'SENTRY_RELEASE="${SENTRY_RELEASE:-git…'

- Expected
+ Received

- SENTRY_RELEASE="${SENTRY_RELEASE:-gittensory-selfhost@$(git rev-parse --short=8 HEAD)}"
+ #!....../usr/bin/env bash
+ # Build and deploy the self-host runtime from a prebuilt bundle without relying on host Node/npm.
+ #
+ # After a successful run, verify with: ./scripts/selfhost-post-update-check.sh
+ #
+ # Defaults are intentionally operator-friendly:
+ #   ./scripts/deploy-selfhost-prebuilt.sh
+ #
+ # Optional knobs:
+ #   SENTRY_RELEASE=loopover-selfhost@edge-abc123 ./scripts/deploy-selfhost-prebuilt.sh
+ #   SELFHOST_COMPOSE_FILES="docker-compose.yml docker-compose.override.yml" ./scripts/deploy-selfhost-prebuilt.sh
+ #   SELFHOST_SKIP_SENTRY_UPLOAD=1 ./scripts/deploy-selfhost-prebuilt.sh
+ #   SELFHOST_USE_INFISICAL=1 ./scripts/deploy-selfhost-prebuilt.sh   # opt-in Infisical secrets (#5120), see docs
+ set -euo pipefail
+
+ ENV_FILE="${SELFHOST_ENV_FILE:-.env}"
+ NODE_IMAGE="${SELFHOST_NODE_IMAGE:-public.ecr..../docker/library/node:24-slim}"
+ SERVICE="${SELFHOST_SERVICE:-loopover}"
+ SKIP_SENTRY_UPLOAD="${SELFHOST_SKIP_SENTRY_UPLOAD:-0}"
+ SENTRY_CLI_PACKAGE="${SENTRY_CLI_PACKAGE:-@sentry/cli@3.6.0}"
+
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+ # shellcheck source=lib/selfhost-deploy-common.sh
+ . "$SCRIPT_DIR/lib/selfhost-deploy-common.sh"
+
+ run_node_build() {
+   local uid gid
+   uid="$(id -u)"
+   gid="$(id -g)"
+
+   echo "selfhost deploy: building bundle with Dockerized Node"
+   docker run --rm \
+     --user "$uid:$gid" \
+     -e HOME=/tmp \
+     -e npm_config_cache=/tmp/.npm \
+     -v "$PWD:/work" \
+     -w /work \
+     "$NODE_IMAGE" \
+     sh -lc 'npm ci --ignore-scripts && npm --workspace @loopover/engine run build && node scripts/build-selfhost.mjs --all && node scripts/validate-selfhost-sourcemap.mjs'
+ }
+
+ run_sentry_upload() {
+   local auth_token org project uid gid
+
+   auth_token="${SENTRY_AUTH_TOKEN:-$(env_get SENTRY_AUTH_TOKEN || true)}"
+   org="${SENTRY_ORG:-$(env_get SENTRY_ORG || true)}"
+   project="${SENTRY_PROJECT:-$(env_get SENTRY_PROJECT || true)}"
+
+   if [ "$SKIP_SENTRY_UPLOAD" = "1" ]; then
+     echo "selfhost deploy: skipping Sentry upload (SELFHOST_SKIP_SENTRY_UPLOAD=1)"
+     return 0
+   fi
+
+   if [ -z "$auth_token" ] || [ -z "$org" ] || [ -z "$project" ]; then
+     echo "selfhost deploy: skipping Sentry upload (SENTRY_AUTH_TOKEN, SENTRY_ORG, or SENTRY_PROJECT is missing)"
+     return 0
+   fi
+
+   uid="$(id -u)"
+   gid="$(id -g)"
+
+   echo "selfhost deploy: injecting and uploading Sentry source maps for $SENTRY_RELEASE"
+   docker run --rm \
+     -e HOME=/tmp \
+     -e npm_config_cache=/tmp/.npm \
+     -e SENTRY_LOAD_DOTENV=0 \
+     -e SENTRY_RELEASE \
+     -e SENTRY_AUTH_TOKEN="$auth_token" \
+     -e SENTRY_ORG="$org" \
+     -e SENTRY_PROJECT="$project" \
+     -e SENTRY_CLI_PACKAGE="$SENTRY_CLI_PACKAGE" \
+     -e HOST_UID="$uid" \
+     -e HOST_GID="$gid" \
+     -v "$PWD:/work" \
+     -w /work \
+     "$NODE_IMAGE" \
+     sh -lc 'apt-get update >/dev/null && apt-get install -y --no-install-recommends ca-certificates git >/dev/null && git config --global --add safe.directory /work && (npx -y "$SENTRY_CLI_PACKAGE" releases new "$SENTRY_RELEASE" >/tmp/loopover-sentry-release-new.log 2>&1 || true) && npx -y "$SENTRY_CLI_PACKAGE" releases set-commits "$SENTRY_RELEASE" --auto && npx -y "$SENTRY_CLI_PACKAGE" sourcemaps inject dist && node scripts/validate-selfhost-sourcemap.mjs && npx -y "$SENTRY_CLI_PACKAGE" sourcemaps upload --release="$SENTRY_RELEASE" dist && npx -y "$SENTRY_CLI_PACKAGE" releases finalize "$SENTRY_RELEASE" && chown -R "$HOST_UID:$HOST_GID" dist node_modules package-lock.json'
+ }
+
+ run_init_secrets() {
+   echo "selfhost deploy: ensuring secret placeholder files exist"
+   "$SCRIPT_DIR/selfhost-init-secrets.sh"
+ }
+
+ run_compose_deploy() {
+   local override_file
+   local -a compose_args
+
+   override_file="$(mktemp)"
+   SELFHOST_GENERATED_COMPOSE_FILE="$override_file"
+   trap 'rm -f "${SELFHOST_GENERATED_COMPOSE_FILE:-}"' EXIT
+
+   cat >"$override_file" <<YAML
+ services:
+   $SERVICE:
+     build:
+       target: runtime-prebuilt
+       args:
+         LOOPOVER_VERSION: "\${SENTRY_RELEASE}"
+         INSTALL_AI_CLIS: "\${INSTALL_AI_CLIS:-true}"
+         INSTALL_VISUAL_REVIEW: "\${INSTALL_VISUAL_REVIEW:-false}"
+     environment:
+       SENTRY_RELEASE: "\${SENTRY_RELEASE}"
+       LOOPOVER_VERSION: "\${SENTRY_RELEASE}"
+ YAML
+
+   mapfile -t compose_args < <(compose_file_args)
+   compose_args+=(-f "$override_file")
+
+   echo "selfhost deploy: building $SERVICE runtime-prebuilt image"
+   docker compose "${compose_args[@]}" build "$SERVICE"
+
+   echo "selfhost deploy: restarting $SERVICE"
+   maybe_infisical_run docker compose "${compose_args[@]}" up -d --no-deps "$SERVICE"
+ }
+
+ require_cmd docker
+ docker compose version >/dev/null
+
+ if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
+   echo "error: run this script from the loopover git checkout" >&2
+   exit 1
+ fi
+
+ # Default to the current checkout on every deploy. Do not reuse a persisted .env value here:
+ # that value is written by the previous deploy and would make future updates report stale
+ # release/version metadata unless the operator remembered to override it manually.
+ SENTRY_RELEASE="${SENTRY_RELEASE:-loopover-selfhost@$(git rev-parse --short=8 HEAD)}"
+ export SENTRY_RELEASE
+
+ env_put SENTRY_RELEASE "$SENTRY_RELEASE"
+ env_put LOOPOVER_VERSION "$SENTRY_RELEASE"
+
+ run_node_build
+ run_init_secrets
+ run_sentry_upload
+ run_compose_deploy
+
+ echo "selfhost deploy: complete ($SENTRY_RELEASE)"
+

 ❯ test/unit/selfhost-sentry-release.test.ts:63:30

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

luciferlive112116 pushed a commit to luciferlive112116/gittensory that referenced this pull request Jul 17, 2026
…tes, env examples, release.yml, and this repo's own skill files

- .github/release.yml: gittensory-orb[bot] doesn't exist anymore
  (confirmed 404 against the GitHub API) -- the real, current bot login
  is loopover-orb[bot].
- .env.example: updated a comment that documented the exact stale
  SENTRY_RELEASE/LOOPOVER_VERSION default already fixed in JSONbored#6876/JSONbored#6881 --
  it was telling self-hosters "yes, still that prefix", which is no
  longer true.
- .env.selfhost.example: example GITHUB_APP_SLUG value and a prose line
  describing the telemetry collector.
- .claude/skills/contributor-pipeline-gardening/{SKILL,reference}.md:
  this repo's own scheduled-task skill had a real, executable
  `gh issue list --repo JSONbored/gittensory` command. It still resolves
  today via GitHub's rename redirect, but relying on that indefinitely
  is fragile and exactly the kind of stale reference that confuses a
  future AI session working in this repo. Fixed the command and
  simplified two section titles.
- n8n/workflows/*.json: 3 bundled workflow templates (not currently
  deployed -- profile "workflows" isn't in this fleet's active
  COMPOSE_PROFILES) had gittensory-prefixed names, webhook paths/ids, and
  suggested env var names. Confirmed nothing in src/scripts/tests
  references these specific webhook paths or env vars before renaming,
  and kept each node-name rename in sync with its connections-object key.

Left untouched: gittensor:bug/feature/priority (the real, current GitHub
label convention, unrelated to the old gittensory product name) and
gittensor-deployment-models (a cross-reference to this session's own
memory-file slug, out of scope for a repo-code change).
bitfathers94 pushed a commit to bitfathers94/loopover that referenced this pull request Jul 17, 2026
…er-ui, loopover-ui, and loopover-miner-extension

- CLI command references in comments (governor.ts, portfolio-queue-actions.ts,
  vite-portfolio-queue-api.ts) still said `gittensory-miner ...`; the real
  binary is `loopover-miner` (confirmed against package.json's own bin field).
- 9 vite-*-api.ts dev-server plugins had their `name:` field (and
  chat-api.test.ts's matching assertion) as `gittensory-miner-ui:...`.
- vite.config.ts's port-offset comments and styles.css's design-system
  comment referenced the sibling app as `gittensory-ui`; confirmed
  loopover-ui's own vite config relies on the same default ports (5173/4173)
  the comments describe.
- self-hosting-operations.mdx documented the exact stale SENTRY_RELEASE/
  LOOPOVER_VERSION default already fixed in JSONbored#6876/JSONbored#6881/JSONbored#6888 as current
  behavior ("defaults to gittensory-selfhost@...").
- packages/loopover-mcp/bin/loopover-mcp.js had a comment claiming
  "enrichment-analyzers keeps its legacy gittensory:// URI on purpose" --
  stale since JSONbored#6786 actually renamed that URI to loopover://.
- Remaining ~50 occurrences (background.test.ts, opportunity-badge.test.ts,
  governor/ledgers/portfolio-queue-*.test.tsx's mock config-dir paths,
  proof-of-power-stats.test.tsx, browser-sentry.test.ts) were all arbitrary
  placeholder fixture values -- confirmed each by reading the source under
  test: browser-sentry.ts's VITE_SENTRY_RELEASE has no hardcoded default at
  all (pure passthrough, not the JSONbored#6876-class bug), so its test fixture value
  is genuinely arbitrary, same as the repo-name/path fixtures elsewhere.

Left untouched (verified real, not drift): try-it.ts/.test.ts's
LEGACY_STORAGE_KEY = "gittensory.session_token" and the matching legacy-key
arguments in app.index/runs/workbench.tsx's useLocalStorage(new, default,
legacy) calls -- this is a deliberate migration path so a returning user's
existing browser localStorage (session token, onboarding state, saved
views, workbench tab) is still recognized after the rebrand. Also left the
3 self-hosting docs' "Renamed from gittensory-selfhost" / "pre-rename name"
callouts, which are already correctly historically framed.

All affected test suites pass: 98 (miner-ui) + 29 (loopover-ui) + 16
(miner-extension) = 143 tests, plus a clean loopover-miner-ui typecheck.
thomasalvaedison7777-lgtm pushed a commit to thomasalvaedison7777-lgtm/loopover that referenced this pull request Jul 17, 2026
…ry references

src/sentry.ts's resolveReesSentryRelease() defaulted every REES release
id to "gittensory-rees@<sha>" when SENTRY_RELEASE wasn't set -- same live
bug class as JSONbored#6876/JSONbored#6881, this time in REES's own separate Railway
deploy rather than the main app. Fixed the default and every test/doc
reference describing that exact format (README.md's Sentry setup guide,
sentry-upload/sentry-release-validation/sentry-degradation tests).

The remaining ~70 occurrences across analysis-context, analyzer-registry,
analyzer-circuit-breaker, external-fetch, render-contract,
request-guardrails, and scheduler tests were all an arbitrary
"JSONbored/gittensory" placeholder repoFullName fixture value -- any
string works equally to test that logic, so this is a consistency-only
cleanup, not a bug fix. analyzer-circuit-breaker.test.ts's casing
REGRESSION test ("jsonbored/gittensory" vs "JSONbored/Gittensory")
preserves the exact same casing-variation relationship with
"jsonbored/loopover" / "JSONbored/Loopover".

Left untouched: GITTENSORY-15 (a Sentry ticket id, permanent regardless
of the project rename) and two historical PR/issue citations in
secret-scan.ts/.test.ts ("gittensory PR JSONbored#5346/JSONbored#5341",
"metagraphed/gittensory#4524") -- PR/issue numbers are stable identifiers
independent of a repo rename, and the second one's cross-repo shape
wasn't clear enough to edit with confidence.

All 1335 review-enrichment tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant