# Live harness test: drives a REAL coding-agent terminal UI (spends real model
# turns, uses the invoking user's existing login). Not part of any other target.
#
#   ALR_HARNESS_REAL_TMUX=1 make live-harness-test HARNESS=claude-code|grok|hermes [ARGS="--machine linux-host"]
#
# ALR_HARNESS_REAL_TMUX=1 turns on real tmux, which the run drives the harness
# through. Without it the run refuses before starting anything: on some hosts
# reading a tmux screen crashes the tmux server, so set it only on a host where
# tmux can show a screen.
#
# See "Live harness test" in tools/README.md for what it touches and never touches.
# Offline checks of the tool itself: make harness-test-offline
.PHONY: live-harness-test harness-test-offline

live-harness-test:
	@test -n "$(HARNESS)" || { echo "usage: make live-harness-test HARNESS=claude-code|grok|hermes" >&2; exit 2; }
	PYTHONPATH=tools/harness_test uv run python -m alr_harness_test run --live --harness $(HARNESS) $(ARGS)

harness-test-offline:
	uv run --extra dev python -m pytest tools/harness_test/tests -q
