mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 16:39:22 +08:00
test_internal_docs_links_point_to_existing_pages looked for `/docs/` in the URL. The reorganized site emits site-absolute paths (`/learning-workspace/chat/`, `/gifs/x.gif`), so the pattern matched zero links and the test passed on its own emptiness — the same failure mode as the DOCS_ROOT bug fixed earlier in this branch. Resolve each site-absolute link against the page tree, the zh-cn mirror, and docs/public instead. 804 links across the site resolve, and planting a broken page link or a broken asset reference fails it. `check_docs.py dist` still validates the built HTML; this runs in milliseconds before a build. Keeping both is the point: a fast failure during editing, and an authoritative one after it. Also rename the `fenced` variable in the command scan to `source`: it scans the whole page, which the comment above the pattern already explains.