Default: show dirty submodule output as WARN without failing exit 1. Set STRICT_SUBMODULE_CLEAN=1 for pre-release strict gate (submodules-clean). Made-with: Cursor
77 lines
2.7 KiB
Bash
Executable File
77 lines
2.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Summarize repo-completable vs operator/external completion state in one place.
|
|
# Usage: bash scripts/verify/check-completion-status.sh
|
|
# Exit codes:
|
|
# 0 = all repo-completable checks passed and public API looks healthy
|
|
# 1 = one or more checks reported issues
|
|
# Set SKIP_EXIT=1 to always exit 0 after printing the summary.
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
cd "$PROJECT_ROOT"
|
|
SKIP_EXIT="${SKIP_EXIT:-0}"
|
|
FAILURES=0
|
|
|
|
section() {
|
|
printf '\n=== %s ===\n' "$1"
|
|
}
|
|
|
|
run_check() {
|
|
local label="$1"
|
|
shift
|
|
printf -- '- %s\n' "$label"
|
|
if "$@"; then
|
|
printf ' [OK] %s\n' "$label"
|
|
else
|
|
printf ' [WARN] %s\n' "$label"
|
|
FAILURES=$((FAILURES + 1))
|
|
fi
|
|
}
|
|
|
|
section "Repo-Completable Checks"
|
|
run_check "Config validation" bash scripts/validation/validate-config-files.sh
|
|
run_check "All validation (--skip-genesis)" bash scripts/verify/run-all-validation.sh --skip-genesis
|
|
# Submodule WIP is common; enforce with STRICT_SUBMODULE_CLEAN=1 (e.g. pre-release).
|
|
if [[ "${STRICT_SUBMODULE_CLEAN:-0}" == "1" ]]; then
|
|
run_check "Submodule working trees" bash scripts/verify/submodules-clean.sh
|
|
else
|
|
printf -- '- %s\n' "Submodule working trees (informational; set STRICT_SUBMODULE_CLEAN=1 to fail)"
|
|
_sub_out="$(mktemp)"
|
|
if bash scripts/verify/submodules-clean.sh >"$_sub_out" 2>&1; then
|
|
printf ' [OK] Submodule working trees\n'
|
|
rm -f "$_sub_out"
|
|
else
|
|
cat "$_sub_out" >&2
|
|
rm -f "$_sub_out"
|
|
printf ' [WARN] Dirty submodule trees — commit inside each submodule, then parent pointer. See docs/00-meta/SUBMODULE_HYGIENE.md\n'
|
|
fi
|
|
fi
|
|
|
|
section "Public API Health"
|
|
run_check "Public report API" env SKIP_EXIT=0 KEEP_GOING=1 bash scripts/verify/check-public-report-api.sh
|
|
|
|
section "Status Interpretation"
|
|
cat <<'EOF'
|
|
- Repo-local validation is complete when the config and validation checks pass. Submodule trees: informational here unless you set STRICT_SUBMODULE_CLEAN=1; use scripts/verify/submodules-clean.sh for a strict gate.
|
|
- Public report API problems are usually operator-side nginx/proxy deployment issues, not repo code issues.
|
|
- Remaining non-local work is tracked in:
|
|
- docs/00-meta/STILL_NOT_DONE_EXECUTION_CHECKLIST.md
|
|
- docs/00-meta/OPERATOR_AND_EXTERNAL_COMPLETION_CHECKLIST.md
|
|
- docs/00-meta/COMPLETE_REQUIRED_OPTIONAL_RECOMMENDED_INDEX.md
|
|
EOF
|
|
|
|
section "Summary"
|
|
if (( FAILURES == 0 )); then
|
|
echo "- All repo-completable checks passed."
|
|
echo "- Public report API looks healthy."
|
|
else
|
|
echo "- Checks with warnings: $FAILURES"
|
|
echo "- Review the warnings above to distinguish repo-local cleanup from operator-side work."
|
|
fi
|
|
|
|
if (( FAILURES > 0 )) && [[ "$SKIP_EXIT" != "1" ]]; then
|
|
exit 1
|
|
fi
|