Skip to content

The windows-latest CI legs report green over 1201 skipped tests: 92 modules blanket-skip on win32 and only 5 use the resolve_bash() route that retired that pattern #497

Closed

Description

@fdaviddpt

Raised at maintainer review of PR #496 (#481), which reported the narrow instance for filing. Measuring it turned out to be much larger than one test module, so this is filed against the suite rather than against that file.

Measured, not estimated

The tests run on main @ f3232bd, run 33552387600, all 12 legs green:

leg result
pytest (windows-latest, 3.11), job 100004731913 759 passed, 1201 skipped in 147s
local macOS/arm64, Python 3.13.15 (lane 481's full run, same commit's base) 1924 passed, 43 skipped in 483s

So the Windows legs execute roughly 40% of the tests the POSIX legs do, and report success either way. A Windows-specific regression in the other 60% cannot fail this matrix.

Counted in the tree at f3232bd:

Why this is the project's own defect class

The repo's standing rule is that a check which did not run must not render like a check that found nothing. A blanket module skip does exactly that at matrix scale: the leg is collected, skipped, and reported success, and nothing anywhere counts how much of the suite that covers. #432 established the fix and #493's auditor caught one more file copying the old shape one hour ago -- the pattern is still being propagated into new files because nothing measures it.

Note what is not being claimed. Many of those 92 skips are almost certainly correct: tests/test_worktree_memory.py's own reason string ("bash subprocess + POSIX git worktree layout -- not portable to Windows runners") may well be true and unfixable. The defect is not that tests are skipped. It is that nobody can tell the correct skips from the stale ones, and the number is 1201.

What would settle it

Not a mass rewrite. Two smaller things, in order:

  1. Make the number visible. A CI step that fails, or at least annotates, when a leg's skip count crosses a recorded threshold. Then 1201 stops being invisible and any increase has to be argued for.
  2. Triage the 92 against resolve_bash(). Six modules have shown the route works. The question for each of the rest is whether its skip reason survives Git-Bash discovery, and the answer is per-module. Landing this as one sweep would be unreviewable; a recorded list with a per-module verdict is the useful artifact.

tests/test_save_session_branch_override.py -- the file PR #496 touches, which now covers REMEMBER_BRANCH and the new REMEMBER_BRANCH_CMD and runs none of it on Windows -- is a reasonable first entry on that list, since its subject is one exec of a resolver command and the platform question is real rather than incidental.

Ranked

fails-to-preserve. Nothing is wrong in the product today as far as anyone knows; what is wrong is that the Windows evidence the matrix appears to provide is 40% of what it looks like, and no reader of a green board is told so.

Platform

The CI numbers are observed, read out of the job log of a completed run. The module counts are observed by grep over the tree at f3232bd on macOS/arm64 (Darwin 24.3.0) and are a property of the source, so they hold anywhere. Whether any given one of the 92 skips could be lifted is unmeasured for all but the six already converted.

Activity

  1. fdaviddpt commented on Sep 1, 2026

    @fdaviddpt
    ContributorAuthor

    Evidence from the first attempt to convert a file off the blanket skip, an hour after filing this. It cost more than a one-line swap, and what it cost is itself an instance of this issue.

    What happened

    The #487/#488 lane (PR #499) landed two new test files carrying the blanket skipif(win32) -- the count would have gone to 94 -- so I sent it back to use resolve_bash() instead, explicitly allowing "this file genuinely cannot run under Git Bash, here is the reason" as an answer.

    Both files converted cleanly. But unlike test_hook_cwd_leak_417.py and test_transcript_path_leak_424.py, they have to reap a backgrounded flush subshell, and the shared helper for that is tests/test_session_end_hook_345.py's _reap(), which probes liveness with:

    os.kill(pid, 0)      # tests/test_session_end_hook_345.py:76

    On POSIX that is the standard no-op existence probe. On Windows, CPython maps signal 0 to GenerateConsoleCtrlEvent(0, pid) -- sending a console control event to a process group. A different operation, not a liveness check.

    tests/test_session_end_hook_345.py:35 carries the blanket pytestmark skip, so that line has never executed on the Windows legs. The lane worked around it with a local portable probe (os.kill on POSIX, tasklist on Windows) in each of the two new files rather than rewriting shared infra it was not briefed to touch, which was the right call for that diff and is why PR #499 is mergeable as it stands.

    Why it belongs on this issue

    It is the mechanism, demonstrated. A helper that is wrong on Windows survived indefinitely because the only file calling it never ran there, and the leg stayed green throughout. Converting one file surfaced it in minutes -- which is the argument for the triage in step 2 above, and also the warning about its cost: some of the 92 will not be a skip-marker swap, they will be a piece of shared infrastructure that was never exercised.

    Two things follow for whoever picks this up:

    Count, updated

    Still 92 modules blanket-skipping on win32 and 6 using resolve_bash() at 53bd09b. PR #499 takes it to 8 without adding to the 92, which is the direction, at two files an evening.

  2. added
    cohort-4
    priority:high
    on Sep 1, 2026
  3. added 3 commits that reference this issue on Sep 3, 2026
  4. fdaviddpt commented on Sep 4, 2026

    @fdaviddpt
    ContributorAuthor

    Another instance of the same class, found by PR #520's (#500/#501) self-review: tests/test_save_session_branch_override.py carries a pre-existing (issue #88, unrelated to #500/#501) module-wide pytestmark = pytest.mark.skipif(sys.platform == 'win32', ...). All 14 of its pre-existing tests, plus the 4 new #500/#501 cases and the CR-follow-up case that PR adds, never execute on the windows-latest CI leg, which still reports green regardless.

    Not fixed in PR #500/#501 -- migrating this file to tests/_bash_runner.py's resolve_bash()-narrowed skip (the pattern tests/test_bash_runner_432.py and tests/test_autonomous_log_retention_487.py already use) touches 14 unrelated pre-existing tests and needs verification against a real windows-latest runner, out of that bugfix's own blast radius.

  5. self-assigned this
    on Sep 4, 2026
  6. added 2 commits that reference this issue on Oct 6, 2026
  7. added 4 commits that reference this issue on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cohort-4priority:high

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions