@biffo/cli 0.176.1 → 0.176.2

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.
@@ -110,6 +110,20 @@ pytest_is_fast() {
110
110
  _cache="$_d/.pytest-duration"
111
111
  if [ -f "$_cache" ]; then
112
112
  _secs=$(cat "$_cache" 2>/dev/null)
113
+ elif [ -n "$LIST" ]; then
114
+ # --list must not run a test suite to answer a question about the repo, so
115
+ # with no cached measurement it has to guess -- and the direction of the
116
+ # guess is the whole decision.
117
+ #
118
+ # Guessing "fast" makes --list CLAIM a check the gate may not run, which is
119
+ # the fail-open direction and exactly what this tooling exists to eliminate.
120
+ # Guessing "slow" makes it under-report a check the gate does run: visible,
121
+ # conservative, and self-correcting, because the first real run writes the
122
+ # measurement and every --list after that is exact.
123
+ #
124
+ # Both directions were tried. Under-reporting is the one that cannot lie
125
+ # about coverage.
126
+ _secs=99999
113
127
  else
114
128
  # First run in a repo: time it once, then decide from then on. A timeout
115
129
  # means "too slow", which is the correct verdict rather than a hang.
@@ -290,7 +304,7 @@ if [ -n "$PY_DIRS" ]; then
290
304
  [ -n "$bandit_paths" ] && ci_has "bandit" && run_check "bandit$suffix" uv run bandit -r $bandit_paths -ll -q
291
305
  if [ "$PYTEST" = "0" ]; then
292
306
  skip "pytest$suffix" "excluded by BIFFO_VERIFY_PYTEST=0"
293
- elif [ -n "$PYTEST" ] || { [ -z "$LIST" ] && pytest_is_fast "."; }; then
307
+ elif [ -n "$PYTEST" ] || pytest_is_fast "."; then
294
308
  ci_has "pytest" && run_check "pytest$suffix" uv run pytest -q
295
309
  else
296
310
  skip "pytest$suffix" "suite is slower than ${PYTEST_BUDGET_SECONDS}s - CI keeps it"
@@ -302,7 +316,7 @@ if [ -n "$PY_DIRS" ]; then
302
316
  ci_has "bandit" && run_check "bandit$suffix" uv run --directory "$d" bandit -r src -ll -q
303
317
  if [ "$PYTEST" = "0" ]; then
304
318
  skip "pytest$suffix" "excluded by BIFFO_VERIFY_PYTEST=0"
305
- elif [ -n "$PYTEST" ] || { [ -z "$LIST" ] && pytest_is_fast "$d"; }; then
319
+ elif [ -n "$PYTEST" ] || pytest_is_fast "$d"; then
306
320
  ci_has "pytest" && run_check "pytest$suffix" uv run --directory "$d" pytest -q
307
321
  else
308
322
  skip "pytest$suffix" "suite is slower than ${PYTEST_BUDGET_SECONDS}s - CI keeps it"
@@ -110,6 +110,20 @@ pytest_is_fast() {
110
110
  _cache="$_d/.pytest-duration"
111
111
  if [ -f "$_cache" ]; then
112
112
  _secs=$(cat "$_cache" 2>/dev/null)
113
+ elif [ -n "$LIST" ]; then
114
+ # --list must not run a test suite to answer a question about the repo, so
115
+ # with no cached measurement it has to guess -- and the direction of the
116
+ # guess is the whole decision.
117
+ #
118
+ # Guessing "fast" makes --list CLAIM a check the gate may not run, which is
119
+ # the fail-open direction and exactly what this tooling exists to eliminate.
120
+ # Guessing "slow" makes it under-report a check the gate does run: visible,
121
+ # conservative, and self-correcting, because the first real run writes the
122
+ # measurement and every --list after that is exact.
123
+ #
124
+ # Both directions were tried. Under-reporting is the one that cannot lie
125
+ # about coverage.
126
+ _secs=99999
113
127
  else
114
128
  # First run in a repo: time it once, then decide from then on. A timeout
115
129
  # means "too slow", which is the correct verdict rather than a hang.
@@ -290,7 +304,7 @@ if [ -n "$PY_DIRS" ]; then
290
304
  [ -n "$bandit_paths" ] && ci_has "bandit" && run_check "bandit$suffix" uv run bandit -r $bandit_paths -ll -q
291
305
  if [ "$PYTEST" = "0" ]; then
292
306
  skip "pytest$suffix" "excluded by BIFFO_VERIFY_PYTEST=0"
293
- elif [ -n "$PYTEST" ] || { [ -z "$LIST" ] && pytest_is_fast "."; }; then
307
+ elif [ -n "$PYTEST" ] || pytest_is_fast "."; then
294
308
  ci_has "pytest" && run_check "pytest$suffix" uv run pytest -q
295
309
  else
296
310
  skip "pytest$suffix" "suite is slower than ${PYTEST_BUDGET_SECONDS}s - CI keeps it"
@@ -302,7 +316,7 @@ if [ -n "$PY_DIRS" ]; then
302
316
  ci_has "bandit" && run_check "bandit$suffix" uv run --directory "$d" bandit -r src -ll -q
303
317
  if [ "$PYTEST" = "0" ]; then
304
318
  skip "pytest$suffix" "excluded by BIFFO_VERIFY_PYTEST=0"
305
- elif [ -n "$PYTEST" ] || { [ -z "$LIST" ] && pytest_is_fast "$d"; }; then
319
+ elif [ -n "$PYTEST" ] || pytest_is_fast "$d"; then
306
320
  ci_has "pytest" && run_check "pytest$suffix" uv run --directory "$d" pytest -q
307
321
  else
308
322
  skip "pytest$suffix" "suite is slower than ${PYTEST_BUDGET_SECONDS}s - CI keeps it"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.176.1",
3
+ "version": "0.176.2",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",