docs: clean Doxygen warning log (0 warnings) + flag honest gaps to reviewer

Doxygen now builds with **0 warnings** (was 27).

Root cause: `[label](doc/api/tests.md)`-style relative markdown links in
README.md and CLAUDE.md were being interpreted by Doxygen as \ref
commands and failed to resolve (Doxygen indexes .md files by basename,
not by repo-relative path).

Fix: add a per-file `FILTER_PATTERNS` to Doxyfile that rewrites
`[label](path/to/file.md)` into `<a href="path/to/file.md">label</a>`
just for Doxygen.  HTML anchors bypass \ref resolution entirely; the
generated Doxygen HTML still hyperlinks correctly.  The on-disk
markdown is untouched, so GitHub rendering is unaffected.

New file: scripts/doxygen-md-filter.sh (24 lines, documented).

Also: append a "Known limitations (state at the time of the reviewer
meeting)" table to doc/architecture/locked-vs-flexible.md so the
external reviewer sees the 7 deliberate gaps (output_uv_map covers
3 of 5 entries; pipe-only chaining; Phase 9b-analytic derived but not
implemented; Doxygen WARN_IF_UNDOCUMENTED policy; CI test-count gate;
research-track utilities) with effort estimates next to each.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Tarik Moussa
2026-05-23 23:19:37 +02:00
parent 0b1bf07232
commit ba5c9303a3
3 changed files with 57 additions and 0 deletions

28
scripts/doxygen-md-filter.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/sh
# scripts/doxygen-md-filter.sh
#
# Doxygen FILTER for *.md files. Rewrites repository-relative markdown links
# (e.g. `[label](doc/api/tests.md)` or `[label](architecture/foo.md)`) into
# basename-only form (`[label](tests.md)`, `[label](foo.md)`).
#
# Why: GitHub's markdown renderer needs the full relative path to resolve a
# link, but Doxygen indexes every .md file in INPUT by basename and treats
# any "/" in a link target as an unresolvable \ref. Without this filter we
# get ~27 spurious warnings from README.md and CLAUDE.md.
#
# The filter is purely a Doxygen-side concern; the on-disk markdown is
# untouched, so GitHub rendering keeps working.
#
# Precondition: no two .md files in the project share a basename. Verified
# at the time of writing by:
# find . -name "*.md" -not -path "*/build*/*" -not -path "*/code/deps/*" \
# -not -path "*/.git/*" | xargs -n1 basename | sort | uniq -c | awk '$1>1'
# (empty output ⇒ no collisions).
#
# Usage: configured via Doxyfile FILTER_PATTERNS = *.md=scripts/doxygen-md-filter.sh
set -eu
# Convert any markdown link target that points at a .md file into an HTML
# anchor. Doxygen renders HTML verbatim and skips its (broken) \ref
# resolution; the rendered Doxygen HTML still hyperlinks to the source .md.
# Pattern: [label](path/to/file.md) → <a href="path/to/file.md">label</a>
sed -E 's#\[([^]]+)\]\(([a-zA-Z0-9_./-]+\.md)\)#<a href="\2">\1</a>#g' "$1"