From 44fcbfd38388a9fe0b65dfa251e22f1c91011eb4 Mon Sep 17 00:00:00 2001 From: Nathan Gillett Date: Fri, 22 May 2026 15:06:19 -0500 Subject: [PATCH 1/2] Add CI-parity local coverage gate script Expose run-coverage-gate.sh so agent checkpoints can enforce the same 95% threshold as CI before push. Signed-off-by: Nathan Gillett --- scripts/run-coverage-gate.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/run-coverage-gate.sh diff --git a/scripts/run-coverage-gate.sh b/scripts/run-coverage-gate.sh new file mode 100755 index 0000000..9b178d4 --- /dev/null +++ b/scripts/run-coverage-gate.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# CI-parity coverage gate for local checkpoints and manual runs. +set -euo pipefail + +ROOT="$(cd "$(dirname "$0")/.." && pwd)" +cd "$ROOT" + +if [[ -x "$ROOT/.venv/bin/python" ]]; then + PYTHON="$ROOT/.venv/bin/python" +else + PYTHON=python3 +fi + +"$PYTHON" -m pytest -q +exec bash ./scripts/check-coverage.sh 95 From 67e96bc2d9cfddbc94e3141bbd9e0f4223236872 Mon Sep 17 00:00:00 2001 From: Nathan Gillett Date: Fri, 22 May 2026 16:05:20 -0500 Subject: [PATCH 2/2] Fix venv coverage CLI lookup in coverage gate Prepend .venv/bin to PATH when using the local venv so check-coverage.sh finds coverage without shell activation. Signed-off-by: Nathan Gillett --- scripts/run-coverage-gate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/run-coverage-gate.sh b/scripts/run-coverage-gate.sh index 9b178d4..b20bece 100755 --- a/scripts/run-coverage-gate.sh +++ b/scripts/run-coverage-gate.sh @@ -7,6 +7,7 @@ cd "$ROOT" if [[ -x "$ROOT/.venv/bin/python" ]]; then PYTHON="$ROOT/.venv/bin/python" + export PATH="$ROOT/.venv/bin:$PATH" else PYTHON=python3 fi