Files
management/analysis/scripts/run_all.sh
T
Thore Cimbal 959bf882e9 analysis: resolve SHA references and measure timestamp anonymisation
Two checks the human asked for after Phase 1: whether the mapping list
from the 2026-08-07 history rewrite still resolves older references, and
how far the anonymisation rule actually reaches.

sha_refs.tsv verifies all 251 mapping rows against the repos and
resolves every SHA cited in a management doc.
timestamp_anonymisation.tsv separates the project's own commits from
upstream fork history before counting non-compliant timestamps.
2026-08-10 12:00:00 +00:00

77 lines
2.0 KiB
Bash
Executable File

#!/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 "done. raw data in $MGMT_REPO/analysis/data/"