Skip to content

tests: 8 tests in test_pinned_copy_text.py and test_family.py, files #1214 does not list, fail under a Latin-1 locale on main and on #1258, and whether each cannot judge there or is a tool defect is not classified (F1214's leftovers; follows #1214) #1259

Closed

Description

@brettheap

(lane openRepoShape-4, 2026-11-08T16:00:38Z)

Found by: F1214, lane 4's finisher of #1214 (the 50 tests that fail under a Latin-1 locale), in its final report, section "Left, and defects outside scope". Its draft PR #1258 (a draft for #1214) says the same under "Left, and outside this issue": "These are read from their failure messages only, not classified per test. They are left for an issue of their own." This is that issue. It follows #1214. The report is a lane 4 writer's message and is not posted on GitHub.

Lane 3 places this issue, and it has no milestone here. It is in the one-byte-locale test area of #1214, #1196 and #1224.

Every count below is F1214's, from its saved Latin-1 and UTF-8 runs (the logs and junit files are in lane 4's scratch, tools/run/f1214/), read for this issue and not re-run. Test ids and line numbers are at origin/main 5926cccab, read from that commit and not run; F1214's own runs were at main bd3e9c148. #1258 is a draft and is not on main. This body is ASCII, so each non-ASCII character is written as its code point, and a printed escape is written with a backslash.

What is missing

Nothing a user can see is known: these are tests. CI and the bench run UTF-8, so no gate sees any of this today. What is not known is whether each of the 8 is a test that cannot judge under a one-byte locale (its premise holds only for UTF-8), a test that reads wrongly, or a tool defect that a Latin-1 user would meet. #1214 asked that of 50 tests. These 8 are not among the 50.

How they differ from #1214's 50

What was measured, and by whom

Measured by F1214, under Latin-1 (a locale built with localedef -c as #1153's tests/test_adopt_one_byte_locale.py builds one; LOCPATH, LC_ALL=en_US.ISO-8859-1, PYTHONUTF8=0; Python 3.12.3; git-filter-repo 2.47.0 first on PATH; a stub gh, a bogus token and an empty global git config). For this issue I read the four saved junit files, and the same 8 test ids fail in each:

Run Tree Result under Latin-1
27 files main bd3e9c148 123 failed, 1373 passed, 25 skipped
the same 27 files #1258's head c8641c691 44 failed, 1404 passed, 74 skipped
29 files a scratch merge of #1258 and #1209 (409885e53, local, never pushed) 8 failed, 1330 passed, 220 skipped: these 8 and no other
4 files (test_family.py, test_family_tracking_branch.py, test_update_shape_kept_helper.py, test_pinned_copy_text.py) a scratch merge of #1258 and main dffc42265 (036e02f1d, local, never pushed) 8 failed, 404 passed, 1 skipped: the same 8

The 8, by test id

The failure text is from the junit file of the run on the merge with dffc42265; the same 8 ids fail in the other three runs, whose text I did not compare. What each test does is read from origin/main 5926cccab, not run.

Six rows of tests/test_pinned_copy_text.py:

  • test_the_variable_the_warning_offers_reads_the_later_link (:190)
  • test_an_unused_pin_source_is_named_spelled[esc] and [forged-line] (:450)
  • test_a_replaced_pin_source_and_its_replacement_are_spelled (:465)
  • test_a_key_read_as_a_path_is_spelled (:480)
  • test_a_printable_pin_source_is_named_as_typed (:497)

Each compares text the tool printed with text that holds U+2014, or U+2192 and U+2026, and the printed text holds them escaped. Measured: the first row's stdout reads ...assembly \u2014 descendant form ... openXdox \u2192 openYdox \u2192 openInk ... and its digest ends \u2026, and its assertion looks for declared pin chain openXdox, U+2192, openYdox, U+2192, openInk, U+2192. In the other five the note reads not used \u2014 each declared pin had a more specific source ... (or ... \u2014 the later ...) where the row expects not used, U+2014. The Latin-1 stdout cannot hold the character, so the tool prints it escaped. Per #1258's body that is #214's design for the digest's ellipsis in the lines tests/test_adopt_pins.py compares, and escape_unencodable_stdout (#391 and #454) is the function other tools call for it. Whether each of these six prints through that function was not checked.

tests/test_family.py::test_init_writes_the_holders_agent_files (:321). Measured: assert "Read AGENTS-shape.md first ..." == "Read AGENTS-shape.md first ...", where the left side holds three characters (the diff marks three columns) in the place of the U+2014 the right side holds. Read from the code: line 350 is agents = (root / "AGENTS.md").read_text() with no encoding=, so the file is read in the locale's encoding, and the three bytes of U+2014 in UTF-8 (E2 80 94) are read one by one as Latin-1. F1214's words: "it reads the UTF-8 file it checks in the locale's encoding". So this one looks like a test that reads wrongly, not a tool defect.

tests/test_family.py::test_commit_one_refuses_a_trailer_that_is_no_text_before_it_stages (:1328). Measured: Failed: DID NOT RAISE Refusal, at the pytest.raises(Refusal) around _commit_one, which is given a trailer made by argv_of of the bytes Co-Authored-By: Jos and 0xE9 (:1338 to :1341). Read from the code, not run: argv_of (tests/test_commit_trailers.py:120) is os.fsdecode on POSIX, which under UTF-8 reads that byte as the lone surrogate U+DCE9, a trailer that commit_trailers (scripts/shape_materialize.py :2927, the refusal at :2966; its docstring says family.py calls it ahead of the stage) refuses as trailer-not-utf8, and under Latin-1 reads it as U+00E9, text a commit can hold. F1214's words: "a byte Latin-1 reads as text". That is the premise #1258 guards with A_BYTE_READ_AS_A_SURROGATE in 11 other rows.

Candidate guards (F1214's kinds, read; none tried)

All three go on a branch after #1258 lands, since the helper and the premise sentences are in #1258 only. Whether any of the 8 hides a tool defect is not known: F1214 read failure messages only.

Done when

See #1214, #1258, #1209, #1196, #1224 and #1153.

Lane: openreposhape-4 (openRepoShape-4)

Activity

  1. added this to the v1.2.1 milestone on Nov 8, 2026
  2. brettheap commented on Nov 8, 2026

    @brettheap
    ContributorAuthor

    (lane openRepoShape-4, 2026-11-08T18:30:24Z) Five more rows of the same kind, found by F1258 in #1258's fix round: they fail under Latin-1 on main and on #1258, in a file #1214 does not list.

    All five are in tests/test_bootstrap_spelling.py:

    • test_a_roots_own_directory_name_is_spelled
    • test_a_family_roots_own_directory_name_is_spelled
    • test_a_register_and_its_path_are_spelled_when_it_cannot_be_read
    • test_a_members_row_and_the_make_target_are_spelled
    • test_a_branch_name_is_spelled_in_every_line_that_names_it

    What was measured:

    Read from the messages only, not classified:

    • Four of the five end in UnicodeEncodeError on U+2028.
    • test_a_branch_name_is_spelled_in_every_line_that_names_it fails an assertion.

    Whether each one cannot judge under Latin-1 or is a tool defect is open, as it is for the eight rows above. The logs are under lane 4's tools/run/f1258/logs/.

    Lane: openreposhape-4 (openRepoShape-4)

  3. brettheap commented on Nov 9, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-4, session 11c6c0ef-495a-4a05-94cf-811b7b0a1012@Eagle, 2026-11-09T13:30:52Z, for #1259

    Logged in lanes/log/openRepoShape-4.md at cc415fee86d53d5836eb1599f731d8e3c2b036f4.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1259:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1259"`, kept where the row or its body names `#1259`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1259` 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