SHELL := /bin/sh
RUN := uv run --group dev

# The two suites (docs/verification.md, Pick the cheapest evidence): unit (tests/unit) and integration (tests/integration: local, hub, aws).
UNIT := $(RUN) pytest -n auto tests/unit
LOCAL := $(RUN) pytest -n auto -m "not aws and not network" tests/integration/local
# The hub suite also syncs the models group: test_engine_capabilities runs scripts/probe_engines.py check, which reads
# the Hub library's registered model types (transformers).
HUB := $(RUN) --group models pytest -m "network and not parity" tests/integration/hub
# T1 engine containers (docs/verification.md): local Docker, the Hub and one read-only ECR login; serial (each test owns
# the host's cores while it measures), with the reference libraries of the models group.
CONTAINERS := uv run --group dev --group models pytest -m container tests/integration/containers
# The k3d tier (docs/verification.md, What each cloud tier proves): a local k3d cluster with the real KubeRay operator, $0 apart from one
# read-only ECR token. Serial: one namespace.
K3D := uv run --group dev --group spike pytest -n 0 -m k3d tests/integration/k3d
# The cluster tier (M4c Task 7, M4d Task 11, M4e Task 11): a per-session private EKS Auto Mode cluster made by gpubox
# cluster create in the SageMaker test account, us-east-1 only; serial, one session and one cluster at a time
# (hyperpod.lock). Costs money: test-cluster (plain Auto Mode, the CPU rung and one p4d.24xlarge GPU rung) runs
# about $6.00 a try; test-cluster-hyperpod (the add-on ladder, then both HyperPod rungs) about $9.50. Those are the
# measured figures, not a limit: no code stops a run when it passes one.
HP := GPUBOX_TEST_HYPERPOD=1 GPUBOX_AWS_REGION=us-east-1 AWS_REGION=us-east-1 uv run --group dev --group spike pytest -n 0 -m hyperpod tests/integration/hyperpod
# integration/aws in parallel (docs/verification.md, The locks that serialize paid runs): GPUBOX_AWS_WORKERS xdist workers, each its own session
# holding at most one SageMaker instance (default 3; 0 runs serially). The session refuses more workers than .env's
# GPUBOX_AWS_MAX_INSTANCES (default 3), and every test holds an instance slot of that cap, shared with the spikes and
# other worktrees: a shared account allows only a few instances at once. Tests marked aws_exclusive run alone, last;
# aws_gpu ones in turn on one worker, first (xdist group "gpu"; --no-loadscope-reorder keeps conftest's order). After
# a worker crash its endpoint stays up while its slot is free: --max-worker-restart 0 starts no replacement, and since
# xdist still hands the dead worker's unfinished tests to the others, the conftest's crash marker skips every aws test
# that starts after it; the verify sweep then runs. Set it in the shell or on the command line. The models group: the
# TEI GPU T2 computes its reference vectors in the test process.
GPUBOX_AWS_WORKERS ?= 3
# A T2 stages model files through the test HOME, which lives under pytest's basetemp, which follows TMPDIR. Where /tmp
# is a RAM tmpfs (this devbox: 62 GB of memory) the harness refuses to stage there before any AWS call, so the target
# owns the disk path rather than the person launching it: a hand-launched GPU chain without it lost test_t2_sglang's
# video leg at 5.2 GB (2026-11-19), which docs/verification.md had warned about twice.
AWS_TMP := $(CURDIR)/.integration/tmp
AWS := GPUBOX_T2=1 TMPDIR=$(AWS_TMP) uv run --group dev --group spike --group models pytest -n $(GPUBOX_AWS_WORKERS) --dist loadgroup --no-loadscope-reorder --max-worker-restart 0 --durations=0 -m aws tests/integration/aws
# The verify sweep after every aws run, passed or failed: the reaper deletes every test-* resource the run left and
# fails, naming each, if there was any. Never the kept stack, its caches or fixtures (docs/verification.md, The verify sweep).
VERIFY := uv run --group dev --group spike python -m tests.reaper.reap --verify
# $(call verified,COMMAND): COMMAND, then the verify sweep whatever COMMAND did (a Ctrl-C, a closed terminal or a kill
# of make included: the shell waits for COMMAND, then sweeps); fails if either failed, with COMMAND's exit code first.
verified = trap 'echo "make: verifying the cleanup before stopping" >&2' INT TERM HUP; status=0; $(1) || status=$$?; \
	$(VERIFY) || { [ $$status -ne 0 ] || status=1; }; exit $$status
# The offline self-tests of the test tooling (the T2 harness, the reaper, the spike helpers): in neither suite.
TOOLING := $(RUN) pytest -n auto -m "not aws and not network" tests/integration/aws tests/spike
# The Ray contract runtime (src/gpubox/serve_runtime) runs in the pinned Ray images' Python, 3.13 (docs/spikes/ds/a.json:
# images ray-cpu and ray-cuda, probe python 3.13.12), not the dev venv's, and the standard library differs between
# them (pathlib, Task 14 N-I1). So the unit suite, the runtime's tests in it, runs again there, without coverage, in its
# own git-ignored venv (.venv-ray, so .venv is never rebuilt) with the dev group only: no torch, so the two lost-GPU
# checks skip. About 9 s once the venv exists, so `make test` runs it (uv fetches a 3.13 first where the host has none).
RAY_PYTHON := 3.13
RAY := UV_PROJECT_ENVIRONMENT=.venv-ray uv run --locked --python $(RAY_PYTHON) --group dev pytest -n auto -p no:cacheprovider tests/unit
# The dashboard app (frontend/: React, Vite, TypeScript). Its built bundle is committed in src/gpubox/ui/static/app, so
# installing gpubox or building its wheel needs no Node; developing it does (Node 22.12 or later): setup installs
# frontend/node_modules, and make test builds the app again to check the committed bundle.
FRONTEND := npm --prefix frontend
# The CloudFormation stacks (infra/: AWS CDK in TypeScript). The account setup synthesizes to the committed
# src/gpubox/cfn/bootstrap.yaml; the cluster stack is synthesized by gpubox cluster create in the person's account
# (targets/cluster/synth.py: Node.js on their machine, never the CDK CLI or cdk bootstrap), and the unit tests run that
# synth with infra/node_modules. The jest tests (each template's invariants, bootstrap.yaml's freshness) run in test-tooling.
INFRA := npm --prefix infra
# Both TypeScript packages' lint or format script (prettier and eslint; docs/development.md), once make setup installed them
ts = @for d in frontend infra; do [ -x $$d/node_modules/.bin/eslint ] || { echo "no $$d/node_modules/.bin/eslint: run make setup" >&2; exit 1; }; \
	npm --prefix $$d run --silent $(1) || exit; done

# One coverage data file per suite, named outside build/.coverage.* so no combine takes one for a parallel fragment.
# COVERAGE_FILE overrides pyproject's data_file (build/.coverage), which holds the combined data `covgate` reads.
COV_UNIT := build/unit.coverage
COV_LOCAL := build/local.coverage
COV_HUB := build/hub.coverage
COV_CONTAINERS := build/containers.coverage
# The SGLang adapter's lines inside the DLC (test_t1_sglang.py combines its containers' data into it), and on a real GPU
# (make test-sglang-gpu: one SageMaker training job, tests/integration/aws/test_t2_sglang_gpu.py)
COV_SGLANG_T1 := build/containers-sglang.coverage
COV_SGLANG_GPU := build/aws-sglang-gpu.coverage
# The in-image training entrypoints (train_driver.py, train_launch.py) in the Ray CPU image (test_t1_train_driver.py)
COV_TRAIN_T1 := build/containers-train.coverage
COV_AWS := build/aws.coverage
COV_K3D := build/k3d.coverage
COV_HP := build/hyperpod.coverage
COV_INTEGRATION := build/integration.coverage
COV := --cov --cov-fail-under=0
# $(call summary,DATA,LABEL): one line of line, function and file coverage for one data file; gates nothing. Its JSON
# goes to build/summary.json, outside every data file's name.* pattern.
summary = $(RUN) coverage json -q --fail-under=0 --data-file=$(1) -o build/summary.json && $(RUN) python -m tests.harness.covgate build/summary.json --summary $(2)

# `make` alone does what a full release build does: set up, lint, the offline tests, then build.
.DEFAULT_GOAL := all

.PHONY: all setup build clean clean-install help lint fix-lint format test test-unit test-local test-network test-hub \
	test-containers test-k3d test-cluster test-cluster-hyperpod test-aws test-sglang-gpu test-integration test-tooling test-ray-python coverage coverage-offline coverage-finish coverage-rerun covgate \
	t2-related hooks frontend test-frontend synth test-infra test-stack install-check \
	foreign-eks-create foreign-eks-status foreign-eks-tunnel foreign-eks-delete

