Repository navigation
Description
Goal: every test that needs a directory or a file named with a byte that is not UTF-8 (or with U+202E) asks the one helper whether this system can carry the name, so a full disk, a permission error or a read-only tmp_path fails the test instead of skipping it.
Filed by lane openRepoShape-5, from the checklist candidates of #757's PR (#806, writer w757: its candidates 1 to 3, "nothing filed") and from a scan made while placing them (the third line). Tests only. Every line is read from source, not measured: each needs a disk that refuses a name, or a full one, and none was run here.
Lands after: lane 5's #663 (PR #723, fix/663-non-utf8-name-tests, head 6ba8c5d2), which adds skip_where_a_name_cannot_be_not_utf_8 (tests/conftest.py:904 at that head), and #757 (PR #806, fix/757-non-utf8-test-dirs, head 6b5e9074, stacked on #723), which moves four tests, directory_named and the file twin onto it. Neither is on main. path:line below is at main 6626a3c5; w757 cites the same sites at #806's head.
Lines
-
test_a_checkout_whose_path_is_not_utf8_is_a_checkoutmakes its own directory and skips on anyOSError(tests/test_cli_reference.py:643-655, theexceptat:648; w757's candidate 1). It buildstmp_path / os.fsdecode(b"bad" + byte 0xFF + b"name"), callsparent.mkdir(), and turns anyOSErrorintopytest.skip("this file system cannot hold a name that is not UTF-8: ..."). tests: four tests,directory_namedand the file twin ask the one helper whether a name that is not UTF-8 can be made and skip on its two answers only, and three tests skip where an ASCII file name encoding cannot carry their text (#757) #806 does not touch this file, and no other open branch does. Direction: call the helper for the question and drop thetry, as tests: four tests anddirectory_namedstill make their own "a directory named with a byte that is not UTF-8, or skip", on any OSError, beside the shared helper #663 adds, and the test that pinsmake_file's UTF-8 name fails under an ASCII file-name encoding #757's first line does for its five sites, so aPermissionErrororENOSPCraises. -
test_a_name_that_is_not_utf8_is_never_an_exception_quoted_as_a_findingdoes the same (tests/test_doctor_validator_verdicts.py:531-554, theexceptat:552; w757's candidate 1). The name isAtl+ byte 0xFF +as, made withhere.mkdir(parents=True). Its docstring says "a disk that refuses one (APFS) skips"; theexceptskips for every other error too. Direction: the helper, called ontmp_path, then themkdirunguarded. -
test_a_branch_whose_name_is_not_utf8_is_read_back_on_every_runasks the same question withwrite_bytesand skips onOSErrororValueError(tests/test_bootstrap_leg_moves.py:540-553, theexceptat:552). Not one of w757's: found by a scan oftests/on main for anexceptthat namesOSErrorand is followed bypytest.skip. It writestmp_path / "probe-"+ U+DCFF to see whether the disk takes byte 0xFF. tests: one skip helper for names and branches that are not UTF-8, Windows guards onmake_fileand the--branch a\udcffbtest by emulation, and the UTF-8 promise and the leg finding's role pinned (#663) #723 did this fortests/test_bootstrap_branch_bytes.py(the helper is called at:360of that file at6ba8c5d2); this test arrived with bootstrap.py and AGENTS-shape.md: a leg with an operation in progress or an ignored file in the way is refused, P9 names the branch it left, and no git isgit-not-runnable, somake bootstraploses nothing (#704) (#694) #745's squash (24a977c0), after tests: one skip helper for names and branches that are not UTF-8, Windows guards onmake_fileand the--branch a\udcffbtest by emulation, and the UTF-8 promise and the leg finding's role pinned (#663) #723 was written, and nothing open touches the file. Direction: the helper, in place of thetry. -
make_fileskips on anyOSErrorofwrite_bytes(tests/test_non_utf8_git_reads.py:86-93, theexcept (OSError, UnicodeError)at:91; at tests: four tests,directory_namedand the file twin ask the one helper whether a name that is not UTF-8 can be made and skip on its two answers only, and three tests skip where an ASCII file name encoding cannot carry their text (#757) #806's head:91-101, theexceptat:100, after tests: one skip helper for names and branches that are not UTF-8, Windows guards onmake_fileand the--branch a\udcffbtest by emulation, and the UTF-8 promise and the leg finding's role pinned (#663) #723's Windows guard; w757's candidate 2). tests: four tests anddirectory_namedstill make their own "a directory named with a byte that is not UTF-8, or skip", on any OSError, beside the shared helper #663 adds, and the test that pinsmake_file's UTF-8 name fails under an ASCII file-name encoding #757's first line names it as the model for the file twin, so each caller inherits the skip. Only aUnicodeError(the file-name encoding is ASCII: tests: four tests anddirectory_namedstill make their own "a directory named with a byte that is not UTF-8, or skip", on any OSError, beside the shared helper #663 adds, and the test that pinsmake_file's UTF-8 name fails under an ASCII file-name encoding #757's second line) andEILSEQ(macOS) are the system's answer;ENOSPC,EROFSandEACCESare the test's own. Direction: keep theUnicodeErrorskip, and for anOSErrorskip only whereexc.errno == errno.EILSEQ, re-raising every other, as tests: one skip helper for names and branches that are not UTF-8, Windows guards onmake_fileand the--branch a\udcffbtest by emulation, and the UTF-8 promise and the leg finding's role pinned (#663) #723's helper does formkdir(tests/conftest.py:904at6ba8c5d2). - The U+202E directory skips on any
OSError(tests/test_adopt_template_values.py:305-316, theexcept OSErrorat:314; w757's candidate 3).tmp_path / "<U+202E>caf"is valid text, so the helper's question (a name that is not UTF-8) is not this test's, but the skip hides a full disk the same way. Direction: drop thetrysomkdirraises, or narrow it toEILSEQand say which system refuses U+202E, if one does (none is known here; not run).
Not here: the scan lists 31 places on main where an except that names OSError is followed by pytest.skip. Each of these asks something else, and none is a line: whether a platform makes a symlink or a hard link (NotImplementedError beside OSError: tests/test_update_shape_hardlink.py:149, tests/test_update_shape.py:1848 and others), whether locale -a exists (tests/test_doctor_gitmodules_not_utf8.py:348), and whether a disk holds a NEL or a line feed in a folder name (tests/test_siblings_inputs.py:455, :554; valid text, refused by some disks). The helpers tests/test_adopt_pins.py:901 and tests/test_pin_source_unreadable.py:603 already re-raise every error but EILSEQ. A wider sweep reads the symlink and NEL sites first; this issue does not.
Verify: tests/test_cli_reference.py, tests/test_doctor_validator_verdicts.py, tests/test_bootstrap_leg_moves.py, tests/test_non_utf8_git_reads.py, tests/test_adopt_template_values.py, tests/test_non_utf8_name_helpers.py (new in #723) and tests/test_repo_hygiene.py pass on Linux, and tests/test_non_utf8_git_reads.py passes under PYTHONUTF8=0 LC_ALL=C PYTHONCOERCECLOCALE=0. For each line, one test under monkeypatch.setattr that makes the directory or file creation raise PermissionError, asserting a failure and not a skip, as tests/test_non_utf8_name_helpers.py does for the helper itself. One mutant per line (except OSError put back), each caught. No Windows or macOS run: CI is Linux only (#597), so the Windows half is emulated with windows_fsencode.
Overlaps. #723 and #806 edit tests/conftest.py and tests/test_non_utf8_git_reads.py (#746, #814 and #818 edit both as well, in other hunks), and #806 edits tests/test_adopt_template_values.py. #778 (l3-707-way-in-policy) edits tests/test_doctor_validator_verdicts.py. No open branch edits tests/test_cli_reference.py or tests/test_bootstrap_leg_moves.py. No pinned file changes.
Parent: #461.
Milestone: v1.1.1. Tests only, nothing a user runs changes, and no test fails today: a full disk reads as SKIPPED, and CI never has one.
🤖 Generated with Claude Code
Activity
brettheap commentedon Oct 17, 2026
CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-17T18:53:41Z, for #834
Logged in
lanes/log/openRepoShape-5.mdat2868b8c121a22517f941164e0ecc7088aeca4448.The three reads (lane-collision-protocol Rule 1):
tests: the emulated disk answers every errno but EILSEQ, `make_file` …
tests: `raised_for_every_errno` passes the errno's label to the failu…
tests: the sweep's own test builds its `Disk` before the `pytest.rais…
docs/release-notes/v1.1.1.md: the v1.1.1 notes take RV883's NIT list …
docs/release-notes/v1.1.1.md: the v1.1.1 notes take RV883's round 3 a…