docs links and text encoding: the two red checks of main's check job #2610

Closed
MoonEyes wants to merge 1 commit from upstream-pr/2610 into main
MoonEyes commented 2026-11-29 12:45:18 +00:00 (Migrated from github.com)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5550833015 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2610). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T12:45:18Z. --- test_docs_links: README.md keeps <a id="project-status"> above "Where it stands" so the old links still land, but the checker only knew heading anchors. It now also reads explicit <a id/name> anchors (new test: test_explicit_html_anchor_is_an_anchor, red without the change). The Arabic quickstart's link to README#running-the-loader-on-linux, a section the README rewrite (a9e247cd6) moved out, now points at docs/linux.md. test_text_encoding: scripts/windows-boot/test_crash_monitor.py:37 and :90 read stack.txt and the sentinel without encoding=; both are UTF-8 (the sentinel is written as b"original"). Tested on the current main (8fb974878): test_docs_links.py and test_text_encoding.py 21 passed (2 failed before). The crash monitor test itself runs on Windows only and was not run here. Claude-Session: https://claude.ai/code/session_01DDMsHtPdJ5kt8t7A5i2fzu Claimed in the coordination issue as: <!-- the item ID from the open "Coordinating who works on what" issue, for example TEST-17, or a link to your claim --> Depends on: <!-- #N for every pull request this one builds on or conflicts with (see AGENTS.md; the coordination issue lists the open pull requests); delete the line if it builds on none and conflicts with none --> Fixes: <!-- #N for each issue this closes (GitHub closes it on merge); delete the line if it closes none --> ### What and why <!-- What this changes and the problem it solves. --> ### Tested <!-- What you ran and on which GPU and driver (CONTRIBUTING.md). For the shader translator: how many shaders translate and pass spirv-val, before and after. --> GPUs tested: <!-- vendor, model, driver and OS of each GPU the GPU tests ran on, or n/a --> AI-assisted: <!-- yes or no (AGENTS.md asks a coding agent to say so) --> ### Checklist - [ ] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [ ] One topic; follow-up work goes in a new pull request. - [ ] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
Tauwni commented 2026-11-29 12:58:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-29T12:58:20Z.


Verdict: READY for the test_text_encoding half. The docs_links half is no longer needed on current main. Overlap below.

Windows 10 Pro 22H2 19045.7846, CPython 3.14.6, through scripts/run_standalone_tests.py. Head d00de531b merged (no commit) into current main 3535eb5c4, merges cleanly. MEASURED, 3 runs each:

test main 3535eb5c4 main + this PR
tests/test_docs_links.py passes 3/3 passes 3/3
tests/test_text_encoding.py fails 3/3 passes 3/3
  • test_docs_links is already green on main since #2593 landed: it restores the README link targets. So that part of this PR no longer turns anything green. It still adds explicit <a id> anchor support and its new test, which is fine on its own. On the older main b6bf3aa0b, both tests were red and both turn green with this PR. MEASURED, 3 runs.
  • test_text_encoding is the still-red half: scripts/windows-boot/test_crash_monitor.py:37,90, read_text() without encoding=. READ IN CODE. The same item was claimed in the coordination issue as CI-CRASH-MONITOR-ENCODING, with a branch ready (claim). One of the two should land, not both.

Not checked by a second agent or human yet. AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256194518 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2610#issuecomment-7256194518). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-29T12:58:20Z. --- **Verdict: READY for the `test_text_encoding` half. The `docs_links` half is no longer needed on current `main`.** Overlap below. Windows 10 Pro 22H2 19045.7846, CPython 3.14.6, through `scripts/run_standalone_tests.py`. Head `d00de531b` merged (no commit) into current `main` `3535eb5c4`, merges cleanly. MEASURED, 3 runs each: | test | `main` `3535eb5c4` | `main` + this PR | |---|---|---| | `tests/test_docs_links.py` | passes 3/3 | passes 3/3 | | `tests/test_text_encoding.py` | fails 3/3 | passes 3/3 | - `test_docs_links` is already green on `main` since #2593 landed: it restores the README link targets. So that part of this PR no longer turns anything green. It still adds explicit `<a id>` anchor support and its new test, which is fine on its own. On the older `main` `b6bf3aa0b`, both tests were red and both turn green with this PR. MEASURED, 3 runs. - `test_text_encoding` is the still-red half: `scripts/windows-boot/test_crash_monitor.py:37,90`, `read_text()` without `encoding=`. READ IN CODE. The same item was claimed in the coordination issue as CI-CRASH-MONITOR-ENCODING, with a branch ready ([claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7250448601)). One of the two should land, not both. Not checked by a second agent or human yet. AI-assisted: yes (Claude Code).
merzleckeier commented 2026-11-29 13:14:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T13:14:03Z.


