Skip to content

tests: 50 tests in 12 files fail under a Latin-1 locale before and after #1209 (ten of them rows of test_stdout_encoding.py), and whether each is a test that cannot judge under a one-byte locale or a tool defect is not measured (W1196's leftovers; follows #1196) #1214

Open

Description

@brettheap

(lane openRepoShape-4, 2026-10-23T18:00:03Z)

Found by: W1196, lane 4's writer of #1196 (the follow-up of PR #1185 for #1167), in its final report, section "Left, and defects outside scope". W1196's change (PR #1209, a draft stacked on #1185's branch) makes three rows of tests/test_adopt_plan_paths_spelled.py skip or pass under a Latin-1 locale and gives the shared helper a locale question. It also found that 50 tests in the files that use that helper fail under Latin-1 before its change and after it, among them the test_stdout_encoding.py rows that name U+65E5 U+672C, and it did not check what they assert, because they are outside #1196. This follows #1196.

What is not known. Whether each of the 50 is a test that cannot judge under a one-byte locale (a premise that holds only for UTF-8, as the three rows #1196 names did), or a real defect in a tool that a Latin-1 user would meet, is not yet measured. #1196's text says only this of them: RV1185 reported that test_stdout_encoding.py's sibling rows fail there too, "their source holds U+65E5 U+672C .md, which Latin-1 cannot spell, and nothing skips for it" (read from the code, not run against each row). Nothing is said about the other rows. CI and the bench run UTF-8, so no gate sees any of this today. #1196 is about three rows; these 50 are not in it.

The list and the command

The numbers are W1196's. The per-file list below I read from W1196's saved junit files (w1196/before-users-latin1.xml, the base d193617c7: 75 failed, 973 passed, 38 skipped; and w1196/after2-users-latin1.xml, its head: 50 failed, 900 passed, 141 skipped, 571 s) and checked: the 50 that fail on W1196's head are exactly 50 of the 75 that fail on the base, and none fails only after. Nothing was re-run for this issue. W1196's counts, same files, UTF-8: 1085 passed and 1 skipped on the base, 1090 passed and 1 skipped on its head. Under Latin-1, W1196's change took 0 tests from passed to failed, 25 from failed to passed or skipped, and 80 from passed to skipped (they ask for a name that is not UTF-8, which Latin-1 has none of).

The files (W1196's users.txt: the five files it names, and the other 18 that use skip_where_a_name_cannot_be_not_utf_8 or on_a_branch_that_is_not_utf_8; the last one is its own new file):

tests/test_adopt_plan_paths_spelled.py
tests/test_stdout_encoding.py
tests/test_non_utf8_name_callers.py
tests/test_non_utf8_name_helpers.py
tests/test_repo_hygiene.py
tests/test_adopt_git_reads.py
tests/test_adopt_pins.py
tests/test_adopt_plan_escapes.py
tests/test_adopt_spelled_names.py
tests/test_adopt_template_values.py
tests/test_bootstrap_branch_bytes.py
tests/test_bootstrap_leg_moves.py
tests/test_bump_leg_branch_and_push_line.py
tests/test_cli_reference.py
tests/test_clone_url_bytes.py
tests/test_doctor_validator_verdicts.py
tests/test_family_head_by_hand_bytes.py
tests/test_family_member_branch_not_utf8.py
tests/test_family_tracking_branch.py
tests/test_non_utf8_git_failures.py
tests/test_non_utf8_oserror_sites.py
tests/test_pin_source_unreadable.py
tests/test_update_shape_apply_lines_and_headers.py
tests/test_run_script_encoding.py

The 50 failures, by file (test ids as pytest gives them; the rows of one test are grouped):

File Failed Tests
tests/test_adopt_pins.py 14 test_a_clone_at_a_path_check_would_refuse_is_refused_by_plan[zwj]; test_a_clone_the_plan_records_is_printed_as_how_it_was_read[no-break-space] and [printable]; test_a_pin_source_check_would_refuse_is_refused_by_plan[not-utf-8]; test_a_pin_source_no_pin_reads_is_refused[zwj]; test_a_pin_source_refused_by_its_flags_is_refused_before_anything_exists at [zwj-local], [zwj-local-work-dir], [zwj-org-repo], [not-utf-8-local], [not-utf-8-local-work-dir], [not-utf-8-org-repo]; test_an_upper_cased_hand_edit_is_written_lower_cased; test_check_passes_the_clone_a_plan_records_and_writes_no_path; test_the_pin_and_write_lines_say_how_and_not_where
tests/test_stdout_encoding.py 10 test_every_tool_exits_alike_whatever_its_stdout_can_encode at [adopt-check], [bootstrap-shim], [family-init-dry-run], [scaffold-dry-run], [shape-doctor], [update-shape-check]; test_plan_on_the_posix_default_stdout; test_plan_reports_every_name_whatever_its_stdout_can_encode at [cp1252:strict], [cp1252:surrogateescape], [utf-8:strict]
tests/test_pin_source_unreadable.py 6 test_the_source_is_printed_escaped_and_never_raised_on at [not-ascii-adopt-plan], [not-ascii-scaffold-dry-run], [not-ascii-scaffold-run], [not-utf-8-adopt-plan], [not-utf-8-scaffold-dry-run], [not-utf-8-scaffold-run]
tests/test_family_tracking_branch.py 4 test_a_branch_ending_in_a_no_break_space_is_pushed_as_itself; test_each_act_refuses_the_tracking_branch_then_lands_on_a_branch at [add], [bump], [remove]
tests/test_adopt_template_values.py 4 test_a_utf8_source_directory_still_adopts_with_local_remotes; test_plan_and_check_say_the_same_sentence; test_plan_refuses_a_flag_no_file_can_hold at the --elected-by and --reference rows whose value holds a byte 0xe9 as U+DCE9
tests/test_clone_url_bytes.py 4 test_a_family_into_a_directory_no_file_can_name_is_refused and test_a_scaffold_into_a_directory_no_file_can_name_is_refused, each at [bidi-override-dry-run] and [bidi-override-real]
tests/test_bump_leg_branch_and_push_line.py 2 test_a_branch_ending_in_a_no_break_space_is_pushed_as_itself at [beside-a-branch] and [beside-the-tracking-branch]
tests/test_bootstrap_leg_moves.py 2 test_a_branch_made_under_a_failing_hook_is_said_to_be_made at [detached] and [other]
tests/test_update_shape_apply_lines_and_headers.py 1 test_a_branch_ending_in_a_no_break_space_is_not_taken_for_its_neighbour
tests/test_adopt_spelled_names.py 1 test_plan_under_the_c_locale_keeps_each_column_under_its_heading
tests/test_family_member_branch_not_utf8.py 1 test_the_member_head_is_the_branch_git_wrote[trailing-no-break-space]
tests/test_family_head_by_hand_bytes.py 1 test_surrogateescape_reads_the_issues_branch_as_caf_and_u_dce9

The command, as W1196's run.sh ran it (from the repository root, $KIT the folder the script below fills):

LOCPATH="$KIT/locales" LC_ALL=en_US.ISO-8859-1 PYTHONUTF8=0 \
  /usr/bin/python3 -m pytest -p no:cacheprovider -rfs -q \
  --basetemp=<a fresh dir> -o tmp_path_retention_policy=failed <the files above>

in the landing gate's environment: a stub gh first on PATH, GH_TOKEN=bogus, an empty GH_CONFIG_DIR, GIT_CONFIG_GLOBAL an empty file, GIT_CONFIG_NOSYSTEM=1, the test author and committer, EMAIL set, and GIT_ALLOW_PROTOCOL, GIT_SSH_COMMAND and the LANES_* variables unset. It waited for 17G free before each run. The Latin-1 locale is built as #1153's tests/test_adopt_one_byte_locale.py builds one, by W1196's build-latin1.py <KIT>:

"""Builds a Latin-1 locale under argv[1] as #1153's test_adopt_one_byte_locale.py does."""
import subprocess, sys
from pathlib import Path
kit = Path(sys.argv[1])
cm = ("<code_set_name> ISO-8859-1\n<comment_char> %\n<escape_char> /\n"
      "<mb_cur_min> 1\n<mb_cur_max> 1\nCHARMAP\n"
      + "".join(f"<U{b:04X}> /x{b:02x}\n" for b in range(256)) + "END CHARMAP\n")
(kit / "ISO-8859-1").write_text(cm, encoding="ascii")
(kit / "latin1").write_text("LC_CTYPE\nEND LC_CTYPE\n", encoding="ascii")
(kit / "locales").mkdir(exist_ok=True)
r = subprocess.run(["/usr/bin/localedef", "-c", "-i", str(kit / "latin1"), "-f",
                    str(kit / "ISO-8859-1"), str(kit / "locales" / "en_US.ISO-8859-1")],
                   capture_output=True, text=True, errors="replace", stdin=subprocess.DEVNULL)
print("localedef exit", r.returncode)

This is RV1185's recipe (#1196: localedef -c, LOCPATH, LC_ALL=en_US.ISO-8859-1, PYTHONUTF8=0). The ASCII locale (LC_ALL=C PYTHONUTF8=0 PYTHONCOERCECLOCALE=0) is the other one-byte-like configuration W1196 ran, and its files give 16 passed and 15 skipped for #1196's own file. The scripts and logs are in the lane's scratch under w1196/: run.sh, env.sh, build-latin1.py, users.txt, gate-users.sh, after2-users-latin1.log and the two junit files above.

What is to do

Done when

Each of the 50 is named as a test that cannot judge under Latin-1 (and skips there, or says in its docstring that it does not run there) or as a tool defect (with an issue of its own), and the Latin-1 run of the files above gives 0 failed. The UTF-8 and ASCII runs keep their counts.

See #1196, #1209, #1185, #1153, #1078 and #1112.

Lane: openreposhape-4 (openRepoShape-4)

Activity

  1. added this to the v1.2.1 milestone on Oct 23, 2026
  2. brettheap commented on Oct 24, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-10-24T14:09:18Z, for #1214

    Logged in lanes/log/openRepoShape-4.md at 82da53c3587744668e1433b0140d3abfd2050b04.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1214:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1214"`, kept where the row or its body names `#1214`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `1214` as a whole token:
       none
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions