fix(workflows): convert hardcoded repo lists to read from repos.txt

audit-repo-health.md:
- All 9 steps now read from repos.txt dynamically
- Repos without relevant files (package.json, .dockerignore, etc.) are skipped
- No more manual maintenance when repos are added/removed

verify-all-backends.md:
- Remove duplicate learning_ai_notes entry
- Add learning_ai_efforise backend
- Add learning_ai_efforise client + learning_ai_local_llms dashboard to web checks

gitea-ci.md:
- Steps 3+4 read from repos.txt, skip repos without gitea remote
- Handle oss/ subdirectory repos via basename for Gitea API
This commit is contained in:
saravanakumardb1 2026-04-03 10:33:48 -07:00
parent 2d70eeeeb0
commit ff97a372ac
3 changed files with 54 additions and 134 deletions

View File

@ -15,20 +15,12 @@ Systematically verify consistency across all ByteLyst product repos. Catches dri
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
echo "=== packageManager in root package.json ===" echo "=== packageManager in root package.json ==="
for repo in \ while IFS= read -r repo; do
learning_ai_common_plat \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_voice_ai_agent \ [[ ! -f "$REPOS_DIR/$repo/package.json" ]] && continue
learning_ai_clock \
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_notes \
learning_ai_flowmonk \
learning_ai_trails \
learning_ai_local_memory_gpt; do
printf "%-40s " "$repo:" printf "%-40s " "$repo:"
grep '"packageManager"' "$REPOS_DIR/$repo/package.json" 2>/dev/null || echo "MISSING" grep '"packageManager"' "$REPOS_DIR/$repo/package.json" 2>/dev/null || echo "MISSING"
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
Expect: all repos show `"packageManager": "pnpm@10.6.5"`. Fix any MISSING entries. Expect: all repos show `"packageManager": "pnpm@10.6.5"`. Fix any MISSING entries.
@ -40,20 +32,12 @@ Expect: all repos show `"packageManager": "pnpm@10.6.5"`. Fix any MISSING entrie
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
echo "=== node_modules in .gitignore ===" echo "=== node_modules in .gitignore ==="
for repo in \ while IFS= read -r repo; do
learning_ai_common_plat \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_voice_ai_agent \ [[ ! -f "$REPOS_DIR/$repo/.gitignore" ]] && continue
learning_ai_clock \
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_notes \
learning_ai_flowmonk \
learning_ai_trails \
learning_ai_local_memory_gpt; do
printf "%-40s " "$repo:" printf "%-40s " "$repo:"
grep -c 'node_modules' "$REPOS_DIR/$repo/.gitignore" 2>/dev/null || echo "MISSING" grep -c 'node_modules' "$REPOS_DIR/$repo/.gitignore" 2>/dev/null || echo "MISSING"
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
Expect: all repos have at least 1 match. Fix any with 0 or MISSING. Expect: all repos have at least 1 match. Fix any with 0 or MISSING.
@ -65,16 +49,8 @@ Expect: all repos have at least 1 match. Fix any with 0 or MISSING.
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
echo "=== .dockerignore health ===" echo "=== .dockerignore health ==="
for repo in \ while IFS= read -r repo; do
learning_voice_ai_agent \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_ai_clock \
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_notes \
learning_ai_flowmonk \
learning_ai_trails \
learning_ai_local_memory_gpt; do
di="$REPOS_DIR/$repo/.dockerignore" di="$REPOS_DIR/$repo/.dockerignore"
if [ ! -f "$di" ]; then if [ ! -f "$di" ]; then
echo "$repo: MISSING .dockerignore" echo "$repo: MISSING .dockerignore"
@ -83,10 +59,10 @@ for repo in \
else else
echo "$repo: OK" echo "$repo: OK"
fi fi
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
Expect: all OK. Any BUG entries will break Docker builds. Expect: all OK (repos without .dockerignore are skipped). Any BUG entries will break Docker builds.
## 4. Check stale package-lock.json files ## 4. Check stale package-lock.json files
@ -95,19 +71,11 @@ Expect: all OK. Any BUG entries will break Docker builds.
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
echo "=== Stale package-lock.json ===" echo "=== Stale package-lock.json ==="
for repo in \ while IFS= read -r repo; do
learning_voice_ai_agent \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_ai_clock \
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_notes \
learning_ai_flowmonk \
learning_ai_trails \
learning_ai_local_memory_gpt; do
found=$(find "$REPOS_DIR/$repo" -name "package-lock.json" -not -path "*/node_modules/*" 2>/dev/null) found=$(find "$REPOS_DIR/$repo" -name "package-lock.json" -not -path "*/node_modules/*" 2>/dev/null)
if [ -n "$found" ]; then echo "STALE: $found"; fi if [ -n "$found" ]; then echo "STALE: $found"; fi
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
echo "(empty = all clean)" echo "(empty = all clean)"
``` ```
@ -120,17 +88,9 @@ Expect: no output. Remove any stale lockfiles found.
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
echo "=== Dockerfile base image + NODE_TLS ===" echo "=== Dockerfile base image + NODE_TLS ==="
for repo in \ while IFS= read -r repo; do
learning_voice_ai_agent \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_ai_clock \ for df in $(git -C "$REPOS_DIR/$repo" ls-files '*/Dockerfile' 'Dockerfile' 2>/dev/null); do
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_notes \
learning_ai_flowmonk \
learning_ai_trails \
learning_ai_local_memory_gpt; do
for df in $(git -C "$REPOS_DIR/$repo" ls-files '*/Dockerfile' 2>/dev/null); do
full="$REPOS_DIR/$repo/$df" full="$REPOS_DIR/$repo/$df"
base=$(grep -m1 '^FROM' "$full" | awk '{print $2}') base=$(grep -m1 '^FROM' "$full" | awk '{print $2}')
tls=$(grep -c 'NODE_TLS_REJECT_UNAUTHORIZED' "$full" 2>/dev/null) tls=$(grep -c 'NODE_TLS_REJECT_UNAUTHORIZED' "$full" 2>/dev/null)
@ -139,7 +99,7 @@ for repo in \
[[ "$tls" == "0" && "$df" != *python* ]] && status="$status WARN:no-NODE_TLS" [[ "$tls" == "0" && "$df" != *python* ]] && status="$status WARN:no-NODE_TLS"
echo "$repo/$df: base=$base tls=$tls $status" echo "$repo/$df: base=$base tls=$tls $status"
done done
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
Expect: all use `node:22-slim`, all have `NODE_TLS` refs > 0. Fix any WARN entries. Expect: all use `node:22-slim`, all have `NODE_TLS` refs > 0. Fix any WARN entries.
@ -151,15 +111,9 @@ Expect: all use `node:22-slim`, all have `NODE_TLS` refs > 0. Fix any WARN entri
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
echo "=== next.config.ts: transpilePackages + symlinks ===" echo "=== next.config.ts: transpilePackages + symlinks ==="
for repo in \ while IFS= read -r repo; do
learning_voice_ai_agent \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_ai_clock \ for cfg in $(find "$REPOS_DIR/$repo" -maxdepth 3 -name "next.config.ts" -not -path "*/node_modules/*" 2>/dev/null); do
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_notes \
learning_ai_trails \
learning_ai_local_memory_gpt; do
for cfg in $(find "$REPOS_DIR/$repo" -maxdepth 2 -name "next.config.ts" -not -path "*/node_modules/*" 2>/dev/null); do
relpath="${cfg#$REPOS_DIR/}" relpath="${cfg#$REPOS_DIR/}"
tp=$(grep -c 'transpilePackages' "$cfg") tp=$(grep -c 'transpilePackages' "$cfg")
sl=$(grep -c 'symlinks' "$cfg") sl=$(grep -c 'symlinks' "$cfg")
@ -168,7 +122,7 @@ for repo in \
[[ "$sl" == "0" ]] && status="$status MISSING:symlinks" [[ "$sl" == "0" ]] && status="$status MISSING:symlinks"
echo "$relpath: transpile=$tp symlinks=$sl $status" echo "$relpath: transpile=$tp symlinks=$sl $status"
done done
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
Expect: all show transpile>0 and symlinks>0. Fix any MISSING entries. Expect: all show transpile>0 and symlinks>0. Fix any MISSING entries.
@ -180,17 +134,10 @@ Expect: all show transpile>0 and symlinks>0. Fix any MISSING entries.
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
echo "=== pnpm-workspace.yaml includes common-plat ===" echo "=== pnpm-workspace.yaml includes common-plat ==="
for repo in \ while IFS= read -r repo; do
learning_voice_ai_agent \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_ai_clock \
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_notes \
learning_ai_flowmonk \
learning_ai_trails \
learning_ai_local_memory_gpt; do
ws="$REPOS_DIR/$repo/pnpm-workspace.yaml" ws="$REPOS_DIR/$repo/pnpm-workspace.yaml"
[[ ! -f "$ws" ]] && continue
if [ ! -f "$ws" ]; then if [ ! -f "$ws" ]; then
echo "$repo: MISSING pnpm-workspace.yaml" echo "$repo: MISSING pnpm-workspace.yaml"
elif grep -q 'common_plat' "$ws"; then elif grep -q 'common_plat' "$ws"; then
@ -198,10 +145,10 @@ for repo in \
else else
echo "$repo: MISSING common-plat in workspace" echo "$repo: MISSING common-plat in workspace"
fi fi
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
Expect: all OK. Fix any MISSING entries. Expect: all OK (repos without pnpm-workspace.yaml are skipped). Fix any MISSING entries.
## 8. Check docker-prep.sh uses shared prep-consumer ## 8. Check docker-prep.sh uses shared prep-consumer
@ -210,16 +157,8 @@ Expect: all OK. Fix any MISSING entries.
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
echo "=== docker-prep.sh uses shared prep-consumer ===" echo "=== docker-prep.sh uses shared prep-consumer ==="
for repo in \ while IFS= read -r repo; do
learning_voice_ai_agent \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_ai_clock \
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_notes \
learning_ai_flowmonk \
learning_ai_trails \
learning_ai_local_memory_gpt; do
script="$REPOS_DIR/$repo/scripts/docker-prep.sh" script="$REPOS_DIR/$repo/scripts/docker-prep.sh"
if [ ! -f "$script" ]; then if [ ! -f "$script" ]; then
echo "$repo: NO docker-prep.sh" echo "$repo: NO docker-prep.sh"
@ -228,10 +167,10 @@ for repo in \
else else
echo "$repo: WARN — legacy docker-prep.sh" echo "$repo: WARN — legacy docker-prep.sh"
fi fi
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
Expect: all OK. Legacy scripts should be replaced with the shared wrapper. Expect: all OK (repos without docker-prep.sh are skipped). Legacy scripts should be replaced with the shared wrapper.
## 9. Check verify scripts reference correct package filter names ## 9. Check verify scripts reference correct package filter names
@ -240,19 +179,12 @@ Expect: all OK. Legacy scripts should be replaced with the shared wrapper.
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
echo "=== Root verify scripts ===" echo "=== Root verify scripts ==="
for repo in \ while IFS= read -r repo; do
learning_voice_ai_agent \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_ai_clock \ [[ ! -f "$REPOS_DIR/$repo/package.json" ]] && continue
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_notes \
learning_ai_flowmonk \
learning_ai_trails \
learning_ai_local_memory_gpt; do
printf "%-40s " "$repo:" printf "%-40s " "$repo:"
node -e "const p=require('$REPOS_DIR/$repo/package.json'); console.log(p.scripts?.verify || 'NONE')" 2>/dev/null node -e "const p=require('$REPOS_DIR/$repo/package.json'); console.log(p.scripts?.verify || 'NONE')" 2>/dev/null
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
Review output manually — ensure `--filter` names match actual package names in sub-packages. Review output manually — ensure `--filter` names match actual package names in sub-packages.

