From e2a859f6a3f6b4db5f5cf4e4666b8a1fb6524e30 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 5 Nov 2026 18:52:40 +0800 Subject: [PATCH] test: allow hidden pages in SDK documentation links (#4869) The SDK documentation-link test fails on `DocLink::BranchDiff` after the branching page is hidden from navigation. [Mintlify serves hidden MDX pages by their URL](https://www.mintlify.com/docs/guides/hidden-pages), so navigation membership is not a route-validity requirement. Remove that assertion while retaining the file, `.mintignore`, redirect-target, and anchor checks. Validated on the development EC2 with `cargo test --profile ci --features remote --locked --lib docs::tests::test_all_doc_links_resolve_in_repo_docs -- --exact --nocapture`: the unchanged base fails on `tables/branching`; this fix passes. The identical patch also passes against the exact #4867 head, checking all 14 `DocLink::ALL` entries. Formatting passes. This repairs the shared docs-test blocker for #4867; its separate `cargo deny` dependency finding is unchanged. --- rust/lancedb/src/docs.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rust/lancedb/src/docs.rs b/rust/lancedb/src/docs.rs index ccfd1c28c..a52b1a000 100644 --- a/rust/lancedb/src/docs.rs +++ b/rust/lancedb/src/docs.rs @@ -519,6 +519,8 @@ mod tests { "DocLink::{link:?} points to a .mintignore'd page: {rel_page}" ); + // Mintlify serves MDX pages even when they are intentionally omitted + // from navigation, so docs.json membership is not required. let mdx_path = if docs_web.join(&direct_mdx).is_file() { docs_web.join(&direct_mdx) } else if docs_web.join(&index_mdx).is_file() { @@ -527,12 +529,6 @@ mod tests { panic!("DocLink::{link:?} target page does not exist under docs/web: {rel_page}"); }; - assert!( - docs_json.contains(&format!("\"{rel_page}\"")) - || docs_json.contains(&format!("\"{rel_page}/index\"")), - "DocLink::{link:?} target page is not routed in docs/web/docs.json: {rel_page}" - ); - if let Some(anchor) = link.anchor() { let raw_mdx = std::fs::read_to_string(&mdx_path) .unwrap_or_else(|e| panic!("failed to read {}: {e}", mdx_path.display()));