SPB Git

spb/firc0001_uqo

Public
5.1 KB · 76 lines shellscript
1#!/bin/bash2# N4 (a) - read-only git / file-system evidence on M3U96b:~/UQO_RESEARCH_DB for the two extraction runs.3# Writes results/runs/git_evidence.md and the two inter-revision patches. Never modifies git state.4set -u5OUT="$HOME/firc0001_review/results/runs"; mkdir -p "$OUT"6cd "$HOME/UQO_RESEARCH_DB" || exit 17export GIT_PAGER=cat8FILES="project-db/spid/extract/llm.py project-db/spid/extract/rules.py project-db/spid/extract/base.py project-db/spid/taxonomy.py project-db/spid/resolve.py project-db/spid/ingest.py project-db/spid/config.py project-db/spid/pipeline.py project-db/spid/store.py project-db/spid/__main__.py project-db/run_full_extract.py src/parsing/html_parser.py src/parsing/section_extractor.py src/parsing/filing_parser.py src/parsing/chunker.py scripts/parse_filings.py"9{10echo "# Git and file-system evidence for the two SPID extraction runs (N4a)"11echo12echo "Generated $(date -Iseconds) on $(hostname) from a read-only inspection of \`~/UQO_RESEARCH_DB\` (clone of \`gitsrv:srv/git/uqo-research-db.git\`)."13echo14echo "## Repository state"15echo '```'16echo "HEAD: $(git rev-parse HEAD)"; echo "branch: $(git rev-parse --abbrev-ref HEAD)"; echo "tags: $(git tag | tr '\n' ' ')"17echo "remote: $(git remote -v | head -1)"18echo "working tree (git status --short | head -20):"; git status --short | head -2019echo '```'20echo21echo "## All commits (there is no commit before 2026-10-27; the June 2026 run has no git revision)"22echo '```'23git log --format='%h %ad %an %s' --date=iso24echo '```'25echo26echo "## First commit of each extractor / parser file (git log --diff-filter=A)"27echo '```'28for f in $FILES; do printf '%-45s %s\n' "$f" "$(git log --diff-filter=A --format='%h %ad' --date=iso -- "$f" | tail -1)"; done29echo '```'30echo31echo "## Commits touching each file"32echo '```'33for f in $FILES; do printf '%-45s %s\n' "$f" "$(git log --format='%h' -- "$f" | tr '\n' ' ')"; done34echo '```'35echo36echo "## File modification times (file-system evidence; extractor modules untouched since 2026-06-17)"37echo '```'38for f in $FILES; do [ -f "$f" ] && printf '%-45s %s  %s bytes  sha256=%s\n' "$f" "$(stat -f '%Sm' -t '%Y-%m-%d %H:%M:%S' "$f")" "$(stat -f '%z' "$f")" "$(shasum -a 256 "$f" | cut -c1-16)"; done39echo '```'40echo41echo "## git diff --stat 0304133..2324b58 (first commit -> revision cited by the paper) for the extractor, parser and driver"42echo '```'43git diff --stat 0304133 2324b58 -- project-db/spid src/parsing scripts/parse_filings.py project-db/run_full_extract.py44echo '```'45echo46echo "## git diff --stat df7905d..2324b58 (the pair named in the paper)"47echo '```'48git diff --stat df7905d 2324b58 -- project-db/spid src/parsing scripts/parse_filings.py project-db/run_full_extract.py49echo '```'50echo51echo "## git diff --stat 2324b58..HEAD (after the paper's revision)"52echo '```'53git diff --stat 2324b58 HEAD -- project-db/spid src/parsing scripts/parse_filings.py project-db/run_full_extract.py54echo '```'55echo56echo "## June 2026 run parameters from project-db/logs/extract.log (first and last lines; model id absent)"57echo '```'58head -2 project-db/logs/extract.log; echo '...'; tail -2 project-db/logs/extract.log59echo "grep -c 'gpt' project-db/logs/extract.log = $(grep -c 'gpt' project-db/logs/extract.log)"60echo "grep -c 'gpt' data/logs/spid_extract.log = $(grep -c 'gpt' data/logs/spid_extract.log)"61echo "project-db/logs mtimes:"; for f in project-db/logs/*; do printf '  %-40s %s\n' "$f" "$(stat -f '%Sm' -t '%Y-%m-%d %H:%M:%S' "$f")"; done62echo "project-db/.env present: $( [ -f project-db/.env ] && echo yes || echo no ) (content never read)"63echo "project-db/.env.example model line: $(grep -h 'SPID_LLM_MODEL' project-db/.env.example 2>/dev/null | head -2 | tr '\n' ' ')"64echo '```'65echo66echo "## Interpretation"67echo "- The repository's first commit (0304133, 2026-10-27) already contains \`project-db/\`; no revision of the June 2026 code exists in git. The sentence '2324b58 supersedes df7905d examined in the June study' names two October commits."68echo "- The extractor modules (llm.py, rules.py, base.py, taxonomy.py, resolve.py, ingest.py) carry 2026-06-17 modification times: the prompt, the gate, the taxonomy and the resolver used in October are, by file-system evidence, the files that existed before the June run. The driver/config/store (config.py, pipeline.py, __main__.py: 2026-10-27 12:34; store.py: 2026-10-27 21:34) were edited before the first commit, so their June versions are not recoverable."69echo "- The only change to these files between df7905d and 2324b58 is the one-line DuckDB 2.0 compatibility fix in store.py (see patch)."70} > "$OUT/git_evidence.md"71git diff 0304133 2324b58 -- project-db/spid src/parsing scripts/parse_filings.py project-db/run_full_extract.py > "$OUT/git_diff_0304133_2324b58.patch"72git diff df7905d 2324b58 -- project-db/spid src/parsing scripts/parse_filings.py project-db/run_full_extract.py > "$OUT/git_diff_df7905d_2324b58.patch"73git diff 2324b58 HEAD -- project-db/spid src/parsing scripts/parse_filings.py project-db/run_full_extract.py > "$OUT/git_diff_2324b58_HEAD.patch"74wc -l "$OUT"/*.patch75echo "git state after: $(git rev-parse HEAD) $(git status --short | wc -l) changed paths"76
Files · e80ef398ede4f5784e4d15d7b4453d5f38c765cc
Menu

Theme