You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs check-links: checkDocs reports in readdir order, so its test flakes on some runners #943
docs/scripts/check-links.test.ts, test "checkDocs > checks a nested section named scripts, and matches redirect patterns", failed in CI on PR #942. That PR does not touch docs/scripts, and the same test passed on main at ec92c5e minutes earlier. The two expected messages came back in the other order:
- "index.mdx:1: dead link /blog/a/b/amp",
"guides/scripts/index.mdx:3: dead link /nowhere",
+ "index.mdx:1: dead link /blog/a/b/amp",
checkDocs builds its file list with walk() over readdirSync (docs/scripts/check-links.ts:51). The order readdirSync returns is filesystem-dependent, so on some runners the problems come out in a different order, while the test compares against a fixed array.
Acceptance Criteria
checkDocs reports problems in a deterministic order (files sorted by path, then by line) whatever order the filesystem lists them in.
docs/scripts/check-links.test.ts passes regardless of directory listing order; a test that lists the files in reverse order passes too.
bun run docs:check output on the real docs is unchanged apart from ordering.
Activity
fix(docs): the link check reports in path order, not the filesystem's (…