tests: reject identical fenced blocks that are back to back in docs/ (OLD-9862) #1791

Manually merged
github merged 2 commits from gh-pr/1791/head into gh-pr/1791/base 2026-11-26 10:05:28 +00:00
Owner

@⁠Ch1mpleo on GitHub · 2026-11-25 12:13 UTC · original
Ch1mpleo:carry/old-9862 → main · +138 −0 · 1 files · 2 commits · merged 2026-11-25 17:30 UTC

Claimed in the coordination issue as: OLD-9862 (#1608)

What and why

Carries forward old-pr/9862 (draft #130, preserving the original commits by zwork and Salim Hammami) rebased onto current main. Adds ests/test_docs_adjacent_fenced_blocks.py to reject identical back-to-back fenced code blocks with the same info string in docs/.

Tested

  • python -I tests/test_docs_adjacent_fenced_blocks.py — 3 tests, OK (Windows 11 x64, Python 3.14.7).
  • python -m compileall -q tests/test_docs_adjacent_fenced_blocks.py — exit 0.
  • python -I scripts/check_no_game_data.py tests/test_docs_adjacent_fenced_blocks.py — exit 0.

GPUs tested: n/a (CPU-only standard-library unit test)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled
    eeds 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. (n/a — unit test only)
**@⁠Ch1mpleo** on GitHub · 2026-11-25 12:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1791) `Ch1mpleo:carry/old-9862` → `main` · +138 −0 · 1 files · 2 commits · merged 2026-11-25 17:30 UTC Claimed in the coordination issue as: OLD-9862 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why Carries forward old-pr/9862 (draft #130, preserving the original commits by zwork and Salim Hammami) rebased onto current main. Adds ests/test_docs_adjacent_fenced_blocks.py to reject identical back-to-back fenced code blocks with the same info string in docs/. ### Tested - python -I tests/test_docs_adjacent_fenced_blocks.py — 3 tests, OK (Windows 11 x64, Python 3.14.7). - python -m compileall -q tests/test_docs_adjacent_fenced_blocks.py — exit 0. - python -I scripts/check_no_game_data.py tests/test_docs_adjacent_fenced_blocks.py — exit 0. GPUs tested: n/a (CPU-only standard-library unit test) AI-assisted: yes ### Checklist - [x] Based on current main and merges cleanly (a conflicting pull request is labeled eeds rebase). - [x] One topic; follow-up work goes in a new pull request. - [x] 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. (n/a — unit test only)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:05:25 +00:00
github manually merged commit 34739cff3e into gh-pr/1791/base 2026-11-26 10:05:28 +00:00
Author
Owner

@⁠madvillain91 on GitHub · 2026-11-25 13:03 UTC · original · reviewed

Independent Windows 11 26H2 (26300.9711) check at 34739cff3 against main 98c2f7777 (PR base 0d80bc5df), using CPython 3.12.3 (python -I) and Git for Windows 2.56.0.windows.2. Passed test_docs_adjacent_fenced_blocks.py (3/3 in 0.025s), test_ci_registration.py (16/16 in 5.330s, confirming automatic selection in CI including docs-only PRs), and test_text_write_line_endings.py (3/3 in 9.333s), with check_no_game_data.py and compileall clean. Fence matching (backtick/tilde lengths, info-string comparison, prose separation, empty blocks) and top-level docs/*.md scanning all behave as documented. LGTM.

**@⁠madvillain91** on GitHub · 2026-11-25 13:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1791#pullrequestreview-6058108038) · **reviewed** Independent Windows 11 26H2 (26300.9711) check at 34739cff3 against main 98c2f7777 (PR base 0d80bc5df), using CPython 3.12.3 (python -I) and Git for Windows 2.56.0.windows.2. Passed test_docs_adjacent_fenced_blocks.py (3/3 in 0.025s), test_ci_registration.py (16/16 in 5.330s, confirming automatic selection in CI including docs-only PRs), and test_text_write_line_endings.py (3/3 in 9.333s), with check_no_game_data.py and compileall clean. Fence matching (backtick/tilde lengths, info-string comparison, prose separation, empty blocks) and top-level docs/*.md scanning all behave as documented. LGTM.
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 17:30 UTC · original

Merged. Thank you, @⁠Ch1mpleo. This carries draft #130's docs lint with its original commits, so #130 is closed in favour of this.

  • The lint's self-tests with hand-written examples cover the detector, and the current docs pass it; the docs, line-ending and CI/ctest registration checks pass, and so does the game-data check.
  • Checked on main b0e11f234 + 34739cff3: the semantic suite passes (490 files, 6,292 tests, 0 files failed); test_docs_adjacent_fenced_blocks pass; the 15 docs and writer tests pass; check_no_game_data.py is clean on the 1 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 17:30 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1791#issuecomment-7169607617) Merged. Thank you, @⁠Ch1mpleo. This carries draft #130's docs lint with its original commits, so #130 is closed in favour of this. - The lint's self-tests with hand-written examples cover the detector, and the current docs pass it; the docs, line-ending and CI/ctest registration checks pass, and so does the game-data check. - **Checked on `main` `b0e11f234` + `34739cff3`:** the semantic suite passes (490 files, 6,292 tests, 0 files failed); `test_docs_adjacent_fenced_blocks` pass; the 15 docs and writer tests pass; `check_no_game_data.py` is clean on the 1 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.