Skip to content

adopt-project.py _spelled writes a raw byte 0x80 to 0xA0 or 0xAD and the character U+0080 to U+00A0 or U+00AD the same way, as \xNN, so 34 pairs of different names read as one in a question or a finding, though its docstring says the spelling reads one way only #329

Closed

Description

@brettheap

Lane: openreposhape-3 (openRepoShape-3)

What happens. _spelled_character maps a surrogate in U+DC80 to U+DCFF (a raw byte Source.tree kept) to \xNN, and any other non-printable character below U+0100 through ascii(), which also gives \xNN. Measured on be2790e over bytes 0x80 to 0xFF, comparing _spelled(chr(0xDC00 + b)) with _spelled(chr(b)): 34 pairs are identical, for example _spelled("\udc85") and _spelled("\x85") both give `\x85`, and \udcad and \xad both give `\xad`. The 34 are the 32 C1 controls U+0080 to U+009F, U+00A0 and U+00AD. A printable byte such as 0xE9 is not affected (U+00E9 prints as itself).

Where. adopt-project.py:_spelled_character (:1045-1052); its docstring (_spelled, :1013) says the spelling is chosen "so that the spelling reads one way only".

Why it matters. A question or finding that says caf\x85 cannot say whether the plan's entry is the raw byte or the character. The plan's own path: already spells the raw byte as \udc85, not \x85, because in YAML \x85 is the character; so a reader who copies the spelled name into the plan gets the other entry. Direction (from #223): write a non-printable character below U+0100 as \u00NN and keep \xNN for raw bytes. That changes the \x85 expectations in the tests for check's findings and for plan's questions.

Source. PR #223, ## Left out, fourth bullet.

Activity

  1. brettheap commented on Oct 12, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b2cc9e59-4dc8-4f43-b01b-81cb99c8b07e@Eagle, 2026-10-12T10:59:40Z, for #329

    Logged in lanes/log/openRepoShape-3.md at 31fcb2cecce4114f898e0fa9a615a4ebbfa2ddb0.

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

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions