Skip to main content

scripts/ci/no-placeholders.sh

Metadata

Indexed Symbols

No indexed functions/methods detected in this file.

Markdown Headings (if applicable)

No markdown headings detected.

Source Preview

#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$ROOT_DIR"

TARGETS=(apps/web apps/gateway packages infra/helm)
PATTERN='ANCHOR_DEFAULT_WORKSPACE_ID|00000000-0000-4000-8000-000000000001|Dashboard is running in fallback mode|const portalItems\s*=|const swimlanes\s*='
RG_AVAILABLE=0
if command -v rg >/dev/null 2>&1; then
RG_AVAILABLE=1
fi

if [ "$RG_AVAILABLE" -eq 1 ]; then
if rg -n --pcre2 "$PATTERN" "${TARGETS[@]}" \
--glob '!**/*.test.*' \
--glob '!**/test/**' \
--glob '!**/__tests__/**' \
--glob '!apps/agentfield-mock/**' \
--glob '!apps/status-mock/**'; then
echo "Found placeholder or fallback patterns in production paths."
exit 1
fi
else
if grep -RInE "$PATTERN" "${TARGETS[@]}" \