Skip to content

Windows: decide what python -m cw.testing parity means on the Windows runner #14

Description

@thorwhalen

pyproject.toml:130 is test_on_windows = true. The definition of v1 is a harness that
asserts byte-identical stdout/stderr against goldens recorded on a developer machine.
That fails on \r\n alone, before you reach cp1252 console encoding, .exe console-script
shims, and shlex.split — which the spec concedes is POSIX-only and then offers "the list
form of prog" as the Windows path, which is not the format read_cases parses.

Nothing in the research programme states which way this goes. Decide it before the gate is
written, or the gate is red on a third of the matrix on day one.

Options

  • A. Normalise: goldens store \n-normalised text; comparison normalises newlines and
    forces PYTHONIOENCODING=utf-8 + COLUMNS in the subprocess env. Parity runs everywhere.
  • B. Exempt: the parity job is if: runner.os != 'Windows', and the definition of v1 is
    explicitly "parity on POSIX; import + unit tests on Windows".

Recommendation: A, with the newline decision made in the goldens issue so it is baked into
the format rather than bolted onto the comparator. read_cases must accept the list form of a
case so Windows never needs shlex.

Acceptance criteria

  • Decision recorded in the parity module's docstring and the ADR index.
  • If A: cw.testing.normalise_usage and the tier-1 comparator both newline-normalise; a
    test feeds \r\n golden text and passes.
  • If A: read_cases parses both a shlex line form and a JSON list form; a test covers
    both.
  • If B: pyproject.toml's test_on_windows and the CI matrix are edited to match, and
    the README says what v1 means on Windows.
  • Whichever: cw's CI is green on all three OSes at M3.

Depends on


Research & rationale: the canonical spec and the full fleet audit live in the private research ledger (https://github.com/thorwhalen/priv/discussions/65). Effort: small.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions