NutsNews3 translation diagnostics query hotfix
Section titled “NutsNews3 translation diagnostics query hotfix”This hotfix updates the diagnostic scripts to be safer with large audit windows.
What changed
Section titled “What changed”scripts/diagnose_missing_article_translations.mjsnow chunks Supabaseoriginal_url=in.(...)lookups soAUDIT_LIMIT=250does not produce an oversized REST query.- The diagnostic, audit, and backfill scripts now accept
NEXT_PUBLIC_SUPABASE_URLas a fallback whenSUPABASE_URLis not set.
cd /Users/ramideltoro/WebstormProjects/nutsnews3
UPDATE_ZIP="$HOME/Downloads/nutsnews3-translation-query-hotfix.zip"TMP_DIR="/tmp/nutsnews3-translation-query-hotfix"
rm -rf "$TMP_DIR"mkdir -p "$TMP_DIR"unzip -o "$UPDATE_ZIP" -d "$TMP_DIR"rsync -av "$TMP_DIR"/ ./
chmod +x scripts/validate_translation_update.shchmod +x scripts/diagnose_missing_article_translations.mjschmod +x scripts/audit_article_translations.mjschmod +x scripts/backfill_article_summaries.mjs
scripts/validate_translation_update.sh /Users/ramideltoro/WebstormProjects/nutsnews3Run diagnosis
Section titled “Run diagnosis”cd /Users/ramideltoro/WebstormProjects/nutsnews3
set -asource web/.env.localset +a
LANGUAGE_CODES=fr,ja,de-CH,de,el AUDIT_LIMIT=250 WINDOW_MINUTES=45 \node scripts/diagnose_missing_article_translations.mjsIf Supabase still rejects a request, lower chunk size without losing the 250-article audit window:
LANGUAGE_CODES=fr,ja,de-CH,de,el AUDIT_LIMIT=250 WINDOW_MINUTES=45 IN_CHUNK_SIZE=20 \node scripts/diagnose_missing_article_translations.mjs