Independent Linux check on 3535eb5c4 + d00de531b with the project’s standalone runner (CPython 3.14.10). test_text_encoding fails on main at the two unpinned reads and passes with this PR. test_docs_links passes on both.

The new anchor regex can also make a genuinely broken link pass. Put <a data-id="fake"></a> in page.md and [link](page.md#fake) in another page. The patched checker accepts the fragment even though there is no id or name attribute. The same false acceptance happens for an anchor-looking example in an inline code span, in an HTML comment, or inside a quoted attribute value. Fenced examples were excluded correctly. I compared 10 synthetic cases with CommonMark-rendered HTML and found five false acceptances and two missed valid links.

I tried HTMLParser with exact id/name attributes after masking inline code and escaped opening brackets. That resolved the HTML extraction cases. The remaining encoded-fragment case also needed the existing same-page unquote() applied to cross-page fragments. With those changes, all 10 cases matched the renderer and both project checks passed locally. This supports landing the text-encoding fix independently of the anchor work. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256386291 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2610#issuecomment-7256386291). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T13:14:03Z. --- Independent Linux check on `3535eb5c4` + `d00de531b` with the project’s standalone runner (CPython 3.14.10). `test_text_encoding` fails on main at the two unpinned reads and passes with this PR. `test_docs_links` passes on both. The new anchor regex can also make a genuinely broken link pass. Put `<a data-id="fake"></a>` in `page.md` and `[link](page.md#fake)` in another page. The patched checker accepts the fragment even though there is no `id` or `name` attribute. The same false acceptance happens for an anchor-looking example in an inline code span, in an HTML comment, or inside a quoted attribute value. Fenced examples were excluded correctly. I compared 10 synthetic cases with CommonMark-rendered HTML and found five false acceptances and two missed valid links. I tried `HTMLParser` with exact `id`/`name` attributes after masking inline code and escaped opening brackets. That resolved the HTML extraction cases. The remaining encoded-fragment case also needed the existing same-page `unquote()` applied to cross-page fragments. With those changes, all 10 cases matched the renderer and both project checks passed locally. This supports landing the text-encoding fix independently of the anchor work. AI-assisted with OpenAI Codex.
mabue777 commented 2026-11-29 13:51:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by mabue777 on 2026-11-29T13:51:42Z.


VERIFY-2610, independent run (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7256838394).

Machine: Windows 11 Home (build 26200), Python 3.12.10. GPUs tested: n/a (no GPU tests in scope). AI-assisted: yes.

On main (7b907de52):

  • python -I tests/test_docs_links.py: 18 tests, FAILED (failures=1) — the README’s explicit <a id="project-status"> anchor is not counted.
  • python -I tests/test_text_encoding.py: 2 tests, FAILED (failures=1).

On this head (d00de531b):

  • tests/test_docs_links.py: 19 tests, OK — includes the new explicit-anchor test.
  • tests/test_text_encoding.py: 2 tests, OK.

scripts/windows-boot/test_crash_monitor.py was not run here either: it drives the CTest-built monitor and fixture binaries, and this machine has no MSVC/cmake. The change in that file is the encoding= fix that test_text_encoding.py checks.

Hygiene: git diff --check main...HEAD clean; check_no_game_data.py clean on all three changed files. Diff read: the changes match the description — the Arabic quickstart now links docs/linux.md, the checker counts explicit <a id/name> anchors, and the crash monitor reads its UTF-8 artifacts with explicit encoding.

Verifies as claimed on Windows.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256856784 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2610#issuecomment-7256856784). Originally posted by [mabue777](https://github.com/mabue777) on 2026-11-29T13:51:42Z. --- VERIFY-2610, independent run (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7256838394). Machine: Windows 11 Home (build 26200), Python 3.12.10. GPUs tested: n/a (no GPU tests in scope). AI-assisted: yes. **On `main` (`7b907de52`):** - `python -I tests/test_docs_links.py`: 18 tests, **FAILED (failures=1)** — the README’s explicit `<a id="project-status">` anchor is not counted. - `python -I tests/test_text_encoding.py`: 2 tests, **FAILED (failures=1)**. **On this head (`d00de531b`):** - `tests/test_docs_links.py`: 19 tests, **OK** — includes the new explicit-anchor test. - `tests/test_text_encoding.py`: 2 tests, **OK**. `scripts/windows-boot/test_crash_monitor.py` was not run here either: it drives the CTest-built monitor and fixture binaries, and this machine has no MSVC/cmake. The change in that file is the `encoding=` fix that `test_text_encoding.py` checks. Hygiene: `git diff --check main...HEAD` clean; `check_no_game_data.py` clean on all three changed files. Diff read: the changes match the description — the Arabic quickstart now links `docs/linux.md`, the checker counts explicit `<a id/name>` anchors, and the crash monitor reads its UTF-8 artifacts with explicit encoding. Verifies as claimed on Windows.
fiestorra commented 2026-11-29 17:18:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:18:58Z.


Heads-up on duplication, because two open pull requests change the same two lines of the same file.

This one sets read_text(encoding="utf-8") in scripts/windows-boot/test_crash_monitor.py. #2616 does the same, with one difference:

2610:  (self.report / "stack.txt").read_text(encoding="utf-8")
2616:  (self.report / "stack.txt").read_text(encoding="utf-8", errors="replace")

Both clear the same assertion (test_every_text_file_call_pins_its_encoding), which is the one keeping check, stdlib-tests-linux and macos-python red on
main; whichever lands first makes the other's hunk a textual conflict on the same lines.

Since this pull request also carries the docs-links part (docs/i18n/ar/quickstart.md, tests/test_docs_links.py), the clean split is: this one takes the
docs-links fix and drops its test_crash_monitor.py hunk
, leaving the encoding to #2616 - whose errors="replace" also covers a stack file whose module names
were decoded through the code page, which is the case the test is about.

Not a claim on either: I verified #2616's head passes tests/test_text_encoding.py and left the decision to whoever owns the two branches.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7259593672 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2610#issuecomment-7259593672). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-29T17:18:58Z. --- Heads-up on duplication, because two open pull requests change the same two lines of the same file. This one sets `read_text(encoding="utf-8")` in `scripts/windows-boot/test_crash_monitor.py`. **#2616** does the same, with one difference: ```diff 2610: (self.report / "stack.txt").read_text(encoding="utf-8") 2616: (self.report / "stack.txt").read_text(encoding="utf-8", errors="replace") ``` Both clear the same assertion (`test_every_text_file_call_pins_its_encoding`), which is the one keeping `check`, `stdlib-tests-linux` and `macos-python` red on `main`; whichever lands first makes the other's hunk a textual conflict on the same lines. Since this pull request also carries the docs-links part (`docs/i18n/ar/quickstart.md`, `tests/test_docs_links.py`), the clean split is: **this one takes the docs-links fix and drops its `test_crash_monitor.py` hunk**, leaving the encoding to #2616 - whose `errors="replace"` also covers a stack file whose module names were decoded through the code page, which is the case the test is about. Not a claim on either: I verified #2616's head passes `tests/test_text_encoding.py` and left the decision to whoever owns the two branches. Written with an AI assistant.
aegish-zagi commented 2026-11-29 20:25:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aegish-zagi on 2026-11-29T20:25:25Z.


VERIFY-2610 (independent verification, aegish-zagi)

  • PR: #2610 | head d00de531b | merge state vs main: DOES NOT MERGE CLEANLY onto current main c2a726196 — content conflict in scripts/windows-boot/test_crash_monitor.py
  • What happened: main has already landed a stronger version of the same line — read_text(encoding="utf-8", errors="replace") — while this PR pins only encoding="utf-8". python3 -I tests/test_text_encoding.py passes on plain current main, so the crash-monitor half of this PR is superseded.
  • Tests run on the PR head alone: tests/test_docs_links.py 19 tests OK; tests/test_text_encoding.py 2 tests OK. On plain main both also pass.
  • Remaining value: the docs/i18n/ar/quickstart.md link fix and the test_docs_links.py additions are not in main; they pass on the PR head.
  • Platform: Linux, Python 3.12.3, no GPU (Profile Z)
  • AI-assisted: yes

Verdict: needs rebase — drop the test_crash_monitor.py hunk (already fixed on main, in a stronger form) and keep the docs-link parts.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7262067979 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2610#issuecomment-7262067979). Originally posted by [aegish-zagi](https://github.com/aegish-zagi) on 2026-11-29T20:25:25Z. --- VERIFY-2610 (independent verification, aegish-zagi) - PR: #2610 | head `d00de531b` | merge state vs main: DOES NOT MERGE CLEANLY onto current `main` `c2a726196` — content conflict in `scripts/windows-boot/test_crash_monitor.py` - What happened: `main` has already landed a stronger version of the same line — `read_text(encoding="utf-8", errors="replace")` — while this PR pins only `encoding="utf-8"`. `python3 -I tests/test_text_encoding.py` passes on plain current `main`, so the crash-monitor half of this PR is superseded. - Tests run on the PR head alone: `tests/test_docs_links.py` 19 tests OK; `tests/test_text_encoding.py` 2 tests OK. On plain `main` both also pass. - Remaining value: the `docs/i18n/ar/quickstart.md` link fix and the `test_docs_links.py` additions are not in `main`; they pass on the PR head. - Platform: Linux, Python 3.12.3, no GPU (Profile Z) - AI-assisted: yes Verdict: needs rebase — drop the `test_crash_monitor.py` hunk (already fixed on `main`, in a stronger form) and keep the docs-link parts.
fiestorra commented 2026-11-30 05:41:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T05:41:22Z.


Status on this machine: it does not apply, and unlike the pull requests where only the replay failed, here merge-tree fails too - GitHub could not merge this as it stands.

git merge-tree --write-tree origin/main refs/pull/2610/head
  Auto-merging docs/i18n/ar/quickstart.md
  Auto-merging scripts/windows-boot/test_crash_monitor.py
  CONFLICT (content): Merge conflict in scripts/windows-boot/test_crash_monitor.py

Cherry-picking d00de531b stops on the same file, so I could not run tests/test_docs_links.py against it.

What is worth saying about the change itself: the commit is "the two red checks of main's check job", and it touches three files - the Arabic quickstart, tests/test_docs_links.py, and scripts/windows-boot/test_crash_monitor.py. That last one is a script with a test_ prefix, not a test, and main has since moved under it: the file is the one that collided, so whatever fix it carried has almost certainly landed elsewhere in the meantime.

What a rebase would do: it would tell us in one minute whether the fix is still needed at all. If main's check job is green today for those two checks, this pull request is obsolete rather than conflicted, and closing it is cleaner than resolving it. I could not check that from here - it needs the CI run on current main, which takes the workflow, not this machine.

What I did not do: resolve the conflict. A conflicting script whose fix may already exist elsewhere is exactly the case where a stranger's resolution would look right and be wrong.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7269908780 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2610#issuecomment-7269908780). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T05:41:22Z. --- Status on this machine: **it does not apply, and unlike the pull requests where only the replay failed, here `merge-tree` fails too** - GitHub could not merge this as it stands. ``` git merge-tree --write-tree origin/main refs/pull/2610/head Auto-merging docs/i18n/ar/quickstart.md Auto-merging scripts/windows-boot/test_crash_monitor.py CONFLICT (content): Merge conflict in scripts/windows-boot/test_crash_monitor.py ``` Cherry-picking `d00de531b` stops on the same file, so I could not run `tests/test_docs_links.py` against it. **What is worth saying about the change itself:** the commit is "the two red checks of main's `check` job", and it touches three files - the Arabic quickstart, `tests/test_docs_links.py`, and **`scripts/windows-boot/test_crash_monitor.py`**. That last one is a **script with a `test_` prefix**, not a test, and `main` has since moved under it: the file is the one that collided, so whatever fix it carried has almost certainly landed elsewhere in the meantime. **What a rebase would do:** it would tell us in one minute whether the fix is still needed at all. If `main`'s `check` job is green today for those two checks, this pull request is **obsolete rather than conflicted**, and closing it is cleaner than resolving it. I could not check that from here - it needs the CI run on current `main`, which takes the workflow, not this machine. **What I did not do:** resolve the conflict. A conflicting **script** whose fix may already exist elsewhere is exactly the case where a stranger's resolution would look right and be wrong. Written with an AI assistant.
MoonEyes commented 2026-11-30 12:07:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T12:07:16Z.


Closing my own pull request: on main ec1d85846 the link in docs/i18n/ar/quickstart.md is right and scripts/windows-boot/test_crash_monitor.py pins its encoding. What is left is an anchor case in tests/test_docs_links.py that no page needs (check is green on main).

AI-assisted (Claude Code). Closed at the owner's request (MoonEyes).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7277977071 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2610#issuecomment-7277977071). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T12:07:16Z. --- Closing my own pull request: on `main` `ec1d85846` the link in `docs/i18n/ar/quickstart.md` is right and `scripts/windows-boot/test_crash_monitor.py` pins its encoding. What is left is an anchor case in `tests/test_docs_links.py` that no page needs (`check` is green on `main`). AI-assisted (Claude Code). Closed at the owner's request (MoonEyes).

Pull request closed

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
ProjectLeonida/mandy!2610
No description provided.