LAB := postgres-idempotency
ROOT := ../..
RUN_ID ?= $(shell python3 -c 'import uuid;print(uuid.uuid4())')
RUN_ID := $(RUN_ID)
.PHONY: setup seed reproduce verify cleanup
setup:
	@docker compose version
seed:
	@echo "Deterministic dataset is created in make reproduce."
reproduce:
	cd $(ROOT) && python3 labs/practical-engine.py $(LAB) --run-id $(RUN_ID) --output artifacts/$(RUN_ID)
verify:
	@python3 -c "import json;r=json.load(open('$(ROOT)/artifacts/$(RUN_ID)/report.json'));assert r['assertionsPassed'];print(r['assertions'])"
cleanup:
	@python3 ../cleanup.py $(LAB) "$(RUN_ID)"
