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

Closed
Andretuta wants to merge 2 commits from upstream-pr/130 into main
Andretuta commented 2026-11-24 02:24:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:24:22Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5464895003 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/130). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:24:22Z. --- > 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.
aslan2142 commented 2026-11-25 17:36:41 +00:00 (Migrated from github.com)

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


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7169750420 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/130#issuecomment-7169750420). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T17:36:41Z. --- 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

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!130
No description provided.