tests: reject identical fenced blocks that are back to back in docs/ #130

Closed
github-bot wants to merge 2 commits from gh-pr/130/head into gh-pr/130/base
Owner

@⁠Andretuta on GitHub · 2026-11-24 02:24 UTC · original
ubiquitarianism:old-pr/9862 → main · +138 −0 · 1 files · 2 commits · closed without merging

Carried over from old PR 9862 by milas6669 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9862, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
milas6669: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Resubmission of #5394 (closed during repo transfer/purge at 22:47 UTC). Mergeable with current main with zero conflicts.

The guard test

Adds tests/test_docs_adjacent_fenced_blocks.py: fails when two identical fenced blocks appear back to back in any docs/*.md.

  • identical means the same info string and the same body.
  • fence parser tracks opening char and length, nested fences and tilde fences handled.
  • synthetic unit test cases cover positive hit and near-misses.

Tests run

python -I tests/test_docs_adjacent_fenced_blocks.py  -> Ran 3 tests, OK
git diff --check                                     -> clean

Independently verified by @TuroYT, @LuanBogoqb, @cipher-droid, @kapitche, with LGTM by @Kam471.

No GPU used, no game data. AI-assisted.

**@⁠Andretuta** on GitHub · 2026-11-24 02:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/130) `ubiquitarianism:old-pr/9862` → `main` · +138 −0 · 1 files · 2 commits · closed without merging > Carried over from **old PR 9862** by `milas6669` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9862`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `milas6669`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Resubmission of `#5394` (closed during repo transfer/purge at 22:47 UTC). Mergeable with current main with zero conflicts. ## The guard test Adds `tests/test_docs_adjacent_fenced_blocks.py`: fails when two identical fenced blocks appear back to back in any `docs/*.md`. - identical means the same info string and the same body. - fence parser tracks opening char and length, nested fences and tilde fences handled. - synthetic unit test cases cover positive hit and near-misses. ## Tests run ``` python -I tests/test_docs_adjacent_fenced_blocks.py -> Ran 3 tests, OK git diff --check -> clean ``` Independently verified by `@TuroYT`, `@LuanBogoqb`, `@cipher-droid`, `@kapitche`, with LGTM by `@Kam471`. No GPU used, no game data. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:45:37 +00:00
github-bot closed this pull request 2026-11-26 08:45:37 +00:00
Author
Owner

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

Closing in favour of #1791, which is now merged. It carries this docs lint forward with your original commits, so your work is in main. Thank you, @⁠Andretuta.

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

**@⁠aslan2142** on GitHub · 2026-11-25 17:36 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/130#issuecomment-7169750420) Closing in favour of #1791, which is now merged. It carries this docs lint forward with your original commits, so your work is in `main`. Thank you, @⁠Andretuta. AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.