View File

@ -30,22 +30,14 @@ Each push triggers the `.gitea/workflows/ci.yml` workflow on the local runner.
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
for repo in \ while IFS= read -r repo; do
learning_ai_common_plat \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_voice_ai_agent \ cd "$REPOS_DIR/$repo" 2>/dev/null || continue
learning_multimodal_memory_agents \ # Skip repos without a gitea remote
learning_ai_clock \ git remote get-url gitea &>/dev/null || continue
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_notes \
learning_ai_flowmonk \
learning_ai_trails \
learning_ai_local_memory_gpt; do
echo "=== $repo ===" echo "=== $repo ==="
cd "$REPOS_DIR/$repo"
git push gitea main 2>&1 | tail -2 git push gitea main 2>&1 | tail -2
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
## 4. Wait for jobs to process, then check results ## 4. Wait for jobs to process, then check results
@ -54,20 +46,14 @@ Wait ~2 minutes per repo for the runner (capacity=1) to process the queue, then
```bash ```bash
REPOS_DIR="/Users/sd9235/code/mygh" REPOS_DIR="/Users/sd9235/code/mygh"
for repo in \ while IFS= read -r repo; do
learning_ai_common_plat \ [[ -z "$repo" || "$repo" =~ ^# ]] && continue
learning_ai_clock \ cd "$REPOS_DIR/$repo" 2>/dev/null || continue
learning_ai_trails \ git remote get-url gitea &>/dev/null || continue
learning_ai_flowmonk \ # Use basename for Gitea API (oss/learning_ai_claw-cowork → learning_ai_claw-cowork)
learning_ai_notes \ repo_name=$(basename "$repo")
learning_ai_fastgap \
learning_ai_jarvis_jr \
learning_ai_peakpulse \
learning_ai_local_memory_gpt \
learning_voice_ai_agent \
learning_multimodal_memory_agents; do
echo "=== $repo ===" echo "=== $repo ==="
curl -s -u "bytelyst:bytelyst123" "http://localhost:3300/api/v1/repos/bytelyst/$repo/actions/jobs" | python3 -c " curl -s -u "bytelyst:bytelyst123" "http://localhost:3300/api/v1/repos/bytelyst/$repo_name/actions/jobs" | python3 -c "
import sys, json import sys, json
jobs = json.load(sys.stdin).get('jobs', []) jobs = json.load(sys.stdin).get('jobs', [])
if not jobs: if not jobs:
@ -80,7 +66,7 @@ else:
icon = '✅' if c == 'success' else '❌' if c == 'failure' else '⏳' icon = '✅' if c == 'success' else '❌' if c == 'failure' else '⏳'
print(f' {icon} {c:12} {j[\"name\"]}') print(f' {icon} {c:12} {j[\"name\"]}')
" 2>/dev/null " 2>/dev/null
done done < /Users/sd9235/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt
``` ```
## 5. (Optional) View logs for a failing job ## 5. (Optional) View logs for a failing job

View File

@ -39,7 +39,7 @@ for entry in \
"learning_ai_peakpulse:@peakpulse/backend" \ "learning_ai_peakpulse:@peakpulse/backend" \
"learning_voice_ai_agent:@lysnrai/backend" \ "learning_voice_ai_agent:@lysnrai/backend" \
"learning_ai_flowmonk:@flowmonk/backend" \ "learning_ai_flowmonk:@flowmonk/backend" \
"learning_ai_notes:@notelett/backend"; do "learning_ai_efforise:@efforise/backend"; do
repo="${entry%%:*}" repo="${entry%%:*}"
filter="${entry##*:}" filter="${entry##*:}"
@ -83,7 +83,9 @@ for entry in \
"learning_ai_clock:web" \ "learning_ai_clock:web" \
"learning_ai_jarvis_jr:jarvisjr-web" \ "learning_ai_jarvis_jr:jarvisjr-web" \
"learning_voice_ai_agent:user-dashboard-web" \ "learning_voice_ai_agent:user-dashboard-web" \
"learning_ai_flowmonk:@flowmonk/web"; do "learning_ai_flowmonk:@flowmonk/web" \
"learning_ai_efforise:client" \
"learning_ai_local_llms:dashboard"; do
repo="${entry%%:*}" repo="${entry%%:*}"
filter="${entry##*:}" filter="${entry##*:}"