ci: also reject the Arabic letter mark U+061C #340

Merged
thepatrickworld merged 1 commit from upstream-pr/345 into main 2026-11-21 22:58:11 +00:00
thepatrickworld commented 2026-11-21 22:49:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-21T22:49:36Z.


Problem

tests/bidi_controls_check.py covers the embeddings and overrides U+202A..U+202E and the isolates U+2066..U+2069, but not U+061C (ARABIC LETTER MARK), which #254 lists alongside them and which reorders displayed text the same way.

A tracked source file carrying only U+061C passes the check today. Reproduced on main at 8069de2:

$ printf 'x = 1  # \u061c hidden\n' > probe_alm.py && git add probe_alm.py
$ python3 tests/bidi_controls_check.py
Self-test passed.
Checked 281 tracked source, script and build/CI files: no bidirectional controls.
$ echo $?
0

Change

  • add 0x061C to CONTROLS
  • add a self-test fixture carrying the code point, with its expected diagnostic
  • widen the assertion on the covered set
CONTROLS = frozenset([0x061C, *range(0x202A, 0x202F), *range(0x2066, 0x206A)])

Verification

On main at 8069de2 with this change applied:

$ python3 tests/bidi_controls_check.py
Self-test passed.
probe_alm.py:1: U+061C ARABIC LETTER MARK
$ echo $?
1

--self-test passes before and after the change. Nothing else is touched: same tracked file set, same suffixes, same diagnostic format.

Refs #254

AI-assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6535424804 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/345). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-21T22:49:36Z. --- ## Problem `tests/bidi_controls_check.py` covers the embeddings and overrides `U+202A..U+202E` and the isolates `U+2066..U+2069`, but not `U+061C` (ARABIC LETTER MARK), which #254 lists alongside them and which reorders displayed text the same way. A tracked source file carrying only `U+061C` passes the check today. Reproduced on `main` at `8069de2`: ```text $ printf 'x = 1 # \u061c hidden\n' > probe_alm.py && git add probe_alm.py $ python3 tests/bidi_controls_check.py Self-test passed. Checked 281 tracked source, script and build/CI files: no bidirectional controls. $ echo $? 0 ``` ## Change - add `0x061C` to `CONTROLS` - add a self-test fixture carrying the code point, with its expected diagnostic - widen the assertion on the covered set ```python CONTROLS = frozenset([0x061C, *range(0x202A, 0x202F), *range(0x2066, 0x206A)]) ``` ## Verification On `main` at `8069de2` with this change applied: ```text $ python3 tests/bidi_controls_check.py Self-test passed. probe_alm.py:1: U+061C ARABIC LETTER MARK $ echo $? 1 ``` `--self-test` passes before and after the change. Nothing else is touched: same tracked file set, same suffixes, same diagnostic format. Refs #254 _AI-assisted_
upstream-sync closed this pull request 2026-11-24 06:42:33 +00:00
R0Y00 commented 2026-11-24 06:48:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T22:57:52Z.


Approved scope. U+061C is a directional mark. This head adds it by name to the existing tracked-file scan, and the regression checks tools/mark.py:1: U+061C ARABIC LETTER MARK. The explicit code-point set also leaves visible ASCII escapes and ordinary Arabic text valid.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7070547781 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/345#issuecomment-7070547781). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T22:57:52Z. --- Approved scope. U+061C is a directional mark. This head adds it by name to the existing tracked-file scan, and the regression checks `tools/mark.py:1: U+061C ARABIC LETTER MARK`. The explicit code-point set also leaves visible ASCII escapes and ordinary Arabic text valid.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!340
No description provided.