Docs link check stops hiding sections after inline code, /learn prune checks every learning, /retro counts Godot test runners (#4677)

Four small fixes from outside reports: the docs link and prose checks no
longer treat a line that starts with inline code as a code block, /learn
prune reads every learning instead of the first 100, /retro counts a
test runner in `tests/` and skips game-engine sidecar files, and five
tests that cannot work as root now skip there.

Why: each one was reproduced on main and gave a wrong answer (refused
valid links, skipped stale learnings, a test total of 0, red tests as
root).

Nothing to do after merge.

Co-authored-by: Davmunrey <108531295+Davmunrey@users.noreply.github.com>
Co-authored-by: huongtran84 <4927097+huongtran84@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-11-22 06:35:12 +00:00
1 parent 9cfbbb94fd
commit ef72e4142f
12 files changed
+118 -13

No files matched your search

+27
View File
@@ -175,6 +175,33 @@ describe('link check', () => {
} finally { fs.rmSync(path.join(repo, 'docs/a.md')); }
});
// Value: protects=fence detection follows CommonMark, so a line that opens with an inline code span (as
// docs/troubleshooting.md does) is text and only a bare run at least as long as the opening one closes a fence;
// fails_when=the span opens a fence, every later heading and <a id> vanishes and valid links to them are refused, or
// a shorter inner fence ends an example block early; why_new=no link test had a fence other than a plain pair; seam=none
test('a line opening with an inline code span is text, and only a bare fence as long as the opening one closes a block', () => {
put('docs/f.md', [
'````gstack-ship-receipt```` is a section of its own.',
'',
'## After the span',
'',
'````markdown',
'```mermaid',
'# Inside the example',
'``` ',
'```` trailing text',
'````',
'',
'[span](#after-the-span) [example](#inside-the-example) [after](#after-the-example)',
'',
'## After the example',
'',
].join('\n'));
try {
expect(brokenLinks(repo, ['docs/f.md']).map(b => b.target)).toEqual(['#inside-the-example']);
} finally { fs.rmSync(path.join(repo, 'docs/f.md')); }
});
test('added lines cover quoted and spaced names and untracked files, an undecodable anchor is broken, and an unknown base throws', () => {
const names = ['docs/café.md', 'docs/with space.md'];
try {