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

Merged
Ch1mpleo merged 2 commits from upstream-pr/1791 into main 2026-11-25 17:30:39 +00:00
Ch1mpleo commented 2026-11-25 12:13:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Ch1mpleo on 2026-11-25T12:13:20Z.


Claimed in the coordination issue as: OLD-9862 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162072809)

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)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5491099205 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1791). Originally posted by [Ch1mpleo](https://github.com/Ch1mpleo) on 2026-11-25T12:13:20Z. --- Claimed in the coordination issue as: OLD-9862 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162072809) ### 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)
madvillain91 commented 2026-11-25 13:03:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by madvillain91 on 2026-11-25T13:03:22Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6058108038 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1791#pullrequestreview-6058108038). Originally posted by [madvillain91](https://github.com/madvillain91) on 2026-11-25T13:03:22Z. **Review:** COMMENTED --- 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.
aslan2142 commented 2026-11-25 17:30:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T17:30:42Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7169607617 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1791#issuecomment-7169607617). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T17:30:42Z. --- 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).
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!1791
No description provided.