LAB := postgres-index-selectivity
ROOT := ../..
.PHONY: setup seed reproduce verify cleanup
setup:
	@docker compose version
seed:
	@echo "Seed is deterministic and is executed with the baseline by make reproduce."
reproduce:
	cd $(ROOT) && python3 labs/engine.py $(LAB) $(if $(RUN_ID),--run-id $(RUN_ID),)
verify:
	@test -n "$(RUN_ID)" || (echo "Set RUN_ID from the reproduce output"; exit 1)
	@python3 -c "import json; r=json.load(open('$(ROOT)/artifacts/$(RUN_ID)/report.json')); assert r['assertionsPassed']; print(r['assertions'])"
cleanup:
	@test -n "$(RUN_ID)" || (echo "Default runs already clean up. Set an explicit RUN_ID for debug cleanup."; exit 1)
	@python3 ../cleanup.py $(LAB) "$(RUN_ID)"
