#!/usr/bin/env bash
#ddev-generated
## Description: Assert the proving ground matches the unioned manifest for a fixture set, and that fixtures do not collide (baseline integrity)
## Usage: ai-eval-doctor [fixture...]
## Example: "ddev ai-eval-doctor kb_docs canvas_home"
set -euo pipefail

APPROOT="${DDEV_APPROOT:-/var/www/html}"
AI_PG_ROOT="${AI_PG_ROOT:-${APPROOT}/recipes/ai_proving_ground}"

if [ "$#" -gt 0 ]; then
  FIXTURES=("$@")
else
  # shellcheck disable=SC2206
  FIXTURES=(${AI_PG_FIXTURES:-kb_docs canvas_home})
fi

drush php:script --script-path="${AI_PG_ROOT}/scripts" doctor.php -- "${FIXTURES[@]}"
