Adds documentation and fixes bugs across the scripts/ directory.
Changes
Documentation
scripts/README.md — documents all 24 scripts with purpose, usage, CI/cron context, cross-reference graph, and service name conventions.
Bug Fixes
scripts/health-alert.sh — fixed EXIT_CODE bug where 0 captured the exit code of the if statement (always 0) instead of health-check.sh. Restructured to capture exit code correctly via HEALTH_EXIT variable before the conditional.
scripts/seed-pilot.sh — changed set -eo pipefail to set -euo pipefail (add nounset for strict undefined variable checking).
scripts/compute-metrics.sh — same set -euo pipefail fix.
scripts/setup.sh — fixed stale Metabase port reference (localhost:3000 → localhost:3001 to match health-check.sh and docker-compose.ci.yml).
scripts/seed-metabase.sh — same Metabase port fix (3 occurrences: health check URL, echo output, and setup instructions).
Verification
All 24 scripts have matching documentation in README
health-alert.sh exit code now correctly propagates health-check.sh failures
Metabase port 3001 matches docker-compose.ci.yml port mapping and health-check.sh default
- Add scripts/README.md documenting all 24 scripts with purpose, usage,
CI/cron context, and cross-reference graph.
- Fix health-alert.sh EXIT_CODE bug: 0 captured exit code of the if
statement (always 0), not health-check.sh. Restructured to capture
exit code correctly via HEALTH_EXIT variable.
- Fix seed-pilot.sh: set -eo pipefail → set -euo pipefail (add nounset).
- Fix compute-metrics.sh: same set -euo pipefail fix.
- Fix setup.sh: Metabase port 3000 → 3001 (matches health-check.sh and
CI override docker-compose.ci.yml).
- Fix seed-metabase.sh: same Metabase port 3000 → 3001 (3 occurrences).
- Add scripts/README.md documenting all 24 scripts with purpose, usage,
CI/cron context, and cross-reference graph.
- Fix health-alert.sh EXIT_CODE bug: 0 captured exit code of the if
statement (always 0), not health-check.sh. Restructured to capture
exit code correctly via HEALTH_EXIT variable.
- Fix seed-pilot.sh: set -eo pipefail → set -euo pipefail (add nounset).
- Fix compute-metrics.sh: same set -euo pipefail fix.
- Fix setup.sh: Metabase port 3000 → 3001 (matches health-check.sh and
CI override docker-compose.ci.yml).
- Fix seed-metabase.sh: same Metabase port 3000 → 3001 (3 occurrences).
Summary
Adds documentation and fixes bugs across the scripts/ directory.
Changes
Documentation
scripts/README.md— documents all 24 scripts with purpose, usage, CI/cron context, cross-reference graph, and service name conventions.Bug Fixes
scripts/health-alert.sh— fixed EXIT_CODE bug where0captured the exit code of theifstatement (always 0) instead ofhealth-check.sh. Restructured to capture exit code correctly viaHEALTH_EXITvariable before the conditional.scripts/seed-pilot.sh— changedset -eo pipefailtoset -euo pipefail(add nounset for strict undefined variable checking).scripts/compute-metrics.sh— sameset -euo pipefailfix.scripts/setup.sh— fixed stale Metabase port reference (localhost:3000→localhost:3001to matchhealth-check.shanddocker-compose.ci.yml).scripts/seed-metabase.sh— same Metabase port fix (3 occurrences: health check URL, echo output, and setup instructions).Verification
health-alert.shexit code now correctly propagates health-check.sh failuresdocker-compose.ci.ymlport mapping andhealth-check.shdefault