feat: system-aware tiered parallel pytest with cross-platform hardening#2877
feat: system-aware tiered parallel pytest with cross-platform hardening#2877LahkLeKey wants to merge 12 commits into
Conversation
…and on-behalf review standards (#2) * feat: add system-aware parallel pytest tiers * fix: honor cgroup v1 cpu quota for parallel worker sizing * docs: add on-behalf AI review disclosure standard * fix: support cpuacct,cpu cgroup v1 quota mount layout * test: make --parallel activate xdist workers * test: harden bash path assertions on Windows * test: handle zero available memory in parallel sizing * test: make symlink skip capability-based on Windows * test: replace platform skips with capability checks * test: address open review findings for path and xdist checks * test: restore strict setup task assertions * test: honor explicit -n auto and clean InvalidMetadata fallback * test: floor cgroup quota workers and remove dead helper * test: mock os.access for relative installer path case * test: tighten path checks and report effective workers * test: skip parallel xdist hooks when plugin is disabled * test: simplify bash path normalization helper * test: harden parallel args and cwd-safe upgrade tests
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR improves cross-platform test robustness (especially on Windows/Git Bash path translation) and adds an opt-in pytest --parallel mode that chooses a conservative worker count based on CPU/memory/OS caps (via pytest-xdist).
Changes:
- Added system-aware parallel worker sizing utilities and
--parallel/tier/max-workers pytest options, plus new unit tests. - Relaxed or normalized several path-based assertions to handle Windows/Git Bash path formats and filesystem limits.
- Updated contributor docs and PR template to mention the new parallel test option and AI attribution guidance.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_timestamp_branches.py | Adds Windows-tolerant path assertion helper + relaxes long-path failure expectation on Windows. |
| tests/test_setup_tasks.py | Adjusts TASKS_TEMPLATE assertions to be Windows/Git Bash tolerant. |
| tests/test_setup_plan_no_overwrite.py | Normalizes bash-emitted paths to Windows paths for assertions. |
| tests/test_self_upgrade_execution.py | Makes self-upgrade tests less POSIX-only via mocking/path changes. |
| tests/test_self_upgrade_detection.py | Makes InvalidMetadataError test runnable on more Python versions by patching conditionally. |
| tests/test_parallel_workers.py | New tests covering worker sizing, cgroup parsing, and CLI arg parsing helpers. |
| tests/test_authentication.py | Makes permission-warning test runnable on Windows via patching. |
| tests/integrations/test_integration_subcommand.py | Adds a capability check for Windows directory symlink creation and skips accordingly. |
| tests/integrations/test_cli.py | Makes chmod-mode assertion Windows-tolerant by spying on chmod calls. |
| tests/conftest.py | Adds --parallel pytest option + early xdist arg injection, configuration, and report header. |
| tests/_parallel.py | New module implementing CPU/memory detection and recommended worker computation. |
| pyproject.toml | Adds pytest-xdist to test extras. |
| CONTRIBUTING.md | Documents pytest --parallel usage and tuning options. |
| .github/PULL_REQUEST_TEMPLATE.md | Updates checklist to mention parallel tests + AI comment attribution checkbox. |
Comments suppressed due to low confidence (1)
tests/test_self_upgrade_execution.py:1
- These tests no longer appear gated to POSIX, but they still rely on POSIX executable-bit semantics (
chmod(0o644)and (likely)os.access(..., X_OK)). On Windows,os.access(..., X_OK)can behave like an existence check, so this test can fail (or become meaningless) when run under--parallel/xdist on Windows. Suggested fix: reintroduce a POSIX-only marker for this specific test, or explicitly patchspecify_cli._version.os.accessto returnFalsefor the installer path in this test so the behavior is deterministic cross-platform.
"""Installer execution, verification, and error-path tests for `specify self upgrade`."""
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Review round update for 127ac67: addressed all currently open review comments and posted inline 'Resolved by 127ac67' replies on each thread. Also refreshed the PR description Review Fix Ledger to track additive fixes and reduce feedback-loop churn. Validation: uv run pytest tests/test_setup_tasks.py tests/test_timestamp_branches.py tests/test_setup_plan_no_overwrite.py tests/test_self_upgrade_execution.py tests/test_parallel_workers.py -q (160 passed). |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Review round update for a227754: addressed all currently open review comments and posted inline 'Resolved by a227754' replies on each thread. Refreshed the PR description Review Fix Ledger so additive follow-up fixes remain tracked and feedback-loop churn is reduced. Validation: uv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/test_timestamp_branches.py tests/test_setup_plan_no_overwrite.py tests/test_self_upgrade_execution.py tests/integrations/test_cli.py -q (239 passed). |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.4 mini). Addressed the latest review round in commit 42571cc (Windows self-upgrade test stability, xdist dist-default handling, tightened Windows shell-path matching, and interpreter-generic comments in common.sh). Focused validation: uv run pytest tests/test_self_upgrade_execution.py tests/test_parallel_workers.py tests/test_setup_tasks.py tests/test_timestamp_branches.py tests/test_setup_plan_no_overwrite.py tests/integrations/test_cli.py -q (239 passed). |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.4 mini). Backfilled the PR review ledger with commit-level drilled-down details (trigger, code-surface, validation), added a scope-creep guard section to keep review changes bounded to this feature and coverage outcomes, and re-verified open threads. Current open-thread count is reviewer-owned conversation state; all open threads contain explicit inline |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Addressed the latest four review comments in commit b12061f: sysconf page-size fallback portability, Windows PATH separator handling in shim-based setup-tasks test, simplification of parallel pytest flow by removing subprocess reinvocation, and explicit xfail for Windows long-path truncation edge case. Validation: uv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/test_timestamp_branches.py -q (133 passed, 1 xfailed). PR description was backfilled with drilled-down add-on ledger details and updated open-thread status notes to reduce feedback-loop churn. |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Addressed the latest five review comments in commit b87e7c6: explicit xdist enablement when plugin autoload is disabled, Bash PATH separator handling for Bash subprocess shims, less brittle Windows chmod assertion semantics, realistic InvalidMetadataError coverage behavior, and UNC-preserving slash normalization with direct helper tests. Validation: uv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/integrations/test_cli.py tests/test_self_upgrade_detection.py tests/test_path_utils.py -q (176 passed, 1 skipped). PR description was backfilled with this add-on in the review ledger and open-thread status notes were updated. |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Addressed the latest three review comments in commit 8bb0ca4: UNC over-prefix normalization in shared path helpers, precise explicit-xdist plugin matching to avoid substring false positives, and interpreter-fallback wording alignment in bash resolver comments. Validation: uv run pytest tests/test_parallel_workers.py tests/test_path_utils.py tests/test_setup_tasks.py -q (55 passed). PR description review ledger has been backfilled with this add-on and open-thread resolved-by status updated. |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Addressed the latest two review comments in commit 55819c7: clarified Windows/Git Bash PATH handling in setup-tasks shim tests while preserving inherited PATH bytes, and removed chmod-dependent setup from non-executable installer tests where executability is already controlled via mocked os.access. Validation: uv run pytest tests/test_setup_tasks.py tests/test_self_upgrade_execution.py -q (46 passed), plus targeted checks (2 passed). PR description review ledger was backfilled with this add-on and open-thread status notes updated. |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Addressed the latest three review comments in commit 4c2a128: refined UNC normalization to avoid POSIX leading-slash mis-normalization, removed empty-PATH trailing-separator risk in Git Bash shim PATH construction, and hardened Windows chmod assertion matching for positional/keyword mode usage. Validation: uv run pytest tests/test_path_utils.py tests/test_setup_tasks.py tests/integrations/test_cli.py -q (105 passed). PR description ledger was backfilled with this add-on and includes an explicit POSIX-vs-Git-Bash guard section to reduce repeat cross-platform feedback loops. |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Addressed the latest three review comments in commit 1ce7a90: slash-normalized UNC preservation without regressing POSIX triple-leading-slash normalization, sentinel-safe handling in , and tighter Windows chmod target matching for plan-template writes. Validation: uv run pytest tests/test_path_utils.py tests/test_parallel_workers.py tests/integrations/test_cli.py tests/test_setup_tasks.py -q (135 passed). PR description review ledger was backfilled with this add-on and Copilot scope guidance now includes explicit anti-nitpick/evidence rules to reduce review churn. |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Corrected summary for commit 1ce7a90: addressed slash-normalized UNC preservation without regressing POSIX triple-leading-slash normalization, sentinel-safe parallel flag handling in pytest initial conftest processing, and tighter Windows chmod target matching for plan-template writes. Validation: uv run pytest tests/test_path_utils.py tests/test_parallel_workers.py tests/integrations/test_cli.py tests/test_setup_tasks.py -q (135 passed). PR description review ledger was backfilled with this add-on and Copilot scope guidance now includes explicit anti-nitpick and evidence rules to reduce review churn. |
| os_cap = cfg.os_cap_by_platform.get(platform_name, cfg.os_cap_by_platform["win32"]) | ||
|
|
||
| workers = min(cpu_cap, memory_cap, os_cap) |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Addressed the latest four review comments in commit 1c95074: unknown-platform worker-cap fallback behavior, robust path_from_bash_output trimming for shell artifacts, setup-tasks path assertion helper extraction to reduce repeated POSIX vs Git Bash logic, and stronger Windows template-write verification in integration tests. Validation: uv run pytest tests/test_parallel_workers.py tests/test_path_utils.py tests/test_setup_tasks.py tests/integrations/test_cli.py -q (137 passed). PR description review ledger was backfilled with this add-on and Copilot scope guidance now includes a POSIX/Git Bash anti-nitpick tie-breaker rule. |
| def _assert_tasks_template_matches(tasks_tmpl_raw: str, expected_path: Path) -> None: | ||
| assert _is_shell_absolute(tasks_tmpl_raw), "TASKS_TEMPLATE must be an absolute path" | ||
| expected = expected_path.resolve() | ||
| if os.name == "nt": | ||
| tasks_tmpl = path_from_bash_output(tasks_tmpl_raw) | ||
| assert tasks_tmpl.is_file(), "TASKS_TEMPLATE must point to an existing file" | ||
| assert_normalized_path_equal(tasks_tmpl_raw, expected) | ||
| return | ||
| tasks_tmpl = Path(tasks_tmpl_raw) | ||
| assert tasks_tmpl.is_file(), "TASKS_TEMPLATE must point to an existing file" | ||
| assert tasks_tmpl == expected, f"Expected {expected} but got: {tasks_tmpl}" |
| if [ -f "$registry_file" ] && (command -v python3 >/dev/null 2>&1 || command -v python >/dev/null 2>&1); then | ||
| # Read preset IDs sorted by priority (lower number = higher precedence). | ||
| # The python3 call is wrapped in an if-condition so that set -e does not | ||
| # abort the function when python3 exits non-zero (e.g. invalid JSON). | ||
| # The python call is wrapped in an if-condition so that set -e does not | ||
| # abort the function when the interpreter exits non-zero (e.g. invalid JSON). | ||
| local sorted_presets="" | ||
| if sorted_presets=$(SPECKIT_REGISTRY="$registry_file" python3 -c " | ||
| local python_cmd="python3" | ||
| if ! command -v "$python_cmd" >/dev/null 2>&1; then | ||
| python_cmd="python" | ||
| fi | ||
| if sorted_presets=$(SPECKIT_REGISTRY="$registry_file" "$python_cmd" -c " |
| # Python interpreter succeeded and returned preset IDs — search in priority order | ||
| while IFS= read -r preset_id; do | ||
| preset_id="${preset_id%$'\r'}" | ||
| local candidate="$presets_dir/$preset_id/templates/${template_name}.md" | ||
| [ -f "$candidate" ] && echo "$candidate" && return 0 | ||
| done <<< "$sorted_presets" |
| # Interpreter invocation failed (missing, or registry parse error) — fall back to deterministic directory scan | ||
| while IFS= read -r preset; do | ||
| [ -d "$preset" ] || continue | ||
| local candidate="$preset/templates/${template_name}.md" | ||
| [ -f "$candidate" ] && echo "$candidate" && return 0 | ||
| done | ||
| done < <(find "$presets_dir" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | LC_ALL=C sort) |
| def pytest_load_initial_conftests(early_config, parser, args): | ||
| """Inject xdist flags early so --parallel actually runs with workers.""" | ||
| if "--parallel" not in _args_before_double_dash(args): | ||
| return | ||
| if not _has_xdist_installed(): | ||
| return | ||
| if _is_plugin_autoload_disabled() and not _is_xdist_explicitly_enabled(args): | ||
| return | ||
| if _is_xdist_disabled(args): | ||
| return | ||
| if _has_numprocesses_arg(args): | ||
| return | ||
|
|
||
| settings = _compute_parallel_settings_from_args(args) | ||
| injected_args = _build_parallel_injected_args(args, settings.workers) | ||
| if "--" in args: | ||
| idx = args.index("--") | ||
| args[idx:idx] = injected_args | ||
| else: | ||
| args.extend(injected_args) |
|
Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex). Addressed the latest six review comments in commit ba72907: improved non-Windows path-equivalence assertions, added bash-backed resolver branch coverage (python fallback, CRLF preset-id trimming, deterministic fallback ordering), and added focused sentinel-safe pytest initial hook mutation tests. Validation: uv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/test_path_utils.py tests/integrations/test_cli.py -q (142 passed). PR description review ledger was backfilled with this add-on and Copilot guidance now includes duplicate-feedback suppression to reduce nit-pick churn. |

Posted on behalf of @LahkLeKey by GitHub Copilot (model: GPT-5.3-Codex).
Continuation for LahkLeKey#2
Summary
This PR introduces system-aware optional parallel test execution for Spec Kit's pytest suite and hardens associated cross-platform tests and review-process hygiene.
What changed
Added bounded parallel test mode via pytest flags:
--parallel--parallel-tier(low|medium|high)--parallel-max-workersImplemented worker sizing based on system constraints:
effective CPU count
available/total memory
cgroup v2 CPU quota (
/sys/fs/cgroup/cpu.max)cgroup v1 CPU quota (
cpu,cpu,cpuacct,cpuacct,cpulayouts)platform caps by tier
Wired xdist integration safely in
tests/conftest.py:respects explicit
-n/--numprocesses(including-n auto)skips injection/reinvoke when xdist is disabled (
-p no:xdist/-pno:xdist)handles
--sentinel correctly by injecting xdist args before positional boundaryreports effective worker selection in pytest header
Added/updated regression coverage for:
cgroup quota parsing behavior
zero-memory boundaries
xdist disable and
--sentinel edge casescross-platform path handling in bash-based tests
CWD-safe relative installer path tests (
monkeypatch.chdir)Validation
Fresh full-suite verification on this branch:
uv run pytest -q --parallel --parallel-tier high -rsResult:
3669 passedReview quality controls / loop prevention evidence
Source hardening was completed first in fork PR
LahkLeKey/spec-kit#2and then squashed for upstream submission.Evidence used before opening this upstream PR:
All active review findings in the fork PR were answered with on-behalf inline follow-ups including explicit
Resolved by <sha>references.A persistent "Review Fix Ledger" was backfilled into the fork PR description to track additive review fixes across rounds and reduce recurrence loops.
The final outstanding unresolved thread in the fork PR has an explicit
Resolved byreply from the PR owner and no pending unaddressed action item.Scope
Review Fix Ledger (On Behalf Of @LahkLeKey)
This section tracks additive review-driven fixes to avoid recurring feedback loops across rounds.
127ac67a227754os.accesspatching in self-upgrade tests, shared conftest helpers for argument parsing/injection, tightened path helper behavior, interpreter-generic resolver comments42571cc--distintent while defaulting toworkstealonly when unsetuv run pytest tests/test_self_upgrade_execution.py tests/test_parallel_workers.py tests/test_setup_tasks.py tests/test_timestamp_branches.py tests/test_setup_plan_no_overwrite.py tests/integrations/test_cli.py -q(239 passed)b12061fSC_PAGESIZEfallback for sysconf page-size detection, usedos.pathsepin Windows PATH shim setup, removed subprocess pytest reinvocation pathway from conftest, replaced silent Windows early-return with explicitpytest.xfailfor long-path limitationuv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/test_timestamp_branches.py -q(133 passed, 1 xfailed)b87e7c6--parallelinjection under plugin autoload disable when xdist is explicitly enabled, restored Bash PATH separator usage in Bash subprocess test, loosened Windows chmod assertion to stable safety guarantees, skipped unreachable InvalidMetadataError simulation on runtimes lacking that class, preserved UNC leading//in path normalization and added path-utils unit testsuv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/integrations/test_cli.py tests/test_self_upgrade_detection.py tests/test_path_utils.py -q(176 passed, 1 skipped)8bb0ca4////server/...), replaced substring-based xdist enable detection with exact plugin-name matching (xdist/xdist.*), and updated bash resolver fallback comment to reflect generic python interpreter availabilityuv run pytest tests/test_parallel_workers.py tests/test_path_utils.py tests/test_setup_tasks.py -q(55 passed)55819c7os.accessuv run pytest tests/test_setup_tasks.py tests/test_self_upgrade_execution.py -q(46 passed) plus targeted checks (2 passed)4c2a128///...mis-normalization), avoided trailing:when inherited PATH is empty in Git Bash shim setup, and made Windows chmod assertion resilient to positional/keyword mode invocationuv run pytest tests/test_path_utils.py tests/test_setup_tasks.py tests/integrations/test_cli.py -q(105 passed)1ce7a90--parallel, and chmod target precision--paralleldetection to args before--, and tightened Windows chmod assertions to match the plan-template target (final or expected temp-write form)uv run pytest tests/test_path_utils.py tests/test_parallel_workers.py tests/integrations/test_cli.py tests/test_setup_tasks.py -q(135 passed)1c95074path_from_bash_outputtrimming for quotes/whitespace/CRLF, extracted sharedTASKS_TEMPLATEassertion helper in setup-tasks tests, and strengthened Windows integration assertion with explicit output-file existence checkuv run pytest tests/test_parallel_workers.py tests/test_path_utils.py tests/test_setup_tasks.py tests/integrations/test_cli.py -q(137 passed)ba72907pytest_load_initial_conftestssentinel-safe injection behavioruv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/test_path_utils.py tests/integrations/test_cli.py -q(142 passed)Open Review Thread Status
Resolved by 42571cc.Resolved by b12061f.Resolved by b87e7c6.Resolved by 8bb0ca4.Resolved by 55819c7.Resolved by 4c2a128.Resolved by 1ce7a90.Resolved by 1c95074.Resolved by ba72907.POSIX vs Git Bash Guard
\\server\shareforms), not a generic rule for any leading//POSIX path.Scope Creep Guard (Copilot Review Guidance)
--parallelbehavior, worker sizing, xdist argument flow, cross-platform path correctness, and failing/fragile tests in touched files.2026-06-06 Add-on (commit 42571cc)
2026-06-06 Add-on (commit b12061f)
tests/_parallel.pyby trying bothSC_PAGE_SIZEandSC_PAGESIZEbefore computing total memory.tests/test_setup_tasks.pyto prepend shim paths usingos.pathsepinstead of hardcoded:.tests/conftest.pyby removing subprocess-based pytest reinvocation and relying on existing injection/configure hooks.pytest.xfail) intests/test_timestamp_branches.py.uv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/test_timestamp_branches.py -q(133 passed, 1 xfailed).2026-06-06 Add-on (commit b87e7c6)
PYTEST_DISABLE_PLUGIN_AUTOLOADintests/conftest.pyso--parallelstill injects workers when xdist is intentionally loaded via-p xdist.:) for the shim-based Bash subprocess test intests/test_setup_tasks.py.tests/integrations/test_cli.pyto assert safe mode and target directory without coupling to temp filename implementation details.tests/test_self_upgrade_detection.pyby skipping on runtimes withoutInvalidMetadataErrorinstead of fabricating an exception class.tests/_path_utils.pyand added direct helper coverage intests/test_path_utils.py.uv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/integrations/test_cli.py tests/test_self_upgrade_detection.py tests/test_path_utils.py -q(176 passed, 1 skipped).2026-06-06 Add-on (commit 8bb0ca4)
tests/_path_utils.pyfor over-prefixed slash inputs so replacement output stays canonical (//server/share/...), not triple-slash.tests/conftest.pyto exact plugin names (xdist,xdist.*) and avoid substring false positives.tests/test_parallel_workers.pyand UNC over-prefix normalization intests/test_path_utils.py.scripts/bash/common.shto reflect missing generic python interpreter availability, not justpython3.uv run pytest tests/test_parallel_workers.py tests/test_path_utils.py tests/test_setup_tasks.py -q(55 passed).2026-06-06 Add-on (commit 55819c7)
tests/test_setup_tasks.pyWindows shim PATH handling to preserve inherited PATH bytes while prepending the shim path for Bash subprocess execution, with an explicit comment documenting the drive-letter delimiter caveat.tests/test_self_upgrade_execution.py, relying on mockedos.access(..., X_OK)as the cross-platform executability control.uv run pytest tests/test_setup_tasks.py tests/test_self_upgrade_execution.py -q(46 passed) and targeted regression checks (2 passed).2026-06-06 Add-on (commit 4c2a128)
tests/_path_utils.pyso UNC-preserving behavior applies only to native Windows UNC-style inputs, preventing POSIX leading-slash paths (for example///usr/bin) from being pinned to a double-slash prefix.tests/test_setup_tasks.pyto avoid appending a trailing PATH separator when inherited PATH is empty.tests/integrations/test_cli.pyWindows chmod assertion to accept positional or keyword mode invocation.tests/test_path_utils.py.uv run pytest tests/test_path_utils.py tests/test_setup_tasks.py tests/integrations/test_cli.py -q(105 passed).2026-06-06 Add-on (commit 1ce7a90)
tests/_path_utils.pyto preserve slash-normalized UNC inputs (//server/share/...) while continuing to normalize POSIX triple-leading-slash paths correctly.tests/conftest.pysopytest_load_initial_conftestsonly honors--parallelbefore the--sentinel.tests/integrations/test_cli.pyto require the expected plan-template target path shape.tests/test_parallel_workers.pyandtests/test_path_utils.py.uv run pytest tests/test_path_utils.py tests/test_parallel_workers.py tests/integrations/test_cli.py tests/test_setup_tasks.py -q(135 passed).2026-06-06 Add-on (commit 1c95074)
tests/_parallel.pyto use the most permissive known OS cap whenplatform_nameis unrecognized, avoiding unnecessary throttling on non-Windows unknown platforms.tests/_path_utils.pysopath_from_bash_outputtrims shell artifacts (quotes, whitespace, CRLF) before path conversion._assert_tasks_template_matches(...)intests/test_setup_tasks.pyto centralize repeated POSIX-vs-Windows shell path assertions.written.is_file()verification intests/integrations/test_cli.pyfor Windows template-write safety checks.tests/test_parallel_workers.pyandtests/test_path_utils.py.uv run pytest tests/test_parallel_workers.py tests/test_path_utils.py tests/test_setup_tasks.py tests/integrations/test_cli.py -q(137 passed).2026-06-06 Add-on (commit ba72907)
_assert_tasks_template_matches(...)intests/test_setup_tasks.pyto compare resolved-equivalent paths on non-Windows, preventing false negatives when shell output contains equivalent non-canonical segments.tests/test_setup_tasks.pyfor: python fallback whenpython3is unavailable, CRLF trimming for preset IDs, and deterministic alphabetical directory fallback when registry parsing fails.tests/test_parallel_workers.pythat exercisepytest_load_initial_conftestsaround--sentinel boundaries and injection placement.uv run pytest tests/test_parallel_workers.py tests/test_setup_tasks.py tests/test_path_utils.py tests/integrations/test_cli.py -q(142 passed).