The tooling suite asserts machine properties with no platform-conditional convention, so it is red on one box and wrong-way-green on the other nf-0178 ← Beads

open priority 2 task unassigned

Twinned from https://github.com/cfsh/ninefold/issues/565 by tools/beads/import_github.py's reconcile pass.

The tooling suite asserts machine properties in several places, and has no platform-conditional convention at all: grep -c 'skipIf\|skipUnless' tools/tests/*.py is 0 across the whole suite. That fails in both directions, and neither is detectable from the box that causes it.

Direction 1 — the office box's gate is permanently red

./presubmit.py --suite python on the WSL office box: 3 failures, every run, on a clean checkout of main. All three assert something about the *Windows* machine:

| test | what it asserts | |---|---| | test_nflib_proc.test_a_child_that_imports_nflib_can_print_these_glyphs | that a bare python -c "print('✓')" fails — i.e. that stdout is cp1252. On Linux it succeeds, so assertNotEqual(code, 0) fails | | test_presubmit.test_doctor_detects_a_broken_interpreter_by_RUNNING_it | the Microsoft Store stub's does NOT execute output | | test_rebuild_f5.test_registration_matching_is_case_insensitive_on_windows | normcase folding a drive letter |

Each is a *good* test — the glyphs one pins the cp1252 blocker nflib exists to fix, and its docstring is explicit that going green means the blocker is gone and the design note wants revisiting. The problem is that it runs unconditionally on a box where the premise is false.

Consequences, in order of cost:

  1. presubmit.py prints FAILED: python on the office box always. The gate is red before a session has written a line. To tell its own breakage from the baseline a session must git stash -u, re-run, compare counts, and pop — which I did on #558, and which nothing tells you to do.
  2. The baseline is tribal knowledge. It is documented in exactly one place: session rows on the board (#398), phrased as "3 documented Linux-only failures". grep -rn 'known.*fail\|Linux-only' over notes/, CLAUDE.md and presubmit.py returns nothing. A session spawned on this box without that line in its kickoff sees a red gate and no explanation.
  3. A gate that is always red teaches sessions to ignore it. Same argument as #560, and the same shape as #389 — the failure presubmit.py's own docstring says it exists to prevent is "a gate that prints green while doing less than the reader assumes"; this is its mirror.
Direction 2 — Windows-red, and invisible from where it is written

The reverse is worse because nothing on the office box can see it. PR #558 shipped three defects of this shape, and it is the whole reason that PR took six review rounds:

| | passed on office box, failed on Windows | |---|---| | F1 | str(Path) uses the host separator, so a replace("/", "-") was a no-op | | F7 | as_posix() left a C: prefix, and PureWindowsPath treats a segment starting C: as drive-relative — introduced by F1's fix | | F12 | a MainTest assertion depended on tmux being on PATH — introduced by #563.1's fix |

Two of the three were introduced *by the fix for the previous one*. The only detector was ninefold-reviewer checking the branch out on the sandbox box and running the suite there — six times. That is not a repeatable process; it happened because that PR drew unusual review attention.

This direction cannot be fixed by skipping. A skip marker helps a test that *knows* it is platform-specific. These were tests nobody knew were platform-specific.

What might close it

Directions, not a decision — parts of this are needs:direction:

Why file rather than fix

Direction 1 is ~4 lines and I would happily have folded it into #558 — but it touches test_nflib_proc, test_presubmit and test_rebuild_f5, which are the tests for the merge path, and #558 is a spawn tool. Genuinely unrelated files, which is CLAUDE.md's bar for a second PR. Direction 2 is a chunk, not a fix.

Filed unclaimed by nf-dev-office-spawn while working #557 (PR #558). Not on my chunk. Related: #560 (a wake that cannot be cleared trains sessions to ignore it), #417 (where CI would run), #541 (five pieces rediscovering the same environment traps).

Dependencies

None.

Comments

No comments.

Add a comment