#!/usr/bin/env bash
set -euo pipefail
# Synthetic fixture, isolated from all real T3 data. Run once for each fresh capture.
run_dir="${1:?absolute timestamped run directory}"
mkdir -p "$run_dir/repo-fixture"
cat > "$run_dir/repo-fixture/math.ts" <<'TS'
export function add(a: number, b: number) {
  return a + b;
}

export function sub(a: number, b: number) {
  return a - b;
}

export function mul(a: number, b: number) {
  return a * b;
}

TS
git -C "$run_dir/repo-fixture" init -q
git -C "$run_dir/repo-fixture" add math.ts
git -C "$run_dir/repo-fixture" -c user.name='Evidence fixture' -c user.email='fixture@example.invalid' commit -qm 'Synthetic math fixture'
printf '%s\n' "$run_dir/repo-fixture"
