#!/usr/bin/env bash # Reproduce every raw data file of the neckbeard field test from zero. # # bash analysis/scripts/run_all.sh # # Clones the in-scope component repos next to the management repo if they # are missing, then regenerates everything under analysis/data/. # Rerunning on an unchanged tree must produce no diff -- no wall-clock # time enters any output (see common.py). # # Requirements: bash, git, python3 (stdlib only). Network and lab access # are needed for the initial clone and for gitlab_issues.json; both steps # skip cleanly without them, and everything else still runs. set -euo pipefail MGMT_REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" WORKSPACE="${NB_WORKSPACE:-$(dirname "$MGMT_REPO")}" COMPONENTS_DIR="$WORKSPACE/components" SCRIPTS="$MGMT_REPO/analysis/scripts" # Scope frozen in analysis/SCOPE.md, confirmed by the human at Phase 0. COMPONENTS=( threadnet-call thread-net-git threadnet-operating axion1337.chat-gitops ThreadNet-Web ) echo "management repo: $MGMT_REPO" echo "workspace: $WORKSPACE" echo echo "== components" mkdir -p "$COMPONENTS_DIR" for slug in "${COMPONENTS[@]}"; do target="$COMPONENTS_DIR/$slug" if [ -d "$target/.git" ]; then echo " $slug: present" continue fi echo " $slug: cloning" GIT_TERMINAL_PROMPT=0 git clone -q \ "https://git.lab/axion1337.chat/$slug.git" "$target" # This analysis must never write back. Break the push path on every # clone it creates. git -C "$target" remote set-url --push origin DISABLED-no-push done echo echo "== tickets" python3 "$SCRIPTS/fetch_gitlab_issues.py" echo echo "== repo inventory" python3 "$SCRIPTS/inv_repo.py" echo echo "== links" python3 "$SCRIPTS/inv_links.py" echo echo "== claims" python3 "$SCRIPTS/inv_claims.py" echo echo "== commit-SHA references and the 2026-08-07 rewrite mapping" python3 "$SCRIPTS/inv_shas.py" echo echo "== timestamp anonymisation coverage" python3 "$SCRIPTS/inv_timestamps.py" echo echo "== claim verification (mechanical pass over claims.tsv)" python3 "$SCRIPTS/verify_claims.py" echo echo "done. raw data in $MGMT_REPO/analysis/data/"