Repository navigation
fix(workspace): treat pytest no-tests-collected exit as a green no-op - #1290
Merged
Merged
Conversation
c-vigo
force-pushed
the
bugfix/1281-pytest-exit5
branch
from
July 29, 2026 09:47
008dd90 to
b6623e8
Compare
The scaffolded justfile.project test/test-cov recipes gate on pyproject.toml
presence, so a consumer with a pyproject.toml but no test suite ran
uv run pytest and got exit 5 ("no tests collected"), turning just test and CI
red out of the box. Both recipes now swallow pytest's exit 5 while propagating
every other nonzero exit, so "nothing to test" no-ops green like non-Python
consumers already do.
Refs: #1281
c-vigo
force-pushed
the
bugfix/1281-pytest-exit5
branch
from
July 29, 2026 12:50
b6623e8 to
00bb31a
Compare
c-vigo
added a commit
that referenced
this pull request
Jul 29, 2026
## Summary New `docs/SOLO_ADOPTION.md`: the one document a single-user, private repo follows to adopt devkit without the team/traceability layer — expressed purely as a combination of existing knobs, no new mode. Distilled from the beancount-repo adoption evaluation that produced #1280–#1284. The recipe: `--mode devcontainer --workflow trunk` + `DEVKIT_FEATURES_DISABLED=release,sync-issues,scanning,skills,worktree,gh-templates` + `DEVKIT_REFS_POLICY=optional`, with the accurate two-step apply flow (both are manifest-only keys: scaffold, set keys, `--force` re-render, `--preview` first). The guide states what is KEPT (hook stack, commit type/format validation, agent-identity enforcement, managed upgrade path, justfiles, dev env, `ci.yml`) as clearly as what is dropped, calls out `renovate` as a kept-by-default judgment call (preserved-class `renovate.json` never pruned), warns about forward drift (new feature groups arrive enabled), and cross-links the three adoption notes that trip solo adopters (#1283 `main` default branch, #1280 undotted `typos.toml`, #1281 zero-test Python repos). A `--profile solo` installer flag is explicitly out of scope (possible follow-up against #1285). Also: README pointer in the install section (edited via `docs/templates/README.md.j2` — README is generated — and regenerated with `just docs`), MIGRATION.md cross-link bullet in the manifest section, changelog Added entry. ##⚠️ Merge order — merge LAST Depends on #1292 (`DEVKIT_REFS_POLICY`, #1282) and #1293 (`DEVKIT_FEATURES_DISABLED`, #1284): the guide documents those keys and links MIGRATION.md anchors that land with #1291/#1293. Recommended batch order: #1290 → #1291 → #1292 → #1293 → this. ## Verification Docs-only (no TDD — no runtime surface). `prek run --all-files` green; `just docs` confirms README regenerates identically from the template. Closes #1285
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A consumer with a
pyproject.tomlbut no test suite getsuv run pytest→ exit 5 ("no tests collected") → a redjust testand a red CItestjob on a repo with no defect. "Nothing to test" now no-ops green, matching how non-Python consumers silently pass through the same recipes; every other nonzero pytest exit still fails.Changes
assets/workspace/justfile.project(test,test-cov):... || { rc=$?; [ "$rc" -eq 5 ] || exit "$rc"; }— proven live under the root justfile'sbash -euo pipefailshell ([FEATURE] Nix-direct (direnv-mode) CI lane + version-skew hardening for shipped workflows #854 SSoT; exit 0/5 pass, exit 1 propagates). Template-only change; preserved consumer copies are untouched (fix(workspace): scaffold upgrade strands base recipes — justfile.project is preserved but now owns sync/precommit/test, breaking the shipped ci.yml #877 repair semantics).tests/bats/init-workspace.bats: 4 new fix(workspace): just test fails on Python repos with zero collected tests (pytest exit 5) #1281 cases driving the realjustbinary against a scaffolded workspace with a stubuv(exit 5 vs exit 1, both recipes).CHANGELOG.md(+ generated devcontainer mirror): Fixed entry.Test evidence
4128bf4b), fix in008dd90c.bats tests/bats/init-workspace.bats --filter "1281|877": 10/10 ok (new cases + full fix(workspace): scaffold upgrade strands base recipes — justfile.project is preserved but now owns sync/precommit/test, breaking the shipped ci.yml #877 CI-contract regressions).prek run --all-files: green.Merge order
Part of the #1280–#1285 solo-adoption batch; recommended merge order #1281 → #1280 → #1283 → #1282 → #1284 → #1285.
Closes #1281