@spardutti/claude-skills 2.28.0 → 2.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/setup-hook.mjs +33 -0
  2. package/package.json +1 -1
@@ -946,6 +946,13 @@ fi
946
946
  py_mutmut() {
947
947
  d="$1"
948
948
  # Returned relative to the PROJECT, because the command runs from inside it.
949
+ # Tests that need a database, a queue, or any other service cannot run on the
950
+ # host: mutmut still generates every mutant and reports them all "not
951
+ # checked", which prints exactly like a clean run. An executable .mutmut-run
952
+ # in the project runs mutmut wherever those services are — typically
953
+ # \`docker compose run\` against the app container — and takes precedence over
954
+ # every host-local option below.
955
+ if [ -x "$d.mutmut-run" ]; then printf './.mutmut-run\\n'; return; fi
949
956
  if [ -x "$d.venv/bin/mutmut" ]; then printf './.venv/bin/mutmut\\n'; return; fi
950
957
  if [ -f "$d""uv.lock" ] && command -v uv >/dev/null 2>&1; then printf 'uv run mutmut\\n'; return; fi
951
958
  if [ -f "$d""poetry.lock" ] && command -v poetry >/dev/null 2>&1; then printf 'poetry run mutmut\\n'; return; fi
@@ -1121,6 +1128,32 @@ for owner in $OWNERS; do
1121
1128
  NOWF=$(mktemp)
1122
1129
  printf '%s\\n' "$OUT" \\
1123
1130
  | sed -n 's/^[[:space:]]*\\([^[:space:]]*\\): survived$/\\1/p' | sort -u > "$NOWF"
1131
+
1132
+ # When the tests need a service the run cannot reach — a database, a queue
1133
+ # — mutmut still generates every mutant and records it "not checked". No
1134
+ # survivors come out, so the gate printed "nothing survived" and, with no
1135
+ # baseline yet, wrote an EMPTY one and told the user to commit it. That
1136
+ # repo's Python gate could never fail again.
1137
+ #
1138
+ # Counting kills cannot catch it: \`mutmut results\` SKIPS killed mutants
1139
+ # unless --all (mutmut/__main__.py results()), so a perfect suite and a
1140
+ # suite that ran nothing both print nothing. The status string is what
1141
+ # separates them — "not checked" is exit code None in status_by_exit_code,
1142
+ # meaning the mutant was never executed at all.
1143
+ NOTCHECKED=$(printf '%s\\n' "$OUT" | grep -c ': not checked$')
1144
+ if [ "$NOTCHECKED" -gt 0 ]; then
1145
+ echo " $label mutmut — UNPROVEN: $NOTCHECKED mutant(s) were never run."
1146
+ echo " They are recorded \\"not checked\\", so the suite proved nothing"
1147
+ echo " about them. Usually the tests need a service this run cannot"
1148
+ echo " reach — a database, a queue. Put an executable .mutmut-run in"
1149
+ echo " \${base}that runs mutmut where those services are, typically"
1150
+ echo " docker compose run against the app container; the gate uses"
1151
+ echo " it ahead of every host-local option."
1152
+ [ "$STATUS" = 0 ] && STATUS=2
1153
+ rm -f "$NOWF"
1154
+ continue
1155
+ fi
1156
+
1124
1157
  if [ "$MODE" = baseline ]; then
1125
1158
  cp "$NOWF" "$BL"
1126
1159
  NOTE=" $label mutmut — baseline set: $(wc -l < "$BL") survivor(s) accepted. Commit $BL."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spardutti/claude-skills",
3
- "version": "2.28.0",
3
+ "version": "2.29.0",
4
4
  "description": "Guardrails for Claude Code — best-practice skills, planning commands, and delivery gates.",
5
5
  "type": "module",
6
6
  "repository": {