#!/bin/sh
set -u

if [ "${1-}" != "shell-init" ] || [ "${2-}" != "bash" ]; then
  printf 'usage: project-context shell-init bash\n' >&2
  exit 64
fi

if [ -n "${BASH_IT_CONTEXT_TRACE:-}" ]; then
  printf 'project-context shell-init bash\n' >> "$BASH_IT_CONTEXT_TRACE"
fi

# This fixture models the expensive local discovery reported in the timing capture.
# Tests assert invocation boundaries rather than depending on elapsed wall-clock time.
sleep 0.20
printf '%s\n' \
  'export PROJECT_CONTEXT_INITIALIZED=1' \
  'PROJECT_CONTEXT_LOADS=$((${PROJECT_CONTEXT_LOADS:-0} + 1))'
