[PR #130] [CLOSED] tests: reject identical fenced blocks that are back to back in docs/ #182

Closed
opened 2026-11-26 20:17:03 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/130
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: old-pr/9862


📝 Commits (2)

  • a23ddf8 docs: drop the repeated manifest block in character_models, and test for it
  • d8be7a1 tests: compare the fence's info string too, so two languages are not one duplicate

📊 Changes

1 file changed (+138 additions, -0 deletions)

View changed files

➕ tests/test_docs_adjacent_fenced_blocks.py (+138 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/130 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `old-pr/9862` --- ### 📝 Commits (2) - [`a23ddf8`](https://github.com/ubiquitarianism/leonida/commit/a23ddf81161fa399d392c1b98782111cff6ad9a0) docs: drop the repeated manifest block in character_models, and test for it - [`d8be7a1`](https://github.com/ubiquitarianism/leonida/commit/d8be7a110f7f27584e4ee13110815558c19770f0) tests: compare the fence's info string too, so two languages are not one duplicate ### 📊 Changes **1 file changed** (+138 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tests/test_docs_adjacent_fenced_blocks.py` (+138 -0) </details> ### 📄 Description > 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:03 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#182
No description provided.