fix(docs): repair links to /human-in-the-loop and catch url-override mismatches in check-docs#69
Conversation
Three pages linked to ../tools/human-in-the-loop (filesystem path), but tools/human-in-the-loop.md has a `url: /human-in-the-loop` frontmatter override and serves at /docs/human-in-the-loop. The links 404 in production.
The previous link checker resolved relative and site-absolute markdown links against the filesystem path of each file. Pages with a `url:` frontmatter override (e.g. tools/human-in-the-loop.md → /human-in-the-loop) served at a different URL than they live at on disk, so links to or from those pages could pass this check while 404'ing in production. Resolve each link against the rendered URL of the source page, and validate the target against the set of rendered URLs (and their ancestor directories, for sidebar-group links). Running this against main before the previous commit reproduces the three failures it was meant to catch.
|
@Joshuafolorunsho is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
|
@AndrewBarba , could you please help review this PR when you can. It's still broken in production. |
|
Thanks @Joshuafolorunsho — I reviewed the diff and the code changes look good. Before we can run the required CI and merge this, please rewrite the two authored
A DCO remediation commit alone will not satisfy this repository’s verified-signature policy. Suggested steps: git fetch upstream main
git rebase -i upstream/mainMark both git commit --amend --no-edit -S -s
git rebase --continueThen update the PR branch: git push --force-with-lease origin fix/docs-human-in-the-loop-linksIf your remotes use different names, adjust Once you force-push the corrected commits, I’ll review the new SHAs and approve the fork CI run. The Vercel authorization failure can be ignored for now. |
|
moved here and adding you as contributor on each commit #138 |
Summary
Three docs pages linked to
../tools/human-in-the-loop(filesystem path), butdocs/tools/human-in-the-loop.mdcarries aurl: /human-in-the-loopfrontmatter override and is served at/docs/human-in-the-loop. The links 404 in production.PR #36 fixed the relative links inside the two
url:-overridden pages, but did not fix callers from elsewhere in the tree pointing into them. These three were missed:docs/concepts/default-harness.md→../tools/human-in-the-loopdocs/concepts/sessions-runs-and-streaming.md→../tools/human-in-the-loopdocs/guides/frontend/overview.mdx→../../tools/human-in-the-loopReproduce on production
Each source page is live; click the "Human-in-the-loop" link on any of them and the destination 404s.
ask_questionrow of the tools table)input.requestedrow of the events table)The page itself is reachable at the correct URL: https://eve.dev/docs/human-in-the-loop.
Or via curl:
Changes
scripts/check-docs.mjsso this regression class fails CI. The previous link checker resolved relative and site-absolute markdown links against each file's filesystem path, so pages with aurl:frontmatter override could pass while breaking in prod. The new resolver builds each page's rendered URL (honoringurl:overrides) and resolves links in URL-space against that set. Running this script onmainbefore commit 1 reproduces exactly the three failures.Test plan
node scripts/check-docs.mjspasses on this branchnode scripts/check-docs.mjsagainstmain(pre-commit-1) fails with the three expected errors