Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/AI_Brain_Control / scripts/verify_integrity.sh |
| Date | Not specified in source |
| Repository | Janady13/AI_Brain_Control |
| Revision | 38c95c6b67d12a7096301e2eaa2892c027e411d7 |
| Branch | main |
| Path or archive member | scripts/verify_integrity.sh |
| Original SHA-256 | 605114fa8fe25529b9e7eb98a22a4ebff51cf91e3548cdf728ca3595f2c2d51a |
| Git blob SHA | c1bb18a2ca7132dcbeacf6b508c70712226dbee2 |
| Reading-copy SHA-256 | 605114fa8fe25529b9e7eb98a22a4ebff51cf91e3548cdf728ca3595f2c2d51a |
Recovered source transcript
Download complete source text ↓30 lines · 0.8 KB
#!/bin/bash
set -euo pipefail
BRAIN="${BRAIN:-/Users/josephanady/Desktop/AI_Brain_Control}"
DB="$BRAIN/db/shards_index.sqlite"
source "$BRAIN/scripts/_util.sh"
bad=0
while IFS='|' read -r id file hash; do
[ -z "$id" ] && continue
if [ ! -f "$file" ]; then
echo "❌ missing file for shard #$id → $file"
bad=$((bad+1)); continue
fi
calc=$(sha256_file "$file")
if [ "$calc" != "$hash" ]; then
echo "❌ hash mismatch shard #$id ($file)"
echo " db: $hash"
echo " calc: $calc"
bad=$((bad+1))
else
echo "✅ verified shard #$id"
fi
done < <(sqlite3 -separator '|' "$DB" "PRAGMA busy_timeout=5000; SELECT id,file,hash FROM shards ORDER BY id ASC;")
if [ $bad -gt 0 ]; then
echo "=== Verification failed: $bad issues ==="; exit 1
else
echo "=== Verification OK ==="
fi