You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit df0e264
Browse filesBrowse the repository at this point in the historyBrowse files
uv run pytest -q --strict-config --strict-markers -m "not e2e and not install and not install_script" --cov=aai_cli --cov-branch --cov-report=term-missing --cov-report=xml --cov-fail-under=90
165
+
uv run pytest -q --strict-config --strict-markers -m "not e2e and not install and not install_script" --cov=aai_cli --cov-branch --cov-context=test --cov-report=term-missing --cov-report=xml --cov-fail-under=90
138
166
139
167
echo"==> diff-cover (patch coverage: every changed line must be tested)"
140
168
# The 90% gate above is project-wide, so new code can ride on the existing suite and
@@ -148,6 +176,18 @@ else
148
176
echo" origin/main not found; skipping patch-coverage gate (CI provides it)"
149
177
fi
150
178
179
+
echo"==> mutation gate (diff-scoped: a changed line's test must fail when it breaks)"
180
+
# Coverage proves a changed line ran; this proves a test would FAIL if it broke.
181
+
# Mutates only the lines changed vs origin/main and reruns just the tests that cover
182
+
# each mutant (per-test contexts from the .coverage written above). Survivors mean a
183
+
# weak/missing assertion — fix it or mark the line `# pragma: no mutate`. Self-skips
184
+
# when origin/main is absent (same as diff-cover).
185
+
if git rev-parse --verify --quiet origin/main >/dev/null;then
186
+
uv run python scripts/mutation_gate.py origin/main
187
+
else
188
+
echo" origin/main not found; skipping mutation gate (CI provides it)"
189
+
fi
190
+
151
191
echo"==> no new static-analysis escape hatches"
152
192
# Existing escape hatches are tolerated for now; new ones must be refactored away or
153
193
# justified by changing this gate deliberately. Broad noqa/type-ignore/no-cover are
@@ -162,6 +202,20 @@ if git rev-parse --verify --quiet origin/main >/dev/null; then
162
202
exit 1
163
203
fi
164
204
205
+
# Test-suite escape hatches, same net-new-only policy: a skip/xfail is how an agent
206
+
# makes a red test go away instead of fixing it, and time.sleep() is the classic
207
+
# source of flakiness (use events/polling). The legitimate existing skips guard the
208
+
# env-gated marker suites (e2e/install/install_script) and live on origin/main, so
209
+
# they aren't added diff lines and don't trip this; a genuinely-needed new one must
210
+
# update this gate deliberately. Scoped to tests/ — production sleeps are fine.
0 commit comments