help:
	@echo "all (default)     setup, lint, test, then build: what \`make\` alone does"
	@echo "setup             .venv with every dependency group, frontend/node_modules, the pre-commit hook, and .env from .env.example"
	@echo "build             the wheel and sdist in dist/"
	@echo "synth             the stacks' tests, then infra/ (CDK) into src/gpubox/cfn/bootstrap.yaml: commit both"
	@echo "frontend          build the dashboard app into src/gpubox/ui/static/app (needs Node 22.12+): commit the bundle"
	@echo "clean             remove build/, dist/ and the caches (keeps .venv)"
	@echo "clean-install     clean, remove .venv, .venv-ray and frontend/node_modules, then setup again"
	@echo "lint              check format, ruff, pyrefly, the account-info guard, then prettier and eslint in frontend/ and infra/ (read-only)"
	@echo "fix-lint          format and apply all ruff fixes (unsafe too), plus prettier + eslint --fix"
	@echo "format            format and apply safe ruff fixes, then prettier and eslint --fix in frontend/ and infra/"
	@echo "test              the commit gate, offline: test-frontend, test-unit and test-local (and test-tooling, test-ray-python), then fail_under on both"
	@echo "test-frontend     the dashboard app's tests (Vitest, offline), with their per-file 95% coverage gate"
	@echo "test-unit         unit: tests/unit, in-process, in parallel, with its own coverage report"
	@echo "test-local        integration/local: real local processes, offline, in parallel, with its own coverage report"
	@echo "test-network      integration/hub: the real Hugging Face Hub (serial); alias test-hub"
	@echo "test-containers   integration/containers: pinned engine images in local Docker (T1, \$$0; needs Docker)"
	@echo "test-k3d          integration/k3d: a local k3d cluster with the real KubeRay operator (\$$0 but one read-only ECR token)"
	@echo "test-cluster      integration/hyperpod: one plain Auto Mode cluster, the CPU and p4d GPU rungs, then the verify sweep (about \$$6.00)"
	@echo "test-cluster-hyperpod  integration/hyperpod: HyperPod on Auto Mode, the add-on ladder, both rungs (about \$$9.50)"
	@echo "test-aws          integration/aws: the real AWS test account, in parallel, then the verify sweep (costs money)"
	@echo "test-sglang-gpu   the SGLang adapter on a real GPU: one ml.g6.xlarge training job, then the verify sweep (costs money)"
	@echo "test-integration  test-local, test-hub, test-containers and test-aws (runs AWS: costs money)"
	@echo "test-tooling      the offline self-tests of the T2 harness, the reaper and the spike helpers, and infra/'s jest tests"
	@echo "install-check     uv tool install this clone into build/install-check, then run the installed gpubox (no AWS, no cost, one Hub read)"
	@echo "test-stack        integration/stack: the cluster stack alone, synthesized and deployed with CloudFormation, checked read-only, deleted (costs money)"
	@echo "foreign-eks-create a private EKS cluster gpubox did not make, kept up for trials (about 0.40 USD an hour until deleted)"
	@echo "foreign-eks-status  its context, kubeconfigs and team profile; foreign-eks-tunnel holds its API on 127.0.0.1"
	@echo "foreign-eks-delete  destroy it, check nothing is left, then the verify sweep"
	@echo "test-ray-python   the unit suite again in the Ray images' Python (3.13, .venv-ray), where the Ray runtime runs"
	@echo "coverage          all four suites with coverage, combined, then the 95% gate (runs AWS: costs money)"
	@echo "coverage-offline  the four offline suites with coverage (no AWS; the first step of coverage)"
	@echo "coverage-rerun    one failed T2 file again, appended to the aws data: make coverage-rerun T=tests/integration/aws/<file>"
	@echo "coverage-finish   the combines, the summaries and the 95% gate, once the aws data is complete"
	@echo "t2-related        only the T2s a change can affect, appended to the aws data: make t2-related BASE=<commit>"
	@echo "covgate           the 95% gate on the combined coverage data already in build/"
	@echo "hooks             enable the pre-commit hook (git config core.hooksPath hooks)"

all: setup lint test build

