@caddis/cli 0.4.51 → 0.4.52

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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "caddis",
3
- "version": "1.3.137",
3
+ "version": "1.3.138",
4
4
  "description": "caddis — agent-agnostic dev harness as an Antigravity (agy) plugin: TDD skills + commands, single-sourced with the Claude Code plugin."
5
5
  }
@@ -689,7 +689,49 @@ if [ -f "pyproject.toml" ] || [ -f "requirements.txt" ]; then
689
689
  echo "[gate] interpreter: $PY"
690
690
  py_gate ruff check .
691
691
  if py_sources_exist; then py_gate mypy .; else echo "[skip] mypy: no Python sources"; fi
692
- py_gate pytest -q
692
+ # pytest is OPT-IN here (CADDIS_GATE_PYTEST=1). Found 2026-10-10: the full suite took 25-31 min in this
693
+ # hook on a box whose system disk was slow, while CI ran the same suite in 5 min - and a merge needs green
694
+ # CI anyway. A local gate five times slower than the check it stands in for trains people to --no-verify it.
695
+ # When it does run: CADDIS_GATE_TMP moves TMPDIR/TEMP/TMP (tests write to tmp_path; Python reads TMPDIR
696
+ # first, so set all three), CADDIS_GATE_PYTEST_ARGS adds arguments (for example "-n 4" with pytest-xdist;
697
+ # use a number, not "auto"), and a machine-wide lock (CADDIS_GATE_LOCK, mkdir-based, waits up to
698
+ # CADDIS_GATE_LOCK_WAIT seconds, a stale one is taken over after 60 min) lets only ONE pytest gate run at a time, so several repos pushing together cannot
699
+ # pile their suites on the same disk and CI runners.
700
+ if [ "${CADDIS_GATE_PYTEST:-0}" = "1" ]; then
701
+ if [ -n "${CADDIS_GATE_TMP:-}" ]; then
702
+ mkdir -p "$CADDIS_GATE_TMP" 2>/dev/null || true
703
+ export TMPDIR="$CADDIS_GATE_TMP" TEMP="$CADDIS_GATE_TMP" TMP="$CADDIS_GATE_TMP"
704
+ fi
705
+ LOCK="${CADDIS_GATE_LOCK:-${TMPDIR:-${TEMP:-/tmp}}/caddis-pytest-gate.lock}"
706
+ mkdir -p "$(dirname "$LOCK")" 2>/dev/null || true
707
+ lock_wait="${CADDIS_GATE_LOCK_WAIT:-1800}"
708
+ waited=0
709
+ got_lock=0
710
+ while :; do
711
+ if mkdir "$LOCK" 2>/dev/null; then got_lock=1; break; fi
712
+ # A stale lock is removed, then this round still sleeps and counts: if the removal fails (a lock owned
713
+ # by another user), the loop ends at lock_wait instead of spinning forever.
714
+ if [ -n "$(find "$LOCK" -maxdepth 0 -mmin +60 2>/dev/null)" ]; then
715
+ rmdir "$LOCK" 2>/dev/null || true
716
+ fi
717
+ if [ "$waited" -ge "$lock_wait" ]; then break; fi
718
+ if [ "$waited" -eq 0 ]; then echo "[gate] pytest: waiting for another repo's pytest gate ($LOCK)"; fi
719
+ sleep 1
720
+ waited=$((waited + 1))
721
+ done
722
+ if [ "$got_lock" -eq 1 ]; then
723
+ trap 'rmdir "$LOCK" 2>/dev/null || true' EXIT INT TERM
724
+ # shellcheck disable=SC2086 # CADDIS_GATE_PYTEST_ARGS is meant to word-split
725
+ py_gate pytest -q ${CADDIS_GATE_PYTEST_ARGS:-}
726
+ rmdir "$LOCK" 2>/dev/null || true
727
+ trap - EXIT INT TERM
728
+ else
729
+ echo "[gate] pytest: another pytest gate holds $LOCK for over ${lock_wait}s - cannot run, so the gate fails" >&2
730
+ fail=1
731
+ fi
732
+ else
733
+ echo "[skip] pytest: runs in CI (set CADDIS_GATE_PYTEST=1 to run it here)"
734
+ fi
693
735
  fi
694
736
  fi
695
737
  if [ -f "package.json" ] && command -v npm >/dev/null 2>&1; then
@@ -1,7 +1,7 @@
1
1
  {
2
- "poolVersion": "1.3.137",
2
+ "poolVersion": "1.3.138",
3
3
  "bundles": {
4
- "antigravity-plugin": "1.3.137",
4
+ "antigravity-plugin": "1.3.138",
5
5
  "antigravity-plugin-extras": "1.3.42",
6
6
  "codex": "unknown"
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caddis/cli",
3
- "version": "0.4.51",
3
+ "version": "0.4.52",
4
4
  "description": "Install, update and diagnose the caddis dev harness across every coding agent you use (Claude Code, agy/Antigravity, and more).",
5
5
  "keywords": [
6
6
  "caddis",