exe_checklist: handle bare list markers, nested item continuations, and code fences (OLD-8385) #1280

Open
github-bot wants to merge 2 commits from github-bot/gh-1280 into main AGit
Owner

@⁠wetw0rks-c0ding on GitHub · 2026-11-24 21:14 UTC · original
wetw0rks-c0ding:feat/exe-checklist-list-items → main · +87 −4 · 2 files · 2 commits · open

Claimed in the coordination issue as: OLD-8385

What and why

tools/exe_checklist.py truncated notes at bare list markers, treated nested list items as sibling delimiters, and let + or numbered markers inside fenced code blocks create false notes. Bare markers are now matched only at end-of-line, nested items are kept as continuations using their base indentation, and fenced code blocks are skipped.

Tested

  • python3 -I tests/test_exe_checklist.py -> 16 tests OK
  • python -I scripts/check_no_game_data.py tools/exe_checklist.py tests/test_exe_checklist.py -> clean
  • Environment: Linux (CachyOS), CPU-only tests, no GPU required

AI-assisted: Yes. This work was done with OpenCode agents.

**@⁠wetw0rks-c0ding** on GitHub · 2026-11-24 21:14 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1280) `wetw0rks-c0ding:feat/exe-checklist-list-items` → `main` · +87 −4 · 2 files · 2 commits · open Claimed in the coordination issue as: OLD-8385 ### What and why `tools/exe_checklist.py` truncated notes at bare list markers, treated nested list items as sibling delimiters, and let `+` or numbered markers inside fenced code blocks create false notes. Bare markers are now matched only at end-of-line, nested items are kept as continuations using their base indentation, and fenced code blocks are skipped. ### Tested - `python3 -I tests/test_exe_checklist.py` -> 16 tests OK - `python -I scripts/check_no_game_data.py tools/exe_checklist.py tests/test_exe_checklist.py` -> clean - Environment: Linux (CachyOS), CPU-only tests, no GPU required AI-assisted: Yes. This work was done with OpenCode agents.
In tools/exe_checklist.py:doc_notes(), LIST_ITEM defines regex
^(?:[-*+]|\d+[.)])\s+ for list items. However, the continuation loop
that collects multi-line notes only checked startswith(("- ", "* ", "#", "|")).

When a document used ordered numbered lists (e.g. '1. ', '2. ', '3) ')
or '+ ' list items, the loop failed to stop at subsequent items,
concatenating them into the prior note text and leaving leading item
numbers in the note text.

Align the continuation termination check to not LIST_ITEM.match(lines[end].lstrip())
and strip prefixes using LIST_ITEM.sub("", ...).

Cover with unit tests in tests/test_exe_checklist.py.
No game files. AI-assisted (Gemini).
Address reviewer feedback from @tupacfan04:
1. Allow bare empty markers at end-of-line by matching (?:\s+|$) in LIST_ITEM.
2. Track list item base indentation so nested sub-items (e.g. '  + ...' or '  1. ...') under a note are retained as continuations rather than falsely treated as sibling delimiters.
3. Skip fenced code blocks (`) so code containing '+' or numbered markers does not truncate notes or trigger false notes.
4. Add synthetic unit tests for bare markers, nested items, prose continuations, and code fences.

No game data. AI-assisted (Gemini).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:45:42 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 14:49 UTC · original

Reviewed d5ed9725: ran tests/test_exe_checklist.py on the PR tree (16/16) and on main with the PR's test file: the two new tests fail there, as the fixes expect (bare markers truncate items, fenced fake notes no longer count, nested items stay continuations). Both tool versions over the repo's docs: all 7 existing notes identical and every fence count even, so no on-repo change. Two reproduced edges, not on repo docs and not blocking: a marked nested sub-item's text is also glued into the parent note's checklist entry, and an unclosed ``` fence silently skips every later note in that file (main still listed them) -- worth deciding whether wanted. Fixtures synthetic, no game data. AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 14:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1280#issuecomment-7165867260) Reviewed d5ed9725: ran tests/test_exe_checklist.py on the PR tree (16/16) and on main with the PR's test file: the two new tests fail there, as the fixes expect (bare markers truncate items, fenced fake notes no longer count, nested items stay continuations). Both tool versions over the repo's docs: all 7 existing notes identical and every fence count even, so no on-repo change. Two reproduced edges, not on repo docs and not blocking: a marked nested sub-item's text is also glued into the parent note's checklist entry, and an unclosed ``` fence silently skips every later note in that file (main still listed them) -- worth deciding whether wanted. Fixtures synthetic, no game data. AI-assisted review. **Recommendation:** Merge
Author
Owner

@⁠wavehs on GitHub · 2026-11-26 18:48 UTC · original

Related to #703 (abnalstlll-byte, 2026-11-24 12:24, ~8h50m earlier): same exe_checklist.doc_notes fix, same two files, different completeness.

  • #703 adds closed_code_fences(), which recognises ~~~ as well as ``` and only skips closed fences (an unclosed fence does not hide every later note), and has tests for nested list markers and tilde fences.
  • This PR toggles on stripped.startswith("```") only, so ~~~ fences are not skipped and an unclosed fence hides the rest of the document; its extra tests are correspondingly fewer.

Both changes are otherwise the same idea (marker/continuation parsing). #703 is the more complete implementation and has the larger regression set, so I would land that one and close this; if this one is preferred, it needs the ~~~/unclosed-fence handling and those two tests.

AI-assisted (review only).

**@⁠wavehs** on GitHub · 2026-11-26 18:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1280#issuecomment-7200868984) Related to **#703** (abnalstlll-byte, 2026-11-24 12:24, ~8h50m earlier): same `exe_checklist.doc_notes` fix, same two files, different completeness. - #703 adds `closed_code_fences()`, which recognises `~~~` as well as ``` and only skips **closed** fences (an unclosed fence does not hide every later note), and has tests for nested list markers and tilde fences. - This PR toggles on `stripped.startswith("```")` only, so `~~~` fences are not skipped and an unclosed fence hides the rest of the document; its extra tests are correspondingly fewer. Both changes are otherwise the same idea (marker/continuation parsing). #703 is the more complete implementation and has the larger regression set, so I would land that one and close this; if this one is preferred, it needs the `~~~`/unclosed-fence handling and those two tests. AI-assisted (review only).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1280/head:github-bot/gh-1280'
git switch 'github-bot/gh-1280'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1280'
git switch 'github-bot/gh-1280'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1280'
git switch 'github-bot/gh-1280'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1280'
git switch 'main'
git merge --squash 'github-bot/gh-1280'
git switch 'main'
git merge --ff-only 'github-bot/gh-1280'
git switch 'main'
git merge 'github-bot/gh-1280'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.