# The development environment: the same .venv that `uv run` and `source venv` use.
setup:
	uv sync --all-groups
	$(FRONTEND) ci --ignore-scripts
	$(INFRA) ci --ignore-scripts
	git config core.hooksPath hooks
	@[ -f .env ] || { cp .env.example .env && chmod 600 .env && \
		echo "created .env from .env.example: set GPUBOX_AWS_* to run the AWS tests (docs/verification.md)"; }

build:
	rm -rf dist
	uv build

# After any change under frontend/: the build typechecks and runs the app's tests, then writes the bundle. Commit the
# bundle with the change (test-frontend fails until it matches); restart gpubox ui to see it.
frontend:
	$(FRONTEND) ci --ignore-scripts
	$(FRONTEND) run build

# After any change under infra/: tsc and the invariant tests, then bootstrap.yaml. Commit src/gpubox/cfn/ with the change
# (test-infra's freshness test fails until it matches).
synth:
	[ -d infra/node_modules ] || $(INFRA) ci --ignore-scripts
	$(INFRA) run synth

clean:
	rm -rf build dist .pytest_cache .ruff_cache
	find src tests -name __pycache__ -type d -prune -exec rm -rf {} +

clean-install: clean
	rm -rf .venv .venv-ray frontend/node_modules infra/node_modules
	$(MAKE) setup

lint:
	$(RUN) ruff format src tests scripts --check
	$(RUN) ruff check src tests scripts
	$(RUN) pyrefly check --min-severity warn
	$(RUN) pytest -q -p no:cacheprovider tests/unit/test_no_account_info.py
	$(call ts,lint)

fix-lint:
	$(RUN) ruff format src tests scripts
	$(RUN) ruff check src tests scripts --fix --unsafe-fixes
	$(call ts,format)

format:
	$(RUN) ruff format src tests scripts
	$(RUN) ruff check src tests scripts --fix
	$(call ts,format)

# The commit gate: two runs, two reports, then fail_under on their combined data (build/.coverage). The unit-only
# number is printed too. The tooling self-tests run without coverage: they measure the test tools, not gpubox.
test: test-frontend test-unit test-local test-tooling test-ray-python
	$(RUN) coverage combine -q --keep $(COV_UNIT) $(COV_LOCAL)
	@$(call summary,$(COV_UNIT),unit)
	@$(call summary,$(COV_LOCAL),integration/local)
	@$(call summary,build/.coverage,unit+local)
	@printf 'unit+local, the fail_under gate (lines and branches): '
	@$(RUN) coverage report --format=total --precision=2

# The build (tsc, the app's tests and their coverage gate, vite) into build/, then the committed bundle must be that
# build, byte for byte (builds are reproducible): a stale or hand-edited bundle fails here.
test-frontend:
	$(FRONTEND) run build -- --outDir ../build/frontend-app
	diff -r build/frontend-app src/gpubox/ui/static/app || \
		{ echo "the committed bundle isn't frontend/'s build: run make frontend" >&2; exit 1; }

test-unit:
	COVERAGE_FILE=$(COV_UNIT) $(UNIT) $(COV) --cov-report=term-missing

test-local:
	COVERAGE_FILE=$(COV_LOCAL) $(LOCAL) $(COV) --cov-report=term-missing

test-network:
	$(HUB)

test-hub: test-network

test-containers:
	COVERAGE_FILE=$(COV_CONTAINERS) $(CONTAINERS) $(COV) --cov-report=term-missing

test-k3d:
	COVERAGE_FILE=$(COV_K3D) $(K3D) $(COV) --cov-report=term-missing

# One cluster per test run (human, 2026-10-26; rulings 46-48), each only after the human approved its cost, always
# ending in gpubox cluster delete, the reaper for the run and the verify sweep. test-cluster: gpubox cluster create
# (GPU pools on, no cap; no add-on), the CPU rung, then the GPU rung on the gpubox-gpu pool (its app selects p4d.24xlarge). test-cluster-hyperpod: the
# cluster with 2 x ml.m5.xlarge (the ml.g5.xlarge added later, for the GPU module only), made with no add-on (the
# ladder's test-only switch); the
# ladder adds vpc-cni, kube-proxy, coredns and eks-pod-identity-agent one at a time (10 min each at most), then both
# HyperPod rungs.
test-cluster:
	$(call verified,COVERAGE_FILE=$(COV_HP) GPUBOX_TEST_CLUSTER=auto GPUBOX_TEST_HYPERPOD_GPU=1 $(HP)/test_auto.py tests/integration/hyperpod/test_edges.py tests/integration/hyperpod/test_refusals.py $(COV) --cov-report=term-missing)

test-cluster-hyperpod:
	$(call verified,COVERAGE_FILE=$(COV_HP) GPUBOX_TEST_CLUSTER=hyperpod GPUBOX_TEST_HYPERPOD_GPU=1 GPUBOX_TEST_HYPERPOD_ADDONS=none $(HP) $(COV) --cov-report=term-missing)

# The cluster stack alone (tests/integration/stack): synthesized for the test account, deployed with CloudFormation,
# checked read-only against the live resources, deleted, the run reaped, then the verify sweep. About 25 min of a NAT
# network and an empty Auto Mode cluster.
test-stack:
	$(call verified,GPUBOX_TEST_STACK=1 GPUBOX_AWS_REGION=us-east-1 AWS_REGION=us-east-1 uv run --group dev --group spike pytest -n 0 -m stack tests/integration/stack)

# The foreign EKS cluster (docs/verification.md, What each cloud tier proves): made as a person's own admin would, kept up until
# foreign-eks-delete, which ends with the verify sweep. foreign-eks-tunnel holds the SSM forward its kubeconfigs use.
FOREIGN_EKS := GPUBOX_AWS_REGION=us-east-1 AWS_REGION=us-east-1 uv run --group dev --group spike python -m tests.harness.foreign_eks
foreign-eks-create:
	$(FOREIGN_EKS) create
foreign-eks-status:
	$(FOREIGN_EKS) status
foreign-eks-tunnel:
	$(FOREIGN_EKS) tunnel
foreign-eks-delete:
	$(FOREIGN_EKS) delete
	$(VERIFY)

# In parallel, then always the verify sweep (docs/verification.md, The locks that serialize paid runs). The spikes stay serial: no make target
# runs them, and their perf numbers would be skewed by other tests sharing the host and the account.
# An order-only prerequisite, so the recipe stays the one command docs/verification.md quotes (test_offline_tier).
$(AWS_TMP):
	@mkdir -p $@

test-aws: | $(AWS_TMP)
	$(call verified,$(AWS))

# The SGLang adapter on a real GPU (the human's run, 2026-10-24): one ml.g6.xlarge training job in us-east-1, about
# $0.20-0.40 (at most $0.56), then the verify sweep. Its coverage goes to $(COV_SGLANG_GPU), which coverage-finish joins.
test-sglang-gpu:
	$(call verified,GPUBOX_T2=1 GPUBOX_AWS_REGION=us-east-1 AWS_REGION=us-east-1 uv run --group dev --group spike pytest -n 0 -m aws -rP tests/integration/aws/test_t2_sglang_gpu.py)

test-integration: test-local test-hub test-containers test-aws

# What a person does first: uv tool install the clone, then run the installed gpubox (docs/development.md).
# Its own tool dir and HOME, no credentials, no cost; one Hub read for init. make test checks the wheel's
# member list instead, which is offline and a second long.
install-check:
	bash scripts/install_check.sh


test-tooling: test-infra
	$(TOOLING)

# infra/'s jest tests (tsc first); skipped without infra/node_modules (make setup installs it)
test-infra:
	@if [ -d infra/node_modules ]; then $(INFRA) test; else echo "test-infra skipped: no infra/node_modules (make setup)"; fi

test-ray-python:
	$(RAY)

# Every suite, each into its own data file, then unit, integration (local + hub + containers + aws) and both combined,
# then the 95% gate (docs/verification.md, Coverage). The containers' tests run gpubox's own select, engine_render and
# tei_env in process, so they count. The aws suite is real AWS and costs money: it runs as test-aws does (in
# parallel, pytest-cov combining the workers' data, then the verify sweep). Each aws run with coverage records which
# test ran each line (docs/verification.md, Where the detail lives): --cov-context=test labels the test process, the aws
# conftest's coverage_context its children, and the C tracer, since Python 3.14's default core (sysmon) records a line
# again only for the first test that runs it.
coverage: coverage-offline | $(AWS_TMP)
	$(call verified,COVERAGE_FILE=$(COV_AWS) COVERAGE_CORE=ctrace $(AWS) $(COV) --cov-context=test --cov-report=)
	$(MAKE) coverage-finish

# Unit, local, hub, containers and k3d, each into its own data file ($0; `coverage` runs it first). The containers
# write the SGLang T1 data again: an older run's, of an older adapter, never joins.
coverage-offline:
	rm -f $(COV_SGLANG_T1) $(COV_TRAIN_T1)
	COVERAGE_FILE=$(COV_UNIT) $(UNIT) $(COV) --cov-report=
	COVERAGE_FILE=$(COV_LOCAL) $(LOCAL) $(COV) --cov-report=
	COVERAGE_FILE=$(COV_HUB) $(HUB) $(COV) --cov-report=
	COVERAGE_FILE=$(COV_CONTAINERS) $(CONTAINERS) $(COV) --cov-report=
	COVERAGE_FILE=$(COV_K3D) $(K3D) $(COV) --cov-report=

# The combines, the summaries and the 95% gate, after the aws data is complete (`coverage`, or a `coverage-rerun`). The
# aws, k3d, cluster-tier and in-DLC SGLang data join when they're there: a branch end that ran no T2, or no cluster run, still
# combines. The SGLang GPU run's data joins only for the adapter it measured (tests/harness/gpu_stamp.py refuses another).
coverage-finish:
	$(RUN) python -m tests.harness.gpu_stamp
	$(RUN) coverage combine -q --keep --data-file=$(COV_INTEGRATION) $(COV_LOCAL) $(COV_HUB) $(COV_CONTAINERS) $(wildcard $(COV_AWS) $(COV_K3D) $(COV_HP) $(COV_SGLANG_T1) $(COV_TRAIN_T1) $(COV_SGLANG_GPU))
	$(RUN) coverage combine -q --keep $(COV_UNIT) $(COV_LOCAL) $(COV_HUB) $(COV_CONTAINERS) $(wildcard $(COV_AWS) $(COV_K3D) $(COV_HP) $(COV_SGLANG_T1) $(COV_TRAIN_T1) $(COV_SGLANG_GPU))
	@$(call summary,$(COV_UNIT),unit)
	@$(call summary,$(COV_INTEGRATION),integration)
	@$(call summary,build/.coverage,unit+integration)
	$(MAKE) covgate

# One T2 file again after a failed `make coverage`, appended to the aws data, then the verify sweep (Task 20 Step 5):
# make coverage-rerun T=tests/integration/aws/<file>
coverage-rerun: | $(AWS_TMP)
	@test -n "$(T)" || { echo "set T=tests/integration/aws/<file>" >&2; exit 2; }
	$(call verified,COVERAGE_FILE=$(COV_AWS) COVERAGE_CORE=ctrace GPUBOX_T2=1 TMPDIR=$(AWS_TMP) uv run --group dev --group spike --group models pytest --durations=0 -m aws $(T) $(COV) --cov-context=test --cov-append --cov-report=)

# Only the T2s a change can affect (tests/harness/t2_select.py: docs/verification.md, Where the detail lives), as coverage-rerun
# runs a file, then the verify sweep; nothing when none is: make t2-related BASE=<commit>
t2-related: | $(AWS_TMP)
	@test -n "$(BASE)" || { echo "set BASE=<commit>, the commit the change starts from" >&2; exit 2; }
	@set -f; ids=$$(uv run --group dev --group spike --group models python -m tests.harness.t2_select --base "$(BASE)") || exit; \
	if [ -z "$$ids" ]; then echo "no T2 is related"; exit 0; fi; \
	$(call verified,COVERAGE_FILE=$(COV_AWS) COVERAGE_CORE=ctrace GPUBOX_T2=1 TMPDIR=$(AWS_TMP) uv run --group dev --group spike --group models pytest -n $(GPUBOX_AWS_WORKERS) --dist loadgroup --no-loadscope-reorder --max-worker-restart 0 --durations=0 -m aws $(COV) --cov-context=test --cov-append --cov-report= $$ids)

# The gate on the combined data in build/.coverage (from `make test` or `make coverage`): every file, the total line
# and the total function coverage >= 95%.
covgate:
	$(RUN) coverage json -q --fail-under=0 -o build/coverage.json
	$(RUN) python -m tests.harness.covgate build/coverage.json

hooks:
	git config core.hooksPath